aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards
diff options
context:
space:
mode:
authorKuninori Morimoto <morimoto.kuninori@renesas.com>2010-02-23 19:32:28 -0500
committerPaul Mundt <lethal@linux-sh.org>2010-02-25 02:31:28 -0500
commit263657168549075b57ecfbf730738105d1af8b65 (patch)
tree7e55673752a8361d7eef0f62b35726431512cb3c /arch/sh/boards
parent94ea5e449ae834af058ef005d16a8ad44fcf13d6 (diff)
sh: mach-ecovec24: Add sh_sir support
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards')
-rw-r--r--arch/sh/boards/mach-ecovec24/setup.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
index 6f2e8a78b461..8cdf11e00ee6 100644
--- a/arch/sh/boards/mach-ecovec24/setup.c
+++ b/arch/sh/boards/mach-ecovec24/setup.c
@@ -751,6 +751,26 @@ static struct platform_device fsi_device = {
751 }, 751 },
752}; 752};
753 753
754/* IrDA */
755static struct resource irda_resources[] = {
756 [0] = {
757 .name = "IrDA",
758 .start = 0xA45D0000,
759 .end = 0xA45D0049,
760 .flags = IORESOURCE_MEM,
761 },
762 [1] = {
763 .start = 20,
764 .flags = IORESOURCE_IRQ,
765 },
766};
767
768static struct platform_device irda_device = {
769 .name = "sh_sir",
770 .num_resources = ARRAY_SIZE(irda_resources),
771 .resource = irda_resources,
772};
773
754static struct platform_device *ecovec_devices[] __initdata = { 774static struct platform_device *ecovec_devices[] __initdata = {
755 &heartbeat_device, 775 &heartbeat_device,
756 &nor_flash_device, 776 &nor_flash_device,
@@ -771,6 +791,7 @@ static struct platform_device *ecovec_devices[] __initdata = {
771 &camera_devices[1], 791 &camera_devices[1],
772 &camera_devices[2], 792 &camera_devices[2],
773 &fsi_device, 793 &fsi_device,
794 &irda_device,
774}; 795};
775 796
776#define EEPROM_ADDR 0x50 797#define EEPROM_ADDR 0x50
@@ -1131,6 +1152,12 @@ static int __init arch_setup(void)
1131 clk_set_rate(clk, clk_round_rate(clk, 166000000)); 1152 clk_set_rate(clk, clk_round_rate(clk, 166000000));
1132 clk_put(clk); 1153 clk_put(clk);
1133 1154
1155 /* enable IrDA */
1156 gpio_request(GPIO_FN_IRDA_OUT, NULL);
1157 gpio_request(GPIO_FN_IRDA_IN, NULL);
1158 gpio_request(GPIO_PTU5, NULL);
1159 gpio_direction_output(GPIO_PTU5, 0);
1160
1134 /* enable I2C device */ 1161 /* enable I2C device */
1135 i2c_register_board_info(0, i2c0_devices, 1162 i2c_register_board_info(0, i2c0_devices,
1136 ARRAY_SIZE(i2c0_devices)); 1163 ARRAY_SIZE(i2c0_devices));