diff options
Diffstat (limited to 'arch/arm/mach-orion5x/common.c')
-rw-r--r-- | arch/arm/mach-orion5x/common.c | 91 |
1 files changed, 40 insertions, 51 deletions
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 4f13fd037f04..fa4be3cb1549 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
@@ -39,25 +39,22 @@ static struct map_desc orion5x_io_desc[] __initdata = { | |||
39 | .virtual = ORION5X_REGS_VIRT_BASE, | 39 | .virtual = ORION5X_REGS_VIRT_BASE, |
40 | .pfn = __phys_to_pfn(ORION5X_REGS_PHYS_BASE), | 40 | .pfn = __phys_to_pfn(ORION5X_REGS_PHYS_BASE), |
41 | .length = ORION5X_REGS_SIZE, | 41 | .length = ORION5X_REGS_SIZE, |
42 | .type = MT_DEVICE | 42 | .type = MT_DEVICE, |
43 | }, | 43 | }, { |
44 | { | ||
45 | .virtual = ORION5X_PCIE_IO_VIRT_BASE, | 44 | .virtual = ORION5X_PCIE_IO_VIRT_BASE, |
46 | .pfn = __phys_to_pfn(ORION5X_PCIE_IO_PHYS_BASE), | 45 | .pfn = __phys_to_pfn(ORION5X_PCIE_IO_PHYS_BASE), |
47 | .length = ORION5X_PCIE_IO_SIZE, | 46 | .length = ORION5X_PCIE_IO_SIZE, |
48 | .type = MT_DEVICE | 47 | .type = MT_DEVICE, |
49 | }, | 48 | }, { |
50 | { | ||
51 | .virtual = ORION5X_PCI_IO_VIRT_BASE, | 49 | .virtual = ORION5X_PCI_IO_VIRT_BASE, |
52 | .pfn = __phys_to_pfn(ORION5X_PCI_IO_PHYS_BASE), | 50 | .pfn = __phys_to_pfn(ORION5X_PCI_IO_PHYS_BASE), |
53 | .length = ORION5X_PCI_IO_SIZE, | 51 | .length = ORION5X_PCI_IO_SIZE, |
54 | .type = MT_DEVICE | 52 | .type = MT_DEVICE, |
55 | }, | 53 | }, { |
56 | { | ||
57 | .virtual = ORION5X_PCIE_WA_VIRT_BASE, | 54 | .virtual = ORION5X_PCIE_WA_VIRT_BASE, |
58 | .pfn = __phys_to_pfn(ORION5X_PCIE_WA_PHYS_BASE), | 55 | .pfn = __phys_to_pfn(ORION5X_PCIE_WA_PHYS_BASE), |
59 | .length = ORION5X_PCIE_WA_SIZE, | 56 | .length = ORION5X_PCIE_WA_SIZE, |
60 | .type = MT_DEVICE | 57 | .type = MT_DEVICE, |
61 | }, | 58 | }, |
62 | }; | 59 | }; |
63 | 60 | ||
@@ -75,18 +72,15 @@ static struct resource orion5x_uart_resources[] = { | |||
75 | .start = UART0_PHYS_BASE, | 72 | .start = UART0_PHYS_BASE, |
76 | .end = UART0_PHYS_BASE + 0xff, | 73 | .end = UART0_PHYS_BASE + 0xff, |
77 | .flags = IORESOURCE_MEM, | 74 | .flags = IORESOURCE_MEM, |
78 | }, | 75 | }, { |
79 | { | ||
80 | .start = IRQ_ORION5X_UART0, | 76 | .start = IRQ_ORION5X_UART0, |
81 | .end = IRQ_ORION5X_UART0, | 77 | .end = IRQ_ORION5X_UART0, |
82 | .flags = IORESOURCE_IRQ, | 78 | .flags = IORESOURCE_IRQ, |
83 | }, | 79 | }, { |
84 | { | ||
85 | .start = UART1_PHYS_BASE, | 80 | .start = UART1_PHYS_BASE, |
86 | .end = UART1_PHYS_BASE + 0xff, | 81 | .end = UART1_PHYS_BASE + 0xff, |
87 | .flags = IORESOURCE_MEM, | 82 | .flags = IORESOURCE_MEM, |
88 | }, | 83 | }, { |
89 | { | ||
90 | .start = IRQ_ORION5X_UART1, | 84 | .start = IRQ_ORION5X_UART1, |
91 | .end = IRQ_ORION5X_UART1, | 85 | .end = IRQ_ORION5X_UART1, |
92 | .flags = IORESOURCE_IRQ, | 86 | .flags = IORESOURCE_IRQ, |
@@ -102,8 +96,7 @@ static struct plat_serial8250_port orion5x_uart_data[] = { | |||
102 | .iotype = UPIO_MEM, | 96 | .iotype = UPIO_MEM, |
103 | .regshift = 2, | 97 | .regshift = 2, |
104 | .uartclk = ORION5X_TCLK, | 98 | .uartclk = ORION5X_TCLK, |
105 | }, | 99 | }, { |
106 | { | ||
107 | .mapbase = UART1_PHYS_BASE, | 100 | .mapbase = UART1_PHYS_BASE, |
108 | .membase = (char *)UART1_VIRT_BASE, | 101 | .membase = (char *)UART1_VIRT_BASE, |
109 | .irq = IRQ_ORION5X_UART1, | 102 | .irq = IRQ_ORION5X_UART1, |
@@ -111,8 +104,8 @@ static struct plat_serial8250_port orion5x_uart_data[] = { | |||
111 | .iotype = UPIO_MEM, | 104 | .iotype = UPIO_MEM, |
112 | .regshift = 2, | 105 | .regshift = 2, |
113 | .uartclk = ORION5X_TCLK, | 106 | .uartclk = ORION5X_TCLK, |
107 | }, { | ||
114 | }, | 108 | }, |
115 | { }, | ||
116 | }; | 109 | }; |
117 | 110 | ||
118 | static struct platform_device orion5x_uart = { | 111 | static struct platform_device orion5x_uart = { |
@@ -134,8 +127,7 @@ static struct resource orion5x_ehci0_resources[] = { | |||
134 | .start = ORION5X_USB0_PHYS_BASE, | 127 | .start = ORION5X_USB0_PHYS_BASE, |
135 | .end = ORION5X_USB0_PHYS_BASE + SZ_4K - 1, | 128 | .end = ORION5X_USB0_PHYS_BASE + SZ_4K - 1, |
136 | .flags = IORESOURCE_MEM, | 129 | .flags = IORESOURCE_MEM, |
137 | }, | 130 | }, { |
138 | { | ||
139 | .start = IRQ_ORION5X_USB0_CTRL, | 131 | .start = IRQ_ORION5X_USB0_CTRL, |
140 | .end = IRQ_ORION5X_USB0_CTRL, | 132 | .end = IRQ_ORION5X_USB0_CTRL, |
141 | .flags = IORESOURCE_IRQ, | 133 | .flags = IORESOURCE_IRQ, |
@@ -147,8 +139,7 @@ static struct resource orion5x_ehci1_resources[] = { | |||
147 | .start = ORION5X_USB1_PHYS_BASE, | 139 | .start = ORION5X_USB1_PHYS_BASE, |
148 | .end = ORION5X_USB1_PHYS_BASE + SZ_4K - 1, | 140 | .end = ORION5X_USB1_PHYS_BASE + SZ_4K - 1, |
149 | .flags = IORESOURCE_MEM, | 141 | .flags = IORESOURCE_MEM, |
150 | }, | 142 | }, { |
151 | { | ||
152 | .start = IRQ_ORION5X_USB1_CTRL, | 143 | .start = IRQ_ORION5X_USB1_CTRL, |
153 | .end = IRQ_ORION5X_USB1_CTRL, | 144 | .end = IRQ_ORION5X_USB1_CTRL, |
154 | .flags = IORESOURCE_IRQ, | 145 | .flags = IORESOURCE_IRQ, |
@@ -219,7 +210,7 @@ static struct resource orion5x_eth_resources[] = { | |||
219 | .start = IRQ_ORION5X_ETH_SUM, | 210 | .start = IRQ_ORION5X_ETH_SUM, |
220 | .end = IRQ_ORION5X_ETH_SUM, | 211 | .end = IRQ_ORION5X_ETH_SUM, |
221 | .flags = IORESOURCE_IRQ, | 212 | .flags = IORESOURCE_IRQ, |
222 | } | 213 | }, |
223 | }; | 214 | }; |
224 | 215 | ||
225 | static struct platform_device orion5x_eth = { | 216 | static struct platform_device orion5x_eth = { |
@@ -251,16 +242,15 @@ static struct mv64xxx_i2c_pdata orion5x_i2c_pdata = { | |||
251 | 242 | ||
252 | static struct resource orion5x_i2c_resources[] = { | 243 | static struct resource orion5x_i2c_resources[] = { |
253 | { | 244 | { |
254 | .name = "i2c base", | 245 | .name = "i2c base", |
255 | .start = I2C_PHYS_BASE, | 246 | .start = I2C_PHYS_BASE, |
256 | .end = I2C_PHYS_BASE + 0x20 -1, | 247 | .end = I2C_PHYS_BASE + 0x20 -1, |
257 | .flags = IORESOURCE_MEM, | 248 | .flags = IORESOURCE_MEM, |
258 | }, | 249 | }, { |
259 | { | 250 | .name = "i2c irq", |
260 | .name = "i2c irq", | 251 | .start = IRQ_ORION5X_I2C, |
261 | .start = IRQ_ORION5X_I2C, | 252 | .end = IRQ_ORION5X_I2C, |
262 | .end = IRQ_ORION5X_I2C, | 253 | .flags = IORESOURCE_IRQ, |
263 | .flags = IORESOURCE_IRQ, | ||
264 | }, | 254 | }, |
265 | }; | 255 | }; |
266 | 256 | ||
@@ -270,7 +260,7 @@ static struct platform_device orion5x_i2c = { | |||
270 | .num_resources = ARRAY_SIZE(orion5x_i2c_resources), | 260 | .num_resources = ARRAY_SIZE(orion5x_i2c_resources), |
271 | .resource = orion5x_i2c_resources, | 261 | .resource = orion5x_i2c_resources, |
272 | .dev = { | 262 | .dev = { |
273 | .platform_data = &orion5x_i2c_pdata, | 263 | .platform_data = &orion5x_i2c_pdata, |
274 | }, | 264 | }, |
275 | }; | 265 | }; |
276 | 266 | ||
@@ -278,28 +268,27 @@ static struct platform_device orion5x_i2c = { | |||
278 | * Sata port | 268 | * Sata port |
279 | ****************************************************************************/ | 269 | ****************************************************************************/ |
280 | static struct resource orion5x_sata_resources[] = { | 270 | static struct resource orion5x_sata_resources[] = { |
281 | { | ||
282 | .name = "sata base", | ||
283 | .start = ORION5X_SATA_PHYS_BASE, | ||
284 | .end = ORION5X_SATA_PHYS_BASE + 0x5000 - 1, | ||
285 | .flags = IORESOURCE_MEM, | ||
286 | }, | ||
287 | { | 271 | { |
288 | .name = "sata irq", | 272 | .name = "sata base", |
289 | .start = IRQ_ORION5X_SATA, | 273 | .start = ORION5X_SATA_PHYS_BASE, |
290 | .end = IRQ_ORION5X_SATA, | 274 | .end = ORION5X_SATA_PHYS_BASE + 0x5000 - 1, |
291 | .flags = IORESOURCE_IRQ, | 275 | .flags = IORESOURCE_MEM, |
292 | }, | 276 | }, { |
277 | .name = "sata irq", | ||
278 | .start = IRQ_ORION5X_SATA, | ||
279 | .end = IRQ_ORION5X_SATA, | ||
280 | .flags = IORESOURCE_IRQ, | ||
281 | }, | ||
293 | }; | 282 | }; |
294 | 283 | ||
295 | static struct platform_device orion5x_sata = { | 284 | static struct platform_device orion5x_sata = { |
296 | .name = "sata_mv", | 285 | .name = "sata_mv", |
297 | .id = 0, | 286 | .id = 0, |
298 | .dev = { | 287 | .dev = { |
299 | .coherent_dma_mask = 0xffffffff, | 288 | .coherent_dma_mask = 0xffffffff, |
300 | }, | 289 | }, |
301 | .num_resources = ARRAY_SIZE(orion5x_sata_resources), | 290 | .num_resources = ARRAY_SIZE(orion5x_sata_resources), |
302 | .resource = orion5x_sata_resources, | 291 | .resource = orion5x_sata_resources, |
303 | }; | 292 | }; |
304 | 293 | ||
305 | void __init orion5x_sata_init(struct mv_sata_platform_data *sata_data) | 294 | void __init orion5x_sata_init(struct mv_sata_platform_data *sata_data) |
@@ -319,7 +308,7 @@ static void orion5x_timer_init(void) | |||
319 | } | 308 | } |
320 | 309 | ||
321 | struct sys_timer orion5x_timer = { | 310 | struct sys_timer orion5x_timer = { |
322 | .init = orion5x_timer_init, | 311 | .init = orion5x_timer_init, |
323 | }; | 312 | }; |
324 | 313 | ||
325 | /***************************************************************************** | 314 | /***************************************************************************** |