diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2012-10-10 22:57:02 -0400 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2012-10-30 03:25:51 -0400 |
commit | b82573e18bc61666ffd3901ca6677bf18b9ea743 (patch) | |
tree | da8b2727d55bfe98d4cb55dd8a3ab4cabe84116f | |
parent | 1efdf56369eb920aef4c77ad04cfafcc680f92cf (diff) |
ARM: shmobile: marzen: add HSPI support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | arch/arm/configs/marzen_defconfig | 4 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-marzen.c | 25 |
2 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/configs/marzen_defconfig b/arch/arm/configs/marzen_defconfig index 53382b6c8bb4..5b8215f424c5 100644 --- a/arch/arm/configs/marzen_defconfig +++ b/arch/arm/configs/marzen_defconfig | |||
@@ -69,6 +69,10 @@ CONFIG_SERIAL_SH_SCI=y | |||
69 | CONFIG_SERIAL_SH_SCI_NR_UARTS=6 | 69 | CONFIG_SERIAL_SH_SCI_NR_UARTS=6 |
70 | CONFIG_SERIAL_SH_SCI_CONSOLE=y | 70 | CONFIG_SERIAL_SH_SCI_CONSOLE=y |
71 | # CONFIG_HW_RANDOM is not set | 71 | # CONFIG_HW_RANDOM is not set |
72 | CONFIG_I2C=y | ||
73 | CONFIG_I2C_RCAR=y | ||
74 | CONFIG_SPI=y | ||
75 | CONFIG_SPI_SH_HSPI=y | ||
72 | CONFIG_GPIO_SYSFS=y | 76 | CONFIG_GPIO_SYSFS=y |
73 | # CONFIG_HWMON is not set | 77 | # CONFIG_HWMON is not set |
74 | CONFIG_THERMAL=y | 78 | 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 @@ | |||
30 | #include <linux/regulator/fixed.h> | 30 | #include <linux/regulator/fixed.h> |
31 | #include <linux/regulator/machine.h> | 31 | #include <linux/regulator/machine.h> |
32 | #include <linux/smsc911x.h> | 32 | #include <linux/smsc911x.h> |
33 | #include <linux/spi/spi.h> | ||
34 | #include <linux/spi/sh_hspi.h> | ||
33 | #include <linux/mmc/sh_mobile_sdhi.h> | 35 | #include <linux/mmc/sh_mobile_sdhi.h> |
34 | #include <linux/mfd/tmio.h> | 36 | #include <linux/mfd/tmio.h> |
35 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
@@ -126,10 +128,27 @@ static struct platform_device thermal_device = { | |||
126 | .num_resources = ARRAY_SIZE(thermal_resources), | 128 | .num_resources = ARRAY_SIZE(thermal_resources), |
127 | }; | 129 | }; |
128 | 130 | ||
131 | /* HSPI */ | ||
132 | static struct resource hspi_resources[] = { | ||
133 | [0] = { | ||
134 | .start = 0xFFFC7000, | ||
135 | .end = 0xFFFC7018 - 1, | ||
136 | .flags = IORESOURCE_MEM, | ||
137 | }, | ||
138 | }; | ||
139 | |||
140 | static struct platform_device hspi_device = { | ||
141 | .name = "sh-hspi", | ||
142 | .id = 0, | ||
143 | .resource = hspi_resources, | ||
144 | .num_resources = ARRAY_SIZE(hspi_resources), | ||
145 | }; | ||
146 | |||
129 | static struct platform_device *marzen_devices[] __initdata = { | 147 | static struct platform_device *marzen_devices[] __initdata = { |
130 | ð_device, | 148 | ð_device, |
131 | &sdhi0_device, | 149 | &sdhi0_device, |
132 | &thermal_device, | 150 | &thermal_device, |
151 | &hspi_device, | ||
133 | }; | 152 | }; |
134 | 153 | ||
135 | static void __init marzen_init(void) | 154 | static void __init marzen_init(void) |
@@ -163,6 +182,12 @@ static void __init marzen_init(void) | |||
163 | gpio_request(GPIO_FN_SD0_CD, NULL); | 182 | gpio_request(GPIO_FN_SD0_CD, NULL); |
164 | gpio_request(GPIO_FN_SD0_WP, NULL); | 183 | gpio_request(GPIO_FN_SD0_WP, NULL); |
165 | 184 | ||
185 | /* HSPI 0 */ | ||
186 | gpio_request(GPIO_FN_HSPI_CLK0, NULL); | ||
187 | gpio_request(GPIO_FN_HSPI_CS0, NULL); | ||
188 | gpio_request(GPIO_FN_HSPI_TX0, NULL); | ||
189 | gpio_request(GPIO_FN_HSPI_RX0, NULL); | ||
190 | |||
166 | r8a7779_add_standard_devices(); | 191 | r8a7779_add_standard_devices(); |
167 | platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); | 192 | platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); |
168 | } | 193 | } |