From: Huibin Hong Date: Thu, 4 May 2017 13:33:37 +0000 (+0800) Subject: rk_fiq_debugger: remove "read signal irq from dts directly" X-Git-Tag: release-20171130_firefly~4^2~641 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cf5579f97d792305b2d270126a552913b9f9e3e1;p=firefly-linux-kernel-4.4.55.git rk_fiq_debugger: remove "read signal irq from dts directly" Change-Id: I1f531ce2f58b33d5501f8446ad393e7ac4f27ef0 Signed-off-by: Huibin Hong --- diff --git a/drivers/soc/rockchip/rk_fiq_debugger.c b/drivers/soc/rockchip/rk_fiq_debugger.c index d8777bcf3d71..db1e784eea11 100755 --- a/drivers/soc/rockchip/rk_fiq_debugger.c +++ b/drivers/soc/rockchip/rk_fiq_debugger.c @@ -544,7 +544,7 @@ static int __init rk_fiq_debugger_init(void) { void __iomem *base; struct device_node *np; unsigned int id, ok = 0; - int irq, signal_irq = 0, wake_irq = 0; + int irq, signal_irq = -1, wake_irq = -1; unsigned int baudrate = 0, irq_mode = 0; phys_addr_t phy_base = 0; int serial_id; @@ -571,10 +571,13 @@ static int __init rk_fiq_debugger_init(void) { if (of_property_read_u32(np, "rockchip,irq-mode-enable", &irq_mode)) irq_mode = -1; - if (irq_mode == 1) - signal_irq = -1; - else if (of_property_read_u32(np, "rockchip,signal-irq", &signal_irq)) + if (irq_mode == 1) { signal_irq = -1; + } else { + signal_irq = irq_of_parse_and_map(np, 0); + if (!signal_irq) + return -EINVAL; + } if (of_property_read_u32(np, "rockchip,wake-irq", &wake_irq)) wake_irq = -1; @@ -582,12 +585,6 @@ static int __init rk_fiq_debugger_init(void) { if (of_property_read_u32(np, "rockchip,baudrate", &baudrate)) baudrate = -1; - if (signal_irq > 0) { - signal_irq = irq_of_parse_and_map(np, 0); - if (!signal_irq) - return -EINVAL; - } - np = NULL; do {