]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: nomadik: move remaining PrimeCells to device tree
authorLinus Walleij <linus.walleij@linaro.org>
Sat, 5 Jan 2013 09:38:57 +0000 (10:38 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 28 Jan 2013 22:23:54 +0000 (23:23 +0100)
The two remaining PrimeCells, RNG and RTC, are migrated to the
device tree for device tree boot.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
arch/arm/boot/dts/ste-nomadik-stn8815.dtsi
arch/arm/mach-nomadik/cpu-8815.c

index 0a5b670430def8cafc9182c3d98625278f87daea..88fb98f910cf29cff18a452b442ef0137e363f5b 100644 (file)
                        interrupts = <28>;
                        status = "disabled";
                };
+
+               rng: rng@101b0000 {
+                       compatible = "arm,primecell";
+                       reg = <0x101b0000 0x1000>;
+               };
+
+               rtc: rtc@101e8000 {
+                       compatible = "arm,pl031", "arm,primecell";
+                       reg = <0x101e8000 0x1000>;
+                       interrupt-parent = <&vica>;
+                       interrupts = <10>;
+               };
        };
 };
index 0114d4f878a18e5a2ade985699cd501aaa737626..8d071d2769b5f5c52880fbfee3a462c609d0dfbb 100644 (file)
@@ -39,6 +39,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/time.h>
+#include <asm/mach-types.h>
 
 #include <asm/cacheflush.h>
 #include <asm/hardware/cache-l2x0.h>
@@ -154,8 +155,10 @@ static int __init cpu8815_init(void)
        cpu8815_add_gpios(cpu8815_gpio_base, ARRAY_SIZE(cpu8815_gpio_base),
                          IRQ_GPIO0, &pdata);
        cpu8815_add_pinctrl(NULL, "pinctrl-stn8815");
-       amba_apb_device_add(NULL, "rng", NOMADIK_RNG_BASE, SZ_4K, 0, 0, NULL, 0);
-       amba_apb_device_add(NULL, "rtc-pl031", NOMADIK_RTC_BASE, SZ_4K, IRQ_RTC_RTT, 0, NULL, 0);
+       if (machine_is_nomadik()) {
+               amba_apb_device_add(NULL, "rng", NOMADIK_RNG_BASE, SZ_4K, 0, 0, NULL, 0);
+               amba_apb_device_add(NULL, "rtc-pl031", NOMADIK_RTC_BASE, SZ_4K, IRQ_RTC_RTT, 0, NULL, 0);
+       }
        return 0;
 }
 arch_initcall(cpu8815_init);
@@ -252,6 +255,10 @@ static struct of_dev_auxdata cpu8815_auxdata_lookup[] __initdata = {
                "uart0", NULL),
        OF_DEV_AUXDATA("arm,primecell", NOMADIK_UART1_BASE,
                "uart1", NULL),
+       OF_DEV_AUXDATA("arm,primecell", NOMADIK_RNG_BASE,
+               "rng", NULL),
+       OF_DEV_AUXDATA("arm,primecell", NOMADIK_RTC_BASE,
+               "rtc-pl031", NULL),
        { /* sentinel */ },
 };