aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2013-10-02 04:31:40 -0400
committerSimon Horman <horms+renesas@verge.net.au>2013-10-07 20:53:01 -0400
commit2238577b2c91587daf5f87ce414ef5b3703f81af (patch)
tree38ce96c6d9c772167aca8927a42cd22b16ced335 /arch/arm/mach-shmobile
parentf6ca6f11c921b227e33c5e91084be5ef30c32771 (diff)
ARM: shmobile: r8a7778: split r8a7778_init_irq_extpin() for DT
r8a7778 INTC needs IRL pin mode settings to determine behavior of IRQ0 - IRQ3, and r8a7778_init_irq_extpin() is controlling it via irlm parameter. But this function registers renesas_intc_irqpin driver if irlm was set, and this value depends on platform. This is not good for DT. This patch splits r8a7778_init_irq_extpin() function into "mode settings" and "funtion register" parts. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r--arch/arm/mach-shmobile/include/mach/r8a7778.h1
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7778.c6
2 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7778.h b/arch/arm/mach-shmobile/include/mach/r8a7778.h
index 1d6fe973e8b4..dbe221a484d5 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7778.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7778.h
@@ -41,6 +41,7 @@ extern void r8a7778_init_delay(void);
41extern void r8a7778_init_irq_dt(void); 41extern void r8a7778_init_irq_dt(void);
42extern void r8a7778_clock_init(void); 42extern void r8a7778_clock_init(void);
43extern void r8a7778_init_irq_extpin(int irlm); 43extern void r8a7778_init_irq_extpin(int irlm);
44extern void r8a7778_init_irq_extpin_dt(int irlm);
44extern void r8a7778_pinmux_init(void); 45extern void r8a7778_pinmux_init(void);
45 46
46extern int r8a7778_usb_phy_power(bool enable); 47extern int r8a7778_usb_phy_power(bool enable);
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
index fa1b7e44a973..16d49aa8b5db 100644
--- a/arch/arm/mach-shmobile/setup-r8a7778.c
+++ b/arch/arm/mach-shmobile/setup-r8a7778.c
@@ -476,7 +476,7 @@ static struct resource irqpin_resources[] __initdata = {
476 DEFINE_RES_IRQ(gic_iid(0x3e)), /* IRQ3 */ 476 DEFINE_RES_IRQ(gic_iid(0x3e)), /* IRQ3 */
477}; 477};
478 478
479void __init r8a7778_init_irq_extpin(int irlm) 479void __init r8a7778_init_irq_extpin_dt(int irlm)
480{ 480{
481 void __iomem *icr0 = ioremap_nocache(0xfe780000, PAGE_SIZE); 481 void __iomem *icr0 = ioremap_nocache(0xfe780000, PAGE_SIZE);
482 unsigned long tmp; 482 unsigned long tmp;
@@ -494,7 +494,11 @@ void __init r8a7778_init_irq_extpin(int irlm)
494 tmp |= (1 << 21); /* LVLMODE = 1 */ 494 tmp |= (1 << 21); /* LVLMODE = 1 */
495 iowrite32(tmp, icr0); 495 iowrite32(tmp, icr0);
496 iounmap(icr0); 496 iounmap(icr0);
497}
497 498
499void __init r8a7778_init_irq_extpin(int irlm)
500{
501 r8a7778_init_irq_extpin_dt(irlm);
498 if (irlm) 502 if (irlm)
499 platform_device_register_resndata( 503 platform_device_register_resndata(
500 &platform_bus, "renesas_intc_irqpin", -1, 504 &platform_bus, "renesas_intc_irqpin", -1,