ACPI: PM: s2idle: Always set up EC GPE for system wakeup
[sfrench/cifs-2.6.git] / arch / arm / mach-netx / nxdkn.c
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3  * arch/arm/mach-netx/nxdkn.c
4  *
5  * Copyright (c) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
6  */
7
8 #include <linux/dma-mapping.h>
9 #include <linux/init.h>
10 #include <linux/interrupt.h>
11 #include <linux/mtd/plat-ram.h>
12 #include <linux/platform_device.h>
13 #include <linux/amba/bus.h>
14 #include <linux/amba/clcd.h>
15
16 #include <mach/hardware.h>
17 #include <asm/mach-types.h>
18 #include <asm/mach/arch.h>
19 #include <mach/netx-regs.h>
20 #include <linux/platform_data/eth-netx.h>
21
22 #include "generic.h"
23
24 static struct netxeth_platform_data eth0_platform_data = {
25         .xcno = 0,
26 };
27
28 static struct platform_device nxdkn_eth0_device = {
29         .name           = "netx-eth",
30         .id             = 0,
31         .num_resources  = 0,
32         .resource       = NULL,
33         .dev = {
34                 .platform_data = &eth0_platform_data,
35         }
36 };
37
38 static struct netxeth_platform_data eth1_platform_data = {
39         .xcno = 1,
40 };
41
42 static struct platform_device nxdkn_eth1_device = {
43         .name           = "netx-eth",
44         .id             = 1,
45         .num_resources  = 0,
46         .resource       = NULL,
47         .dev = {
48                 .platform_data = &eth1_platform_data,
49         }
50 };
51
52 static struct resource netx_uart0_resources[] = {
53         [0] = {
54                 .start  = 0x00100A00,
55                 .end    = 0x00100A3F,
56                 .flags  = IORESOURCE_MEM,
57         },
58         [1] = {
59                 .start  = (NETX_IRQ_UART0),
60                 .end    = (NETX_IRQ_UART0),
61                 .flags  = IORESOURCE_IRQ,
62         },
63 };
64
65 static struct platform_device netx_uart0_device = {
66         .name           = "netx-uart",
67         .id             = 0,
68         .num_resources  = ARRAY_SIZE(netx_uart0_resources),
69         .resource       = netx_uart0_resources,
70 };
71
72 static struct platform_device *devices[] __initdata = {
73         &nxdkn_eth0_device,
74         &nxdkn_eth1_device,
75         &netx_uart0_device,
76 };
77
78 static void __init nxdkn_init(void)
79 {
80         platform_add_devices(devices, ARRAY_SIZE(devices));
81 }
82
83 MACHINE_START(NXDKN, "Hilscher nxdkn")
84         .atag_offset    = 0x100,
85         .map_io         = netx_map_io,
86         .init_irq       = netx_init_irq,
87         .init_time      = netx_timer_init,
88         .init_machine   = nxdkn_init,
89         .restart        = netx_restart,
90 MACHINE_END