aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-orion/common.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-10 17:09:44 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-10 17:09:44 -0500
commit0eccf60bfa9190d1588b2bf07d23d7b9b3a19d9e (patch)
tree6198378343c1856ecbf1d41e52683112f940bbc2 /arch/arm/mach-orion/common.c
parentb6ce068a1285a24185b01be8a49021827516b3e1 (diff)
parentf9166e736e516a4b1de16577b5428afd0cffe325 (diff)
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (30 commits) [ARM] constify function pointer tables [ARM] 4823/1: AT91 section fix [ARM] 4824/1: pxa: clear RDH bit after any reset [ARM] pxa: remove debugging PM: printk ARM: OMAP1: Misc clean-up ARM: OMAP1: Update defconfigs for omap1 ARM: OMAP1: Palm Tungsten E board clean-up ARM: OMAP1: Use I2C bus registration helper for omap1 ARM: OMAP1: Remove omap_sram_idle() ARM: OMAP1: PM fixes for OMAP1 ARM: OMAP1: Use MMC multislot structures for Siemens SX1 board ARM: OMAP1: Make omap1 use MMC multislot structures ARM: OMAP1: Change the comments to C style ARM: OMAP1: Make omap1 boards to use omap_nand_platform_data ARM: OMAP: Add helper module for board specific I2C bus registration ARM: OMAP: Add dmtimer support for OMAP3 ARM: OMAP: Pre-3430 clean-up for dmtimer.c ARM: OMAP: Add DMA support for chaining and 3430 ARM: OMAP: Add 24xx GPIO debounce support ARM: OMAP: Get rid of unnecessary ifdefs in GPIO code ...
Diffstat (limited to 'arch/arm/mach-orion/common.c')
-rw-r--r--arch/arm/mach-orion/common.c84
1 files changed, 59 insertions, 25 deletions
diff --git a/arch/arm/mach-orion/common.c b/arch/arm/mach-orion/common.c
index 5e20b6b32508..5f0ee4b8a9b7 100644
--- a/arch/arm/mach-orion/common.c
+++ b/arch/arm/mach-orion/common.c
@@ -19,7 +19,7 @@
19#include <asm/page.h> 19#include <asm/page.h>
20#include <asm/timex.h> 20#include <asm/timex.h>
21#include <asm/mach/map.h> 21#include <asm/mach/map.h>
22#include <asm/arch/orion.h> 22#include <asm/arch/hardware.h>
23#include "common.h" 23#include "common.h"
24 24
25/***************************************************************************** 25/*****************************************************************************
@@ -27,26 +27,26 @@
27 ****************************************************************************/ 27 ****************************************************************************/
28static struct map_desc orion_io_desc[] __initdata = { 28static struct map_desc orion_io_desc[] __initdata = {
29 { 29 {
30 .virtual = ORION_REGS_BASE, 30 .virtual = ORION_REGS_VIRT_BASE,
31 .pfn = __phys_to_pfn(ORION_REGS_BASE), 31 .pfn = __phys_to_pfn(ORION_REGS_PHYS_BASE),
32 .length = ORION_REGS_SIZE, 32 .length = ORION_REGS_SIZE,
33 .type = MT_DEVICE 33 .type = MT_DEVICE
34 }, 34 },
35 { 35 {
36 .virtual = ORION_PCIE_IO_BASE, 36 .virtual = ORION_PCIE_IO_VIRT_BASE,
37 .pfn = __phys_to_pfn(ORION_PCIE_IO_BASE), 37 .pfn = __phys_to_pfn(ORION_PCIE_IO_PHYS_BASE),
38 .length = ORION_PCIE_IO_SIZE, 38 .length = ORION_PCIE_IO_SIZE,
39 .type = MT_DEVICE 39 .type = MT_DEVICE
40 }, 40 },
41 { 41 {
42 .virtual = ORION_PCI_IO_BASE, 42 .virtual = ORION_PCI_IO_VIRT_BASE,
43 .pfn = __phys_to_pfn(ORION_PCI_IO_BASE), 43 .pfn = __phys_to_pfn(ORION_PCI_IO_PHYS_BASE),
44 .length = ORION_PCI_IO_SIZE, 44 .length = ORION_PCI_IO_SIZE,
45 .type = MT_DEVICE 45 .type = MT_DEVICE
46 }, 46 },
47 { 47 {
48 .virtual = ORION_PCIE_WA_BASE, 48 .virtual = ORION_PCIE_WA_VIRT_BASE,
49 .pfn = __phys_to_pfn(ORION_PCIE_WA_BASE), 49 .pfn = __phys_to_pfn(ORION_PCIE_WA_PHYS_BASE),
50 .length = ORION_PCIE_WA_SIZE, 50 .length = ORION_PCIE_WA_SIZE,
51 .type = MT_DEVICE 51 .type = MT_DEVICE
52 }, 52 },
@@ -63,8 +63,8 @@ void __init orion_map_io(void)
63 63
64static struct resource orion_uart_resources[] = { 64static struct resource orion_uart_resources[] = {
65 { 65 {
66 .start = UART0_BASE, 66 .start = UART0_PHYS_BASE,
67 .end = UART0_BASE + 0xff, 67 .end = UART0_PHYS_BASE + 0xff,
68 .flags = IORESOURCE_MEM, 68 .flags = IORESOURCE_MEM,
69 }, 69 },
70 { 70 {
@@ -73,8 +73,8 @@ static struct resource orion_uart_resources[] = {
73 .flags = IORESOURCE_IRQ, 73 .flags = IORESOURCE_IRQ,
74 }, 74 },
75 { 75 {
76 .start = UART1_BASE, 76 .start = UART1_PHYS_BASE,
77 .end = UART1_BASE + 0xff, 77 .end = UART1_PHYS_BASE + 0xff,
78 .flags = IORESOURCE_MEM, 78 .flags = IORESOURCE_MEM,
79 }, 79 },
80 { 80 {
@@ -86,8 +86,8 @@ static struct resource orion_uart_resources[] = {
86 86
87static struct plat_serial8250_port orion_uart_data[] = { 87static struct plat_serial8250_port orion_uart_data[] = {
88 { 88 {
89 .mapbase = UART0_BASE, 89 .mapbase = UART0_PHYS_BASE,
90 .membase = (char *)UART0_BASE, 90 .membase = (char *)UART0_VIRT_BASE,
91 .irq = IRQ_ORION_UART0, 91 .irq = IRQ_ORION_UART0,
92 .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF, 92 .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
93 .iotype = UPIO_MEM, 93 .iotype = UPIO_MEM,
@@ -95,8 +95,8 @@ static struct plat_serial8250_port orion_uart_data[] = {
95 .uartclk = ORION_TCLK, 95 .uartclk = ORION_TCLK,
96 }, 96 },
97 { 97 {
98 .mapbase = UART1_BASE, 98 .mapbase = UART1_PHYS_BASE,
99 .membase = (char *)UART1_BASE, 99 .membase = (char *)UART1_VIRT_BASE,
100 .irq = IRQ_ORION_UART1, 100 .irq = IRQ_ORION_UART1,
101 .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF, 101 .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
102 .iotype = UPIO_MEM, 102 .iotype = UPIO_MEM,
@@ -122,8 +122,8 @@ static struct platform_device orion_uart = {
122 122
123static struct resource orion_ehci0_resources[] = { 123static struct resource orion_ehci0_resources[] = {
124 { 124 {
125 .start = ORION_USB0_REG_BASE, 125 .start = ORION_USB0_PHYS_BASE,
126 .end = ORION_USB0_REG_BASE + SZ_4K, 126 .end = ORION_USB0_PHYS_BASE + SZ_4K,
127 .flags = IORESOURCE_MEM, 127 .flags = IORESOURCE_MEM,
128 }, 128 },
129 { 129 {
@@ -135,8 +135,8 @@ static struct resource orion_ehci0_resources[] = {
135 135
136static struct resource orion_ehci1_resources[] = { 136static struct resource orion_ehci1_resources[] = {
137 { 137 {
138 .start = ORION_USB1_REG_BASE, 138 .start = ORION_USB1_PHYS_BASE,
139 .end = ORION_USB1_REG_BASE + SZ_4K, 139 .end = ORION_USB1_PHYS_BASE + SZ_4K,
140 .flags = IORESOURCE_MEM, 140 .flags = IORESOURCE_MEM,
141 }, 141 },
142 { 142 {
@@ -177,8 +177,8 @@ static struct platform_device orion_ehci1 = {
177 177
178static struct resource orion_eth_shared_resources[] = { 178static struct resource orion_eth_shared_resources[] = {
179 { 179 {
180 .start = ORION_ETH_REG_BASE, 180 .start = ORION_ETH_PHYS_BASE,
181 .end = ORION_ETH_REG_BASE + 0xffff, 181 .end = ORION_ETH_PHYS_BASE + 0xffff,
182 .flags = IORESOURCE_MEM, 182 .flags = IORESOURCE_MEM,
183 }, 183 },
184}; 184};
@@ -227,8 +227,8 @@ static struct mv64xxx_i2c_pdata orion_i2c_pdata = {
227static struct resource orion_i2c_resources[] = { 227static struct resource orion_i2c_resources[] = {
228 { 228 {
229 .name = "i2c base", 229 .name = "i2c base",
230 .start = I2C_BASE, 230 .start = I2C_PHYS_BASE,
231 .end = I2C_BASE + 0x20 -1, 231 .end = I2C_PHYS_BASE + 0x20 -1,
232 .flags = IORESOURCE_MEM, 232 .flags = IORESOURCE_MEM,
233 }, 233 },
234 { 234 {
@@ -250,6 +250,40 @@ static struct platform_device orion_i2c = {
250}; 250};
251 251
252/***************************************************************************** 252/*****************************************************************************
253 * Sata port
254 ****************************************************************************/
255static struct resource orion_sata_resources[] = {
256 {
257 .name = "sata base",
258 .start = ORION_SATA_PHYS_BASE,
259 .end = ORION_SATA_PHYS_BASE + 0x5000 - 1,
260 .flags = IORESOURCE_MEM,
261 },
262 {
263 .name = "sata irq",
264 .start = IRQ_ORION_SATA,
265 .end = IRQ_ORION_SATA,
266 .flags = IORESOURCE_IRQ,
267 },
268};
269
270static struct platform_device orion_sata = {
271 .name = "sata_mv",
272 .id = 0,
273 .dev = {
274 .coherent_dma_mask = 0xffffffff,
275 },
276 .num_resources = ARRAY_SIZE(orion_sata_resources),
277 .resource = orion_sata_resources,
278};
279
280void __init orion_sata_init(struct mv_sata_platform_data *sata_data)
281{
282 orion_sata.dev.platform_data = sata_data;
283 platform_device_register(&orion_sata);
284}
285
286/*****************************************************************************
253 * General 287 * General
254 ****************************************************************************/ 288 ****************************************************************************/
255 289