提交 2238577b 编写于 作者: K Kuninori Morimoto 提交者: Simon Horman

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: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: NSimon Horman <horms+renesas@verge.net.au>
上级 f6ca6f11
...@@ -41,6 +41,7 @@ extern void r8a7778_init_delay(void); ...@@ -41,6 +41,7 @@ extern void r8a7778_init_delay(void);
extern void r8a7778_init_irq_dt(void); extern void r8a7778_init_irq_dt(void);
extern void r8a7778_clock_init(void); extern void r8a7778_clock_init(void);
extern void r8a7778_init_irq_extpin(int irlm); extern void r8a7778_init_irq_extpin(int irlm);
extern void r8a7778_init_irq_extpin_dt(int irlm);
extern void r8a7778_pinmux_init(void); extern void r8a7778_pinmux_init(void);
extern int r8a7778_usb_phy_power(bool enable); extern int r8a7778_usb_phy_power(bool enable);
......
...@@ -476,7 +476,7 @@ static struct resource irqpin_resources[] __initdata = { ...@@ -476,7 +476,7 @@ static struct resource irqpin_resources[] __initdata = {
DEFINE_RES_IRQ(gic_iid(0x3e)), /* IRQ3 */ DEFINE_RES_IRQ(gic_iid(0x3e)), /* IRQ3 */
}; };
void __init r8a7778_init_irq_extpin(int irlm) void __init r8a7778_init_irq_extpin_dt(int irlm)
{ {
void __iomem *icr0 = ioremap_nocache(0xfe780000, PAGE_SIZE); void __iomem *icr0 = ioremap_nocache(0xfe780000, PAGE_SIZE);
unsigned long tmp; unsigned long tmp;
...@@ -494,7 +494,11 @@ void __init r8a7778_init_irq_extpin(int irlm) ...@@ -494,7 +494,11 @@ void __init r8a7778_init_irq_extpin(int irlm)
tmp |= (1 << 21); /* LVLMODE = 1 */ tmp |= (1 << 21); /* LVLMODE = 1 */
iowrite32(tmp, icr0); iowrite32(tmp, icr0);
iounmap(icr0); iounmap(icr0);
}
void __init r8a7778_init_irq_extpin(int irlm)
{
r8a7778_init_irq_extpin_dt(irlm);
if (irlm) if (irlm)
platform_device_register_resndata( platform_device_register_resndata(
&platform_bus, "renesas_intc_irqpin", -1, &platform_bus, "renesas_intc_irqpin", -1,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册