Skip to content

Commit

Permalink
ARM: shmobile: marzen: add HSPI support
Browse files Browse the repository at this point in the history
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
  • Loading branch information
Kuninori Morimoto authored and Simon Horman committed Oct 30, 2012
1 parent 1efdf56 commit b82573e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/arm/configs/marzen_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ CONFIG_SERIAL_SH_SCI=y
CONFIG_SERIAL_SH_SCI_NR_UARTS=6
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
Expand Down
25 changes: 25 additions & 0 deletions arch/arm/mach-shmobile/board-marzen.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
#include <linux/regulator/fixed.h>
#include <linux/regulator/machine.h>
#include <linux/smsc911x.h>
#include <linux/spi/spi.h>
#include <linux/spi/sh_hspi.h>
#include <linux/mmc/sh_mobile_sdhi.h>
#include <linux/mfd/tmio.h>
#include <mach/hardware.h>
Expand Down Expand Up @@ -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 = {
&eth_device,
&sdhi0_device,
&thermal_device,
&hspi_device,
};

static void __init marzen_init(void)
Expand Down Expand Up @@ -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));
}
Expand Down

0 comments on commit b82573e

Please sign in to comment.