This source file includes following definitions.
- gtwx5715_init
1
2
3
4
5
6
7
8
9
10
11 #include <linux/init.h>
12 #include <linux/device.h>
13 #include <linux/serial.h>
14 #include <linux/tty.h>
15 #include <linux/serial_8250.h>
16 #include <asm/types.h>
17 #include <asm/setup.h>
18 #include <asm/memory.h>
19 #include <mach/hardware.h>
20 #include <asm/irq.h>
21 #include <asm/mach-types.h>
22 #include <asm/mach/arch.h>
23 #include <asm/mach/flash.h>
24
25 #include "irqs.h"
26
27
28
29
30
31 #define GTWX5715_KSSPI_SELECT 5
32 #define GTWX5715_KSSPI_TXD 6
33 #define GTWX5715_KSSPI_CLOCK 7
34 #define GTWX5715_KSSPI_RXD 12
35
36
37
38
39 #define GTWX5715_BUTTON_GPIO 3
40
41
42
43
44
45
46
47
48
49 #define GTWX5715_LED1_GPIO 2
50 #define GTWX5715_LED2_GPIO 9
51 #define GTWX5715_LED3_GPIO 8
52 #define GTWX5715_LED4_GPIO 1
53 #define GTWX5715_LED9_GPIO 4
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70 #ifdef __ARMEB__
71 #define REG_OFFSET 3
72 #else
73 #define REG_OFFSET 0
74 #endif
75
76
77
78
79
80 static struct resource gtwx5715_uart_resources[] = {
81 {
82 .start = IXP4XX_UART2_BASE_PHYS,
83 .end = IXP4XX_UART2_BASE_PHYS + 0x0fff,
84 .flags = IORESOURCE_MEM,
85 },
86 {
87 .start = IRQ_IXP4XX_UART2,
88 .end = IRQ_IXP4XX_UART2,
89 .flags = IORESOURCE_IRQ,
90 },
91 { },
92 };
93
94
95 static struct plat_serial8250_port gtwx5715_uart_platform_data[] = {
96 {
97 .mapbase = IXP4XX_UART2_BASE_PHYS,
98 .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
99 .irq = IRQ_IXP4XX_UART2,
100 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
101 .iotype = UPIO_MEM,
102 .regshift = 2,
103 .uartclk = IXP4XX_UART_XTAL,
104 },
105 { },
106 };
107
108 static struct platform_device gtwx5715_uart_device = {
109 .name = "serial8250",
110 .id = PLAT8250_DEV_PLATFORM,
111 .dev = {
112 .platform_data = gtwx5715_uart_platform_data,
113 },
114 .num_resources = 2,
115 .resource = gtwx5715_uart_resources,
116 };
117
118 static struct flash_platform_data gtwx5715_flash_data = {
119 .map_name = "cfi_probe",
120 .width = 2,
121 };
122
123 static struct resource gtwx5715_flash_resource = {
124 .flags = IORESOURCE_MEM,
125 };
126
127 static struct platform_device gtwx5715_flash = {
128 .name = "IXP4XX-Flash",
129 .id = 0,
130 .dev = {
131 .platform_data = >wx5715_flash_data,
132 },
133 .num_resources = 1,
134 .resource = >wx5715_flash_resource,
135 };
136
137 static struct platform_device *gtwx5715_devices[] __initdata = {
138 >wx5715_uart_device,
139 >wx5715_flash,
140 };
141
142 static void __init gtwx5715_init(void)
143 {
144 ixp4xx_sys_init();
145
146 gtwx5715_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
147 gtwx5715_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_8M - 1;
148
149 platform_add_devices(gtwx5715_devices, ARRAY_SIZE(gtwx5715_devices));
150 }
151
152
153 MACHINE_START(GTWX5715, "Gemtek GTWX5715 (Linksys WRV54G)")
154
155 .map_io = ixp4xx_map_io,
156 .init_early = ixp4xx_init_early,
157 .init_irq = ixp4xx_init_irq,
158 .init_time = ixp4xx_timer_init,
159 .atag_offset = 0x100,
160 .init_machine = gtwx5715_init,
161 #if defined(CONFIG_PCI)
162 .dma_zone_size = SZ_64M,
163 #endif
164 .restart = ixp4xx_restart,
165 MACHINE_END
166
167