diff options
Diffstat (limited to 'arch/sh/boards/board-ap325rxa.c')
-rw-r--r-- | arch/sh/boards/board-ap325rxa.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/sh/boards/board-ap325rxa.c b/arch/sh/boards/board-ap325rxa.c index 25a3306ce8dc..caf4c33f4e84 100644 --- a/arch/sh/boards/board-ap325rxa.c +++ b/arch/sh/boards/board-ap325rxa.c | |||
@@ -20,6 +20,8 @@ | |||
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/smsc911x.h> | 21 | #include <linux/smsc911x.h> |
22 | #include <linux/gpio.h> | 22 | #include <linux/gpio.h> |
23 | #include <linux/spi/spi.h> | ||
24 | #include <linux/spi/spi_gpio.h> | ||
23 | #include <media/soc_camera_platform.h> | 25 | #include <media/soc_camera_platform.h> |
24 | #include <media/sh_mobile_ceu.h> | 26 | #include <media/sh_mobile_ceu.h> |
25 | #include <video/sh_mobile_lcdc.h> | 27 | #include <video/sh_mobile_lcdc.h> |
@@ -317,6 +319,20 @@ static struct platform_device ceu_device = { | |||
317 | }, | 319 | }, |
318 | }; | 320 | }; |
319 | 321 | ||
322 | struct spi_gpio_platform_data sdcard_cn3_platform_data = { | ||
323 | .sck = GPIO_PTD0, | ||
324 | .mosi = GPIO_PTD1, | ||
325 | .miso = GPIO_PTD2, | ||
326 | .num_chipselect = 1, | ||
327 | }; | ||
328 | |||
329 | static struct platform_device sdcard_cn3_device = { | ||
330 | .name = "spi_gpio", | ||
331 | .dev = { | ||
332 | .platform_data = &sdcard_cn3_platform_data, | ||
333 | }, | ||
334 | }; | ||
335 | |||
320 | static struct platform_device *ap325rxa_devices[] __initdata = { | 336 | static struct platform_device *ap325rxa_devices[] __initdata = { |
321 | &smsc9118_device, | 337 | &smsc9118_device, |
322 | &ap325rxa_nor_flash_device, | 338 | &ap325rxa_nor_flash_device, |
@@ -326,6 +342,7 @@ static struct platform_device *ap325rxa_devices[] __initdata = { | |||
326 | &camera_device, | 342 | &camera_device, |
327 | #endif | 343 | #endif |
328 | &nand_flash_device, | 344 | &nand_flash_device, |
345 | &sdcard_cn3_device, | ||
329 | }; | 346 | }; |
330 | 347 | ||
331 | static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = { | 348 | static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = { |
@@ -334,6 +351,15 @@ static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = { | |||
334 | }, | 351 | }, |
335 | }; | 352 | }; |
336 | 353 | ||
354 | static struct spi_board_info ap325rxa_spi_devices[] = { | ||
355 | { | ||
356 | .modalias = "mmc_spi", | ||
357 | .max_speed_hz = 5000000, | ||
358 | .chip_select = 0, | ||
359 | .controller_data = (void *) GPIO_PTD5, | ||
360 | }, | ||
361 | }; | ||
362 | |||
337 | static int __init ap325rxa_devices_setup(void) | 363 | static int __init ap325rxa_devices_setup(void) |
338 | { | 364 | { |
339 | /* LD3 and LD4 LEDs */ | 365 | /* LD3 and LD4 LEDs */ |
@@ -431,6 +457,9 @@ static int __init ap325rxa_devices_setup(void) | |||
431 | i2c_register_board_info(0, ap325rxa_i2c_devices, | 457 | i2c_register_board_info(0, ap325rxa_i2c_devices, |
432 | ARRAY_SIZE(ap325rxa_i2c_devices)); | 458 | ARRAY_SIZE(ap325rxa_i2c_devices)); |
433 | 459 | ||
460 | spi_register_board_info(ap325rxa_spi_devices, | ||
461 | ARRAY_SIZE(ap325rxa_spi_devices)); | ||
462 | |||
434 | return platform_add_devices(ap325rxa_devices, | 463 | return platform_add_devices(ap325rxa_devices, |
435 | ARRAY_SIZE(ap325rxa_devices)); | 464 | ARRAY_SIZE(ap325rxa_devices)); |
436 | } | 465 | } |