diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-02-27 07:52:05 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-02-27 07:52:05 -0500 |
commit | afde9626089e3d0c32090120960d1e32f65e3be4 (patch) | |
tree | d986b671aee7ee9fd984b373223a5aad31aa4a53 /arch/arm/mach-imx | |
parent | 2daa79ec2126f8e710391e9d8e8f0d31d7c91d5f (diff) | |
parent | 64a38516ff50c3f6c1ef563c2f410db3239d9302 (diff) |
Merge branch 'features/cs89x0' of git://git.pengutronix.de/git/imx/linux-2.6 into next/drivers
* 'features/cs89x0' of git://git.pengutronix.de/git/imx/linux-2.6:
CS89x0 : add CS89x0 platform device to the iMX31ADS board
CS89x0 : remove QQ2440 board support from the CS89x0 driver
CS89x0 : add CS89x0 platform device to the iMX21ADS board
CS89x0 : add platform driver support
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r-- | arch/arm/mach-imx/mach-mx21ads.c | 16 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-mx31ads.c | 35 |
2 files changed, 47 insertions, 4 deletions
diff --git a/arch/arm/mach-imx/mach-mx21ads.c b/arch/arm/mach-imx/mach-mx21ads.c index 8d9f95514b1f..e432d4acee1f 100644 --- a/arch/arm/mach-imx/mach-mx21ads.c +++ b/arch/arm/mach-imx/mach-mx21ads.c | |||
@@ -37,8 +37,8 @@ | |||
37 | #define MX21ADS_REG_ADDR(offset) (void __force __iomem *) \ | 37 | #define MX21ADS_REG_ADDR(offset) (void __force __iomem *) \ |
38 | (MX21ADS_MMIO_BASE_ADDR + (offset)) | 38 | (MX21ADS_MMIO_BASE_ADDR + (offset)) |
39 | 39 | ||
40 | #define MX21ADS_CS8900A_MMIO_SIZE 0x200000 | ||
40 | #define MX21ADS_CS8900A_IRQ IRQ_GPIOE(11) | 41 | #define MX21ADS_CS8900A_IRQ IRQ_GPIOE(11) |
41 | #define MX21ADS_CS8900A_IOBASE_REG MX21ADS_REG_ADDR(0x000000) | ||
42 | #define MX21ADS_ST16C255_IOBASE_REG MX21ADS_REG_ADDR(0x200000) | 42 | #define MX21ADS_ST16C255_IOBASE_REG MX21ADS_REG_ADDR(0x200000) |
43 | #define MX21ADS_VERSION_REG MX21ADS_REG_ADDR(0x400000) | 43 | #define MX21ADS_VERSION_REG MX21ADS_REG_ADDR(0x400000) |
44 | #define MX21ADS_IO_REG MX21ADS_REG_ADDR(0x800000) | 44 | #define MX21ADS_IO_REG MX21ADS_REG_ADDR(0x800000) |
@@ -159,6 +159,18 @@ static struct platform_device mx21ads_nor_mtd_device = { | |||
159 | .resource = &mx21ads_flash_resource, | 159 | .resource = &mx21ads_flash_resource, |
160 | }; | 160 | }; |
161 | 161 | ||
162 | static const struct resource mx21ads_cs8900_resources[] __initconst = { | ||
163 | DEFINE_RES_MEM(MX21_CS1_BASE_ADDR, MX21ADS_CS8900A_MMIO_SIZE), | ||
164 | DEFINE_RES_IRQ(MX21ADS_CS8900A_IRQ), | ||
165 | }; | ||
166 | |||
167 | static const struct platform_device_info mx21ads_cs8900_devinfo __initconst = { | ||
168 | .name = "cs89x0", | ||
169 | .id = 0, | ||
170 | .res = mx21ads_cs8900_resources, | ||
171 | .num_res = ARRAY_SIZE(mx21ads_cs8900_resources), | ||
172 | }; | ||
173 | |||
162 | static const struct imxuart_platform_data uart_pdata_rts __initconst = { | 174 | static const struct imxuart_platform_data uart_pdata_rts __initconst = { |
163 | .flags = IMXUART_HAVE_RTSCTS, | 175 | .flags = IMXUART_HAVE_RTSCTS, |
164 | }; | 176 | }; |
@@ -292,6 +304,8 @@ static void __init mx21ads_board_init(void) | |||
292 | imx21_add_mxc_nand(&mx21ads_nand_board_info); | 304 | imx21_add_mxc_nand(&mx21ads_nand_board_info); |
293 | 305 | ||
294 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 306 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
307 | platform_device_register_full( | ||
308 | (struct platform_device_info *)&mx21ads_cs8900_devinfo); | ||
295 | } | 309 | } |
296 | 310 | ||
297 | static void __init mx21ads_timer_init(void) | 311 | static void __init mx21ads_timer_init(void) |
diff --git a/arch/arm/mach-imx/mach-mx31ads.c b/arch/arm/mach-imx/mach-mx31ads.c index 4917aab0e253..4518e5448227 100644 --- a/arch/arm/mach-imx/mach-mx31ads.c +++ b/arch/arm/mach-imx/mach-mx31ads.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <asm/memory.h> | 28 | #include <asm/memory.h> |
29 | #include <asm/mach/map.h> | 29 | #include <asm/mach/map.h> |
30 | #include <mach/common.h> | 30 | #include <mach/common.h> |
31 | #include <mach/board-mx31ads.h> | ||
32 | #include <mach/iomux-mx3.h> | 31 | #include <mach/iomux-mx3.h> |
33 | 32 | ||
34 | #ifdef CONFIG_MACH_MX31ADS_WM1133_EV1 | 33 | #ifdef CONFIG_MACH_MX31ADS_WM1133_EV1 |
@@ -39,6 +38,9 @@ | |||
39 | 38 | ||
40 | #include "devices-imx31.h" | 39 | #include "devices-imx31.h" |
41 | 40 | ||
41 | /* Base address of PBC controller */ | ||
42 | #define PBC_BASE_ADDRESS MX31_CS4_BASE_ADDR_VIRT | ||
43 | |||
42 | /* PBC Board interrupt status register */ | 44 | /* PBC Board interrupt status register */ |
43 | #define PBC_INTSTATUS 0x000016 | 45 | #define PBC_INTSTATUS 0x000016 |
44 | 46 | ||
@@ -62,6 +64,7 @@ | |||
62 | #define PBC_INTMASK_CLEAR_REG (PBC_INTMASK_CLEAR + PBC_BASE_ADDRESS) | 64 | #define PBC_INTMASK_CLEAR_REG (PBC_INTMASK_CLEAR + PBC_BASE_ADDRESS) |
63 | #define EXPIO_PARENT_INT IOMUX_TO_IRQ(MX31_PIN_GPIO1_4) | 65 | #define EXPIO_PARENT_INT IOMUX_TO_IRQ(MX31_PIN_GPIO1_4) |
64 | 66 | ||
67 | #define MXC_EXP_IO_BASE MXC_BOARD_IRQ_START | ||
65 | #define MXC_IRQ_TO_EXPIO(irq) ((irq) - MXC_EXP_IO_BASE) | 68 | #define MXC_IRQ_TO_EXPIO(irq) ((irq) - MXC_EXP_IO_BASE) |
66 | 69 | ||
67 | #define EXPIO_INT_XUART_INTA (MXC_EXP_IO_BASE + 10) | 70 | #define EXPIO_INT_XUART_INTA (MXC_EXP_IO_BASE + 10) |
@@ -69,6 +72,10 @@ | |||
69 | 72 | ||
70 | #define MXC_MAX_EXP_IO_LINES 16 | 73 | #define MXC_MAX_EXP_IO_LINES 16 |
71 | 74 | ||
75 | /* CS8900 */ | ||
76 | #define EXPIO_INT_ENET_INT (MXC_EXP_IO_BASE + 8) | ||
77 | #define CS4_CS8900_MMIO_START 0x20000 | ||
78 | |||
72 | /* | 79 | /* |
73 | * The serial port definition structure. | 80 | * The serial port definition structure. |
74 | */ | 81 | */ |
@@ -101,11 +108,29 @@ static struct platform_device serial_device = { | |||
101 | }, | 108 | }, |
102 | }; | 109 | }; |
103 | 110 | ||
111 | static const struct resource mx31ads_cs8900_resources[] __initconst = { | ||
112 | DEFINE_RES_MEM(MX31_CS4_BASE_ADDR + CS4_CS8900_MMIO_START, SZ_64K), | ||
113 | DEFINE_RES_IRQ(EXPIO_INT_ENET_INT), | ||
114 | }; | ||
115 | |||
116 | static const struct platform_device_info mx31ads_cs8900_devinfo __initconst = { | ||
117 | .name = "cs89x0", | ||
118 | .id = 0, | ||
119 | .res = mx31ads_cs8900_resources, | ||
120 | .num_res = ARRAY_SIZE(mx31ads_cs8900_resources), | ||
121 | }; | ||
122 | |||
104 | static int __init mxc_init_extuart(void) | 123 | static int __init mxc_init_extuart(void) |
105 | { | 124 | { |
106 | return platform_device_register(&serial_device); | 125 | return platform_device_register(&serial_device); |
107 | } | 126 | } |
108 | 127 | ||
128 | static void __init mxc_init_ext_ethernet(void) | ||
129 | { | ||
130 | platform_device_register_full( | ||
131 | (struct platform_device_info *)&mx31ads_cs8900_devinfo); | ||
132 | } | ||
133 | |||
109 | static const struct imxuart_platform_data uart_pdata __initconst = { | 134 | static const struct imxuart_platform_data uart_pdata __initconst = { |
110 | .flags = IMXUART_HAVE_RTSCTS, | 135 | .flags = IMXUART_HAVE_RTSCTS, |
111 | }; | 136 | }; |
@@ -492,12 +517,15 @@ static void __init mxc_init_audio(void) | |||
492 | mxc_iomux_setup_multiple_pins(ssi_pins, ARRAY_SIZE(ssi_pins), "ssi"); | 517 | mxc_iomux_setup_multiple_pins(ssi_pins, ARRAY_SIZE(ssi_pins), "ssi"); |
493 | } | 518 | } |
494 | 519 | ||
495 | /* static mappings */ | 520 | /* |
521 | * Static mappings, starting from the CS4 start address up to the start address | ||
522 | * of the CS8900. | ||
523 | */ | ||
496 | static struct map_desc mx31ads_io_desc[] __initdata = { | 524 | static struct map_desc mx31ads_io_desc[] __initdata = { |
497 | { | 525 | { |
498 | .virtual = MX31_CS4_BASE_ADDR_VIRT, | 526 | .virtual = MX31_CS4_BASE_ADDR_VIRT, |
499 | .pfn = __phys_to_pfn(MX31_CS4_BASE_ADDR), | 527 | .pfn = __phys_to_pfn(MX31_CS4_BASE_ADDR), |
500 | .length = MX31_CS4_SIZE / 2, | 528 | .length = CS4_CS8900_MMIO_START, |
501 | .type = MT_DEVICE | 529 | .type = MT_DEVICE |
502 | }, | 530 | }, |
503 | }; | 531 | }; |
@@ -522,6 +550,7 @@ static void __init mx31ads_init(void) | |||
522 | mxc_init_imx_uart(); | 550 | mxc_init_imx_uart(); |
523 | mxc_init_i2c(); | 551 | mxc_init_i2c(); |
524 | mxc_init_audio(); | 552 | mxc_init_audio(); |
553 | mxc_init_ext_ethernet(); | ||
525 | } | 554 | } |
526 | 555 | ||
527 | static void __init mx31ads_timer_init(void) | 556 | static void __init mx31ads_timer_init(void) |