Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 130048
b: refs/heads/master
c: 70e5c4f
h: refs/heads/master
v: v3
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Jan 21, 2009
1 parent 1c6e33a commit de3f1ee
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fbdd9a70c21002c6ce50cd653380641a8b575eff
refs/heads/master: 70e5c4f0843c3021a2e95b46edd8925a885d2e31
31 changes: 30 additions & 1 deletion trunk/arch/sh/boards/mach-migor/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@
#include <linux/delay.h>
#include <linux/clk.h>
#include <linux/gpio.h>
#include <linux/spi/spi.h>
#include <linux/spi/spi_gpio.h>
#include <video/sh_mobile_lcdc.h>
#include <media/sh_mobile_ceu.h>
#include <media/ov772x.h>
#include <media/tw9910.h>
#include <video/sh_mobile_lcdc.h>
#include <asm/clock.h>
#include <asm/machvec.h>
#include <asm/io.h>
Expand Down Expand Up @@ -395,13 +397,28 @@ static struct tw9910_video_info tw9910_info = {
}
};

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

static struct platform_device sdcard_cn9_device = {
.name = "spi_gpio",
.dev = {
.platform_data = &sdcard_cn9_platform_data,
},
};

static struct platform_device *migor_devices[] __initdata = {
&smc91x_eth_device,
&sh_keysc_device,
&migor_lcdc_device,
&migor_ceu_device,
&migor_nor_flash_device,
&migor_nand_flash_device,
&sdcard_cn9_device,
};

static struct i2c_board_info migor_i2c_devices[] = {
Expand All @@ -422,6 +439,15 @@ static struct i2c_board_info migor_i2c_devices[] = {
},
};

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

static int __init migor_devices_setup(void)
{
/* Lit D11 LED */
Expand Down Expand Up @@ -544,6 +570,9 @@ static int __init migor_devices_setup(void)
i2c_register_board_info(0, migor_i2c_devices,
ARRAY_SIZE(migor_i2c_devices));

spi_register_board_info(migor_spi_devices,
ARRAY_SIZE(migor_spi_devices));

return platform_add_devices(migor_devices, ARRAY_SIZE(migor_devices));
}
__initcall(migor_devices_setup);

0 comments on commit de3f1ee

Please sign in to comment.