From: Kuninori Morimoto Date: Thu, 11 Oct 2012 02:57:02 +0000 (-0700) Subject: ARM: shmobile: marzen: add HSPI support X-Git-Tag: next-20121016~9^2^3 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5f9f3d29d35cdf6907272e407b4fcf7eabe6b88a;p=karo-tx-linux.git ARM: shmobile: marzen: add HSPI support Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- diff --git a/arch/arm/configs/marzen_defconfig b/arch/arm/configs/marzen_defconfig index f79b55c512d0..5b8215f424c5 100644 --- a/arch/arm/configs/marzen_defconfig +++ b/arch/arm/configs/marzen_defconfig @@ -71,6 +71,8 @@ CONFIG_SERIAL_SH_SCI_CONSOLE=y # CONFIG_HW_RANDOM is not set CONFIG_I2C=y CONFIG_I2C_RCAR=y +CONFIG_SPI=y +CONFIG_SPI_SH_HSPI=y CONFIG_GPIO_SYSFS=y # CONFIG_HWMON is not set CONFIG_THERMAL=y diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c index b8a7525a4e2f..69f7f464eff8 100644 --- a/arch/arm/mach-shmobile/board-marzen.c +++ b/arch/arm/mach-shmobile/board-marzen.c @@ -30,6 +30,8 @@ #include #include #include +#include +#include #include #include #include @@ -126,10 +128,27 @@ static struct platform_device thermal_device = { .num_resources = ARRAY_SIZE(thermal_resources), }; +/* HSPI */ +static struct resource hspi_resources[] = { + [0] = { + .start = 0xFFFC7000, + .end = 0xFFFC7018 - 1, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device hspi_device = { + .name = "sh-hspi", + .id = 0, + .resource = hspi_resources, + .num_resources = ARRAY_SIZE(hspi_resources), +}; + static struct platform_device *marzen_devices[] __initdata = { ð_device, &sdhi0_device, &thermal_device, + &hspi_device, }; static void __init marzen_init(void) @@ -163,6 +182,12 @@ static void __init marzen_init(void) gpio_request(GPIO_FN_SD0_CD, NULL); gpio_request(GPIO_FN_SD0_WP, NULL); + /* HSPI 0 */ + gpio_request(GPIO_FN_HSPI_CLK0, NULL); + gpio_request(GPIO_FN_HSPI_CS0, NULL); + gpio_request(GPIO_FN_HSPI_TX0, NULL); + gpio_request(GPIO_FN_HSPI_RX0, NULL); + r8a7779_add_standard_devices(); platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); }