提交 70e5c4f0 编写于 作者: M Magnus Damm 提交者: Paul Mundt

sh: Migo-R MMC support using spi_gpio and mmc_spi.

This patch adds CN9 MMC support for MigoR using the mmc_spi
driver on top of the bitbanging spi_gpio driver.
Signed-off-by: NMagnus Damm <damm@igel.co.jp>
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 fbdd9a70
......@@ -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>
......@@ -395,6 +397,20 @@ 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,
......@@ -402,6 +418,7 @@ static struct platform_device *migor_devices[] __initdata = {
&migor_ceu_device,
&migor_nor_flash_device,
&migor_nand_flash_device,
&sdcard_cn9_device,
};
static struct i2c_board_info migor_i2c_devices[] = {
......@@ -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 */
......@@ -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);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册