aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/board-g3evm.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2010-05-12 21:07:54 -0400
committerPaul Mundt <lethal@linux-sh.org>2010-05-19 23:16:30 -0400
commit85f91dd082b5569b323ca261f0242c33a25d3a12 (patch)
tree855bc04495872c38d9227ad124d36738882c9c67 /arch/arm/mach-shmobile/board-g3evm.c
parent495b3cea94135a97e919bca67d7dcfdefafc7767 (diff)
ARM: mach-shmobile: g3evm: Add IrDA support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/arm/mach-shmobile/board-g3evm.c')
-rw-r--r--arch/arm/mach-shmobile/board-g3evm.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-g3evm.c b/arch/arm/mach-shmobile/board-g3evm.c
index 9247503296c..19b3bf3bf56 100644
--- a/arch/arm/mach-shmobile/board-g3evm.c
+++ b/arch/arm/mach-shmobile/board-g3evm.c
@@ -38,6 +38,14 @@
38#include <asm/mach/arch.h> 38#include <asm/mach/arch.h>
39#include <asm/mach/map.h> 39#include <asm/mach/map.h>
40 40
41/*
42 * IrDA
43 *
44 * S67: 5bit : ON power
45 * : 6bit : ON remote control
46 * OFF IrDA
47 */
48
41static struct mtd_partition nor_flash_partitions[] = { 49static struct mtd_partition nor_flash_partitions[] = {
42 { 50 {
43 .name = "loader", 51 .name = "loader",
@@ -209,11 +217,30 @@ static struct platform_device nand_flash_device = {
209 }, 217 },
210}; 218};
211 219
220static struct resource irda_resources[] = {
221 [0] = {
222 .start = 0xE6D00000,
223 .end = 0xE6D01FD4 - 1,
224 .flags = IORESOURCE_MEM,
225 },
226 [1] = {
227 .start = 20,
228 .flags = IORESOURCE_IRQ,
229 },
230};
231
232static struct platform_device irda_device = {
233 .name = "sh_irda",
234 .resource = irda_resources,
235 .num_resources = ARRAY_SIZE(irda_resources),
236};
237
212static struct platform_device *g3evm_devices[] __initdata = { 238static struct platform_device *g3evm_devices[] __initdata = {
213 &nor_flash_device, 239 &nor_flash_device,
214 &usb_host_device, 240 &usb_host_device,
215 &keysc_device, 241 &keysc_device,
216 &nand_flash_device, 242 &nand_flash_device,
243 &irda_device,
217}; 244};
218 245
219static struct map_desc g3evm_io_desc[] __initdata = { 246static struct map_desc g3evm_io_desc[] __initdata = {
@@ -318,6 +345,12 @@ static void __init g3evm_init(void)
318 /* FOE, FCDE, FSC on dedicated pins */ 345 /* FOE, FCDE, FSC on dedicated pins */
319 __raw_writel(__raw_readl(0xe6158048) & ~(1 << 15), 0xe6158048); 346 __raw_writel(__raw_readl(0xe6158048) & ~(1 << 15), 0xe6158048);
320 347
348 /* IrDA */
349 gpio_request(GPIO_FN_IRDA_OUT, NULL);
350 gpio_request(GPIO_FN_IRDA_IN, NULL);
351 gpio_request(GPIO_FN_IRDA_FIRSEL, NULL);
352 set_irq_type(20, IRQ_TYPE_LEVEL_LOW);
353
321 sh7367_add_standard_devices(); 354 sh7367_add_standard_devices();
322 355
323 platform_add_devices(g3evm_devices, ARRAY_SIZE(g3evm_devices)); 356 platform_add_devices(g3evm_devices, ARRAY_SIZE(g3evm_devices));