diff options
| author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2011-01-14 06:00:41 -0500 |
|---|---|---|
| committer | Paul Mundt <lethal@linux-sh.org> | 2011-01-17 23:51:46 -0500 |
| commit | a33bb8a2cf7a686564df170dd94b1daa766c58bd (patch) | |
| tree | 6f58addeb62620f4b52444ae3fea286b3a9a6cf0 | |
| parent | ff9531ec1caf0e062da132933e33878f94449274 (diff) | |
ARM: mach-shmobile: ag5evm: Add IrDA support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| -rw-r--r-- | arch/arm/mach-shmobile/board-ag5evm.c | 26 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/clock-sh73a0.c | 4 |
2 files changed, 29 insertions, 1 deletions
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c index c18a740a4159..fb94162382e2 100644 --- a/arch/arm/mach-shmobile/board-ag5evm.c +++ b/arch/arm/mach-shmobile/board-ag5evm.c | |||
| @@ -183,11 +183,32 @@ static struct platform_device mmc_device = { | |||
| 183 | .resource = sh_mmcif_resources, | 183 | .resource = sh_mmcif_resources, |
| 184 | }; | 184 | }; |
| 185 | 185 | ||
| 186 | /* IrDA */ | ||
| 187 | static struct resource irda_resources[] = { | ||
| 188 | [0] = { | ||
| 189 | .start = 0xE6D00000, | ||
| 190 | .end = 0xE6D01FD4 - 1, | ||
| 191 | .flags = IORESOURCE_MEM, | ||
| 192 | }, | ||
| 193 | [1] = { | ||
| 194 | .start = gic_spi(95), | ||
| 195 | .flags = IORESOURCE_IRQ, | ||
| 196 | }, | ||
| 197 | }; | ||
| 198 | |||
| 199 | static struct platform_device irda_device = { | ||
| 200 | .name = "sh_irda", | ||
| 201 | .id = 0, | ||
| 202 | .resource = irda_resources, | ||
| 203 | .num_resources = ARRAY_SIZE(irda_resources), | ||
| 204 | }; | ||
| 205 | |||
| 186 | static struct platform_device *ag5evm_devices[] __initdata = { | 206 | static struct platform_device *ag5evm_devices[] __initdata = { |
| 187 | ð_device, | 207 | ð_device, |
| 188 | &keysc_device, | 208 | &keysc_device, |
| 189 | &fsi_device, | 209 | &fsi_device, |
| 190 | &mmc_device, | 210 | &mmc_device, |
| 211 | &irda_device, | ||
| 191 | }; | 212 | }; |
| 192 | 213 | ||
| 193 | static struct map_desc ag5evm_io_desc[] __initdata = { | 214 | static struct map_desc ag5evm_io_desc[] __initdata = { |
| @@ -287,6 +308,11 @@ static void __init ag5evm_init(void) | |||
| 287 | gpio_request(GPIO_FN_FSIAISLD, NULL); | 308 | gpio_request(GPIO_FN_FSIAISLD, NULL); |
| 288 | gpio_request(GPIO_FN_FSIAOSLD, NULL); | 309 | gpio_request(GPIO_FN_FSIAOSLD, NULL); |
| 289 | 310 | ||
| 311 | /* IrDA */ | ||
| 312 | gpio_request(GPIO_FN_PORT241_IRDA_OUT, NULL); | ||
| 313 | gpio_request(GPIO_FN_PORT242_IRDA_IN, NULL); | ||
| 314 | gpio_request(GPIO_FN_PORT243_IRDA_FIRSEL, NULL); | ||
| 315 | |||
| 290 | #ifdef CONFIG_CACHE_L2X0 | 316 | #ifdef CONFIG_CACHE_L2X0 |
| 291 | /* Shared attribute override enable, 64K*8way */ | 317 | /* Shared attribute override enable, 64K*8way */ |
| 292 | l2x0_init(__io(0xf0100000), 0x00460000, 0xc2000fff); | 318 | l2x0_init(__io(0xf0100000), 0x00460000, 0xc2000fff); |
diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c index 720a71433be6..aa1c51dc6d77 100644 --- a/arch/arm/mach-shmobile/clock-sh73a0.c +++ b/arch/arm/mach-shmobile/clock-sh73a0.c | |||
| @@ -258,7 +258,7 @@ enum { MSTP001, | |||
| 258 | MSTP125, MSTP116, | 258 | MSTP125, MSTP116, |
| 259 | MSTP219, | 259 | MSTP219, |
| 260 | MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200, | 260 | MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200, |
| 261 | MSTP331, MSTP329, MSTP323, MSTP312, | 261 | MSTP331, MSTP329, MSTP325, MSTP323, MSTP312, |
| 262 | MSTP411, MSTP410, MSTP403, | 262 | MSTP411, MSTP410, MSTP403, |
| 263 | MSTP_NR }; | 263 | MSTP_NR }; |
| 264 | 264 | ||
| @@ -279,6 +279,7 @@ static struct clk mstp_clks[MSTP_NR] = { | |||
| 279 | [MSTP200] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 0, 0), /* SCIFA4 */ | 279 | [MSTP200] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 0, 0), /* SCIFA4 */ |
| 280 | [MSTP331] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 31, 0), /* SCIFA6 */ | 280 | [MSTP331] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 31, 0), /* SCIFA6 */ |
| 281 | [MSTP329] = MSTP(&r_clk, SMSTPCR3, 29, 0), /* CMT10 */ | 281 | [MSTP329] = MSTP(&r_clk, SMSTPCR3, 29, 0), /* CMT10 */ |
| 282 | [MSTP325] = MSTP(&div4_clks[DIV6_SUB], SMSTPCR3, 25, 0), /* IrDA */ | ||
| 282 | [MSTP323] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 23, 0), /* IIC1 */ | 283 | [MSTP323] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 23, 0), /* IIC1 */ |
| 283 | [MSTP312] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 12, 0), /* MMCIF0 */ | 284 | [MSTP312] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 12, 0), /* MMCIF0 */ |
| 284 | [MSTP411] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 11, 0), /* IIC3 */ | 285 | [MSTP411] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 11, 0), /* IIC3 */ |
| @@ -308,6 +309,7 @@ static struct clk_lookup lookups[] = { | |||
| 308 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */ | 309 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */ |
| 309 | CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP331]), /* SCIFA6 */ | 310 | CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP331]), /* SCIFA6 */ |
| 310 | CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), /* CMT10 */ | 311 | CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), /* CMT10 */ |
| 312 | CLKDEV_DEV_ID("sh_irda.0", &mstp_clks[MSTP325]), /* IrDA */ | ||
| 311 | CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* I2C1 */ | 313 | CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* I2C1 */ |
| 312 | CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMCIF0 */ | 314 | CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMCIF0 */ |
| 313 | CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* I2C3 */ | 315 | CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* I2C3 */ |
