Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 130047
b: refs/heads/master
c: fbdd9a7
h: refs/heads/master
i:
  130045: c5d3cdb
  130043: 32a978f
  130039: 8171170
  130031: c848083
  130015: a2c7227
  129983: 52ef34b
  129919: 5f575e7
  129791: bb48d71
  129535: c0a394d
  129023: 3549f31
v: v3
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Jan 21, 2009
1 parent 3f39d60 commit 1c6e33a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 10f0fc17f54527520959298f947c9b9e80643f84
refs/heads/master: fbdd9a70c21002c6ce50cd653380641a8b575eff
29 changes: 29 additions & 0 deletions trunk/arch/sh/boards/board-ap325rxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#include <linux/i2c.h>
#include <linux/smsc911x.h>
#include <linux/gpio.h>
#include <linux/spi/spi.h>
#include <linux/spi/spi_gpio.h>
#include <media/soc_camera_platform.h>
#include <media/sh_mobile_ceu.h>
#include <video/sh_mobile_lcdc.h>
Expand Down Expand Up @@ -317,6 +319,20 @@ static struct platform_device ceu_device = {
},
};

struct spi_gpio_platform_data sdcard_cn3_platform_data = {
.sck = GPIO_PTD0,
.mosi = GPIO_PTD1,
.miso = GPIO_PTD2,
.num_chipselect = 1,
};

static struct platform_device sdcard_cn3_device = {
.name = "spi_gpio",
.dev = {
.platform_data = &sdcard_cn3_platform_data,
},
};

static struct platform_device *ap325rxa_devices[] __initdata = {
&smsc9118_device,
&ap325rxa_nor_flash_device,
Expand All @@ -326,6 +342,7 @@ static struct platform_device *ap325rxa_devices[] __initdata = {
&camera_device,
#endif
&nand_flash_device,
&sdcard_cn3_device,
};

static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = {
Expand All @@ -334,6 +351,15 @@ static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = {
},
};

static struct spi_board_info ap325rxa_spi_devices[] = {
{
.modalias = "mmc_spi",
.max_speed_hz = 5000000,
.chip_select = 0,
.controller_data = (void *) GPIO_PTD5,
},
};

static int __init ap325rxa_devices_setup(void)
{
/* LD3 and LD4 LEDs */
Expand Down Expand Up @@ -431,6 +457,9 @@ static int __init ap325rxa_devices_setup(void)
i2c_register_board_info(0, ap325rxa_i2c_devices,
ARRAY_SIZE(ap325rxa_i2c_devices));

spi_register_board_info(ap325rxa_spi_devices,
ARRAY_SIZE(ap325rxa_spi_devices));

return platform_add_devices(ap325rxa_devices,
ARRAY_SIZE(ap325rxa_devices));
}
Expand Down

0 comments on commit 1c6e33a

Please sign in to comment.