diff options
author | Daniel Mack <daniel@caiaq.de> | 2009-11-21 12:40:40 -0500 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-11-23 05:51:00 -0500 |
commit | 2cc326833f616ee49f73be94d4bf0ab1bc9a72d9 (patch) | |
tree | ce5347834be2483b4bed3c778e1e672aa1c65a03 /arch/arm/mach-mx3 | |
parent | 6d3e6601ba0ff6ca804d3c103164624618cab4a9 (diff) |
ARM: MX3: lilly1131: move MC13783 device registration
Register the MC13783 device in the module code.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx3')
-rw-r--r-- | arch/arm/mach-mx3/mx31lilly-db.c | 19 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mx31lilly.c | 17 |
2 files changed, 17 insertions, 19 deletions
diff --git a/arch/arm/mach-mx3/mx31lilly-db.c b/arch/arm/mach-mx3/mx31lilly-db.c index bb1e44f5d30b..7aebd74a12e8 100644 --- a/arch/arm/mach-mx3/mx31lilly-db.c +++ b/arch/arm/mach-mx3/mx31lilly-db.c | |||
@@ -29,8 +29,6 @@ | |||
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/gpio.h> | 30 | #include <linux/gpio.h> |
31 | #include <linux/platform_device.h> | 31 | #include <linux/platform_device.h> |
32 | #include <linux/spi/spi.h> | ||
33 | #include <linux/mfd/mc13783.h> | ||
34 | 32 | ||
35 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
36 | #include <asm/mach/arch.h> | 34 | #include <asm/mach/arch.h> |
@@ -214,22 +212,6 @@ static void __init mx31lilly_init_fb(void) | |||
214 | gpio_direction_output(LCD_VCC_EN_GPIO, 1); | 212 | gpio_direction_output(LCD_VCC_EN_GPIO, 1); |
215 | } | 213 | } |
216 | 214 | ||
217 | /* SPI */ | ||
218 | |||
219 | static struct mc13783_platform_data mc13783_pdata __initdata = { | ||
220 | .flags = MC13783_USE_RTC | MC13783_USE_TOUCHSCREEN, | ||
221 | }; | ||
222 | |||
223 | static struct spi_board_info lilly_spi_devs[] __initdata = { | ||
224 | { | ||
225 | .modalias = "mc13783", | ||
226 | .max_speed_hz = 1000000, | ||
227 | .bus_num = 1, | ||
228 | .chip_select = 0, | ||
229 | .platform_data = &mc13783_pdata, | ||
230 | }, | ||
231 | }; | ||
232 | |||
233 | void __init mx31lilly_db_init(void) | 215 | void __init mx31lilly_db_init(void) |
234 | { | 216 | { |
235 | mxc_iomux_setup_multiple_pins(lilly_db_board_pins, | 217 | mxc_iomux_setup_multiple_pins(lilly_db_board_pins, |
@@ -240,6 +222,5 @@ void __init mx31lilly_db_init(void) | |||
240 | mxc_register_device(&mxc_uart_device2, &uart_pdata); | 222 | mxc_register_device(&mxc_uart_device2, &uart_pdata); |
241 | mxc_register_device(&mxcsdhc_device0, &mmc_pdata); | 223 | mxc_register_device(&mxcsdhc_device0, &mmc_pdata); |
242 | mx31lilly_init_fb(); | 224 | mx31lilly_init_fb(); |
243 | spi_register_board_info(lilly_spi_devs, ARRAY_SIZE(lilly_spi_devs)); | ||
244 | } | 225 | } |
245 | 226 | ||
diff --git a/arch/arm/mach-mx3/mx31lilly.c b/arch/arm/mach-mx3/mx31lilly.c index f593a629d8b8..9ce029f554b9 100644 --- a/arch/arm/mach-mx3/mx31lilly.c +++ b/arch/arm/mach-mx3/mx31lilly.c | |||
@@ -31,6 +31,8 @@ | |||
31 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
32 | #include <linux/smsc911x.h> | 32 | #include <linux/smsc911x.h> |
33 | #include <linux/mtd/physmap.h> | 33 | #include <linux/mtd/physmap.h> |
34 | #include <linux/spi/spi.h> | ||
35 | #include <linux/mfd/mc13783.h> | ||
34 | 36 | ||
35 | #include <asm/mach-types.h> | 37 | #include <asm/mach-types.h> |
36 | #include <asm/mach/arch.h> | 38 | #include <asm/mach/arch.h> |
@@ -111,6 +113,8 @@ static struct platform_device *devices[] __initdata = { | |||
111 | &physmap_flash_device, | 113 | &physmap_flash_device, |
112 | }; | 114 | }; |
113 | 115 | ||
116 | /* SPI */ | ||
117 | |||
114 | static int spi_internal_chipselect[] = { | 118 | static int spi_internal_chipselect[] = { |
115 | MXC_SPI_CS(0), | 119 | MXC_SPI_CS(0), |
116 | MXC_SPI_CS(1), | 120 | MXC_SPI_CS(1), |
@@ -127,6 +131,18 @@ static struct spi_imx_master spi1_pdata = { | |||
127 | .num_chipselect = ARRAY_SIZE(spi_internal_chipselect), | 131 | .num_chipselect = ARRAY_SIZE(spi_internal_chipselect), |
128 | }; | 132 | }; |
129 | 133 | ||
134 | static struct mc13783_platform_data mc13783_pdata __initdata = { | ||
135 | .flags = MC13783_USE_RTC | MC13783_USE_TOUCHSCREEN, | ||
136 | }; | ||
137 | |||
138 | static struct spi_board_info mc13783_dev __initdata = { | ||
139 | .modalias = "mc13783", | ||
140 | .max_speed_hz = 1000000, | ||
141 | .bus_num = 1, | ||
142 | .chip_select = 0, | ||
143 | .platform_data = &mc13783_pdata, | ||
144 | }; | ||
145 | |||
130 | static int mx31lilly_baseboard; | 146 | static int mx31lilly_baseboard; |
131 | core_param(mx31lilly_baseboard, mx31lilly_baseboard, int, 0444); | 147 | core_param(mx31lilly_baseboard, mx31lilly_baseboard, int, 0444); |
132 | 148 | ||
@@ -164,6 +180,7 @@ static void __init mx31lilly_board_init(void) | |||
164 | 180 | ||
165 | mxc_register_device(&mxc_spi_device0, &spi0_pdata); | 181 | mxc_register_device(&mxc_spi_device0, &spi0_pdata); |
166 | mxc_register_device(&mxc_spi_device1, &spi1_pdata); | 182 | mxc_register_device(&mxc_spi_device1, &spi1_pdata); |
183 | spi_register_board_info(&mc13783_dev, 1); | ||
167 | 184 | ||
168 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 185 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
169 | } | 186 | } |