aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-04-22 17:26:42 -0400
committerJason Cooper <jason@lakedaemon.net>2014-04-26 15:45:28 -0400
commit19e00f20e90e349cdeef3d7b63e6179215c9ff9d (patch)
treed97f2f3c90c5fbeae3dc4209738d7ac9c621139c
parent880ff3e2255c05bac0d2010719da42a26fdbb185 (diff)
ARM: orion: remove no longer needed gpio DT code
Following the move to pure DT-based probing of the GPIO controllers on Orion5x, some code in plat-orion/orion-gpio.c can be removed as it is no longer used. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Link: https://lkml.kernel.org/r/1398202002-28530-39-git-send-email-thomas.petazzoni@free-electrons.com Signed-off-by: Jason Cooper <jason@lakedaemon.net>
-rw-r--r--arch/arm/plat-orion/gpio.c48
-rw-r--r--arch/arm/plat-orion/include/plat/orion-gpio.h1
2 files changed, 0 insertions, 49 deletions
diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c
index 6816192a7561..b61a3bcc2fa8 100644
--- a/arch/arm/plat-orion/gpio.c
+++ b/arch/arm/plat-orion/gpio.c
@@ -597,51 +597,3 @@ void __init orion_gpio_init(struct device_node *np,
597 597
598 orion_gpio_chip_count++; 598 orion_gpio_chip_count++;
599} 599}
600
601#ifdef CONFIG_OF
602static void __init orion_gpio_of_init_one(struct device_node *np,
603 int irq_gpio_base)
604{
605 int ngpio, gpio_base, mask_offset;
606 void __iomem *base;
607 int ret, i;
608 int irqs[4];
609 int secondary_irq_base;
610
611 ret = of_property_read_u32(np, "ngpio", &ngpio);
612 if (ret)
613 goto out;
614 ret = of_property_read_u32(np, "mask-offset", &mask_offset);
615 if (ret == -EINVAL)
616 mask_offset = 0;
617 else
618 goto out;
619 base = of_iomap(np, 0);
620 if (!base)
621 goto out;
622
623 secondary_irq_base = irq_gpio_base + (32 * orion_gpio_chip_count);
624 gpio_base = 32 * orion_gpio_chip_count;
625
626 /* Get the interrupt numbers. Each chip can have up to 4
627 * interrupt handlers, with each handler dealing with 8 GPIO
628 * pins. */
629
630 for (i = 0; i < 4; i++)
631 irqs[i] = irq_of_parse_and_map(np, i);
632
633 orion_gpio_init(np, gpio_base, ngpio, base, mask_offset,
634 secondary_irq_base, irqs);
635 return;
636out:
637 pr_err("%s: %s: missing mandatory property\n", __func__, np->name);
638}
639
640void __init orion_gpio_of_init(int irq_gpio_base)
641{
642 struct device_node *np;
643
644 for_each_compatible_node(np, NULL, "marvell,orion-gpio")
645 orion_gpio_of_init_one(np, irq_gpio_base);
646}
647#endif
diff --git a/arch/arm/plat-orion/include/plat/orion-gpio.h b/arch/arm/plat-orion/include/plat/orion-gpio.h
index 614dcac9dc52..e763988b04b9 100644
--- a/arch/arm/plat-orion/include/plat/orion-gpio.h
+++ b/arch/arm/plat-orion/include/plat/orion-gpio.h
@@ -33,5 +33,4 @@ void __init orion_gpio_init(struct device_node *np,
33 int secondary_irq_base, 33 int secondary_irq_base,
34 int irq[4]); 34 int irq[4]);
35 35
36void __init orion_gpio_of_init(int irq_gpio_base);
37#endif 36#endif