]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: mach-shmobile: sh73a0: Setup the timer CMT10 using DT
authorBastian Hecht <hechtb@gmail.com>
Thu, 11 Apr 2013 11:24:01 +0000 (13:24 +0200)
committerSimon Horman <horms+renesas@verge.net.au>
Mon, 22 Apr 2013 05:52:00 +0000 (14:52 +0900)
We can now use the Device Tree for bringing up our timer device CMT10 on
the SoC sh73a0.

Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/boot/dts/sh73a0.dtsi
arch/arm/mach-shmobile/setup-sh73a0.c

index 7e71e3a8576707a0e2ffd23de35483174d54129a..82f16bf84780383fbce2e0fa0eede24109eb5cda 100644 (file)
                              0 189 0x4
                              0 190 0x4>;
        };
+
+       timer@e6138010 {
+               compatible = "renesas,cmt-timer";
+               interrupt-parent = <&gic>;
+               reg = <0xe6138010 0xc>;
+               interrupts = <0 65 0x4>;
+               renesas,device-id = <1>;
+               renesas,channel-id = <0>;
+               renesas,source-quality = <3>;
+               renesas,event-quality = <3>;
+       };
 };
index d10ded0e25954ad86a6e5d5ea26fa9627dbdb585..024b7a6ee28db4b1a54dd2d222e4f0c2d93223bc 100644 (file)
@@ -235,37 +235,6 @@ static struct platform_device scif8_device = {
        },
 };
 
-static struct sh_timer_config cmt10_platform_data = {
-       .name = "CMT10",
-       .channel_offset = 0x10,
-       .timer_bit = 0,
-       .clockevent_rating = 125,
-       .clocksource_rating = 125,
-};
-
-static struct resource cmt10_resources[] = {
-       [0] = {
-               .name   = "CMT10",
-               .start  = 0xe6138010,
-               .end    = 0xe613801b,
-               .flags  = IORESOURCE_MEM,
-       },
-       [1] = {
-               .start  = gic_spi(65),
-               .flags  = IORESOURCE_IRQ,
-       },
-};
-
-static struct platform_device cmt10_device = {
-       .name           = "sh_cmt",
-       .id             = 10,
-       .dev = {
-               .platform_data  = &cmt10_platform_data,
-       },
-       .resource       = cmt10_resources,
-       .num_resources  = ARRAY_SIZE(cmt10_resources),
-};
-
 /* TMU */
 static struct sh_timer_config tmu00_platform_data = {
        .name = "TMU00",
@@ -930,7 +899,6 @@ static struct platform_device *sh73a0_devices_dt[] __initdata = {
        &scif6_device,
        &scif7_device,
        &scif8_device,
-       &cmt10_device,
 };
 
 static struct platform_device *sh73a0_early_devices[] __initdata = {