MIPS: Malta: Probe RTC via DT
authorPaul Burton <paul.burton@imgtec.com>
Mon, 19 Sep 2016 21:21:26 +0000 (22:21 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 6 Oct 2016 15:31:01 +0000 (17:31 +0200)
Add the DT node required to probe the RTC, and remove the platform code
that was previously doing it.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: linux-mips@linux-mips.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/14277/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/boot/dts/mti/malta.dts
arch/mips/mti-malta/malta-platform.c

index af765afce8251d0a2414d520fdfed56880ed9582..fecbca8ca691036e918b657844c43b7c8550a671 100644 (file)
                interrupt-parent = <&gic>;
                interrupts = <GIC_SHARED 3 IRQ_TYPE_LEVEL_HIGH>;
        };
+
+       isa {
+               compatible = "isa";
+               #address-cells = <2>;
+               #size-cells = <1>;
+               ranges = <1 0 0 0x1000>;
+
+               rtc@70 {
+                       compatible = "motorola,mc146818";
+                       reg = <1 0x70 0x8>;
+
+                       interrupt-parent = <&i8259>;
+                       interrupts = <8>;
+               };
+       };
 };
index 20a53e73b28ec3ce6de6ac3bfd02817df8b94c98..4e003b900fa2ee91f0f2eadb75066cca67be7fda 100644 (file)
@@ -23,7 +23,6 @@
  */
 #include <linux/init.h>
 #include <linux/serial_8250.h>
-#include <linux/mc146818rtc.h>
 #include <linux/module.h>
 #include <linux/irq.h>
 #include <linux/mtd/partitions.h>
@@ -68,25 +67,6 @@ static struct platform_device malta_uart8250_device = {
        },
 };
 
-struct resource malta_rtc_resources[] = {
-       {
-               .start  = RTC_PORT(0),
-               .end    = RTC_PORT(7),
-               .flags  = IORESOURCE_IO,
-       }, {
-               .start  = RTC_IRQ,
-               .end    = RTC_IRQ,
-               .flags  = IORESOURCE_IRQ,
-       }
-};
-
-static struct platform_device malta_rtc_device = {
-       .name           = "rtc_cmos",
-       .id             = -1,
-       .resource       = malta_rtc_resources,
-       .num_resources  = ARRAY_SIZE(malta_rtc_resources),
-};
-
 static struct mtd_partition malta_mtd_partitions[] = {
        {
                .name =         "YAMON",
@@ -129,7 +109,6 @@ static struct platform_device malta_flash_device = {
 
 static struct platform_device *malta_devices[] __initdata = {
        &malta_uart8250_device,
-       &malta_rtc_device,
        &malta_flash_device,
 };