Message ID | 1362742181-19111-6-git-send-email-hechtb+renesas@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Hi Bastian 1 question > 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> (snip) > /* TMU */ > static struct sh_timer_config tmu00_platform_data = { > .name = "TMU00", > @@ -913,7 +882,6 @@ static struct platform_device *sh73a0_devices_dt[] __initdata = { > &scif6_device, > &scif7_device, > &scif8_device, > - &cmt10_device, > }; I didn't test this patch, but setup-sh73a0.c :: sh73a0_devices_dt is used from sh73a0_add_standard_devices() or sh73a0_add_early_devices(), and it is used from board-kzm9g.c (not -reference.c). Does board-kzm9g.c still works ? Is it better that sh73a0_early_devices[] has it ? Best regards --- Kuninori Morimoto -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hello Morimoto-san! 2013/3/11 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>: > > Hi Bastian > > 1 question > >> 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> > (snip) >> /* TMU */ >> static struct sh_timer_config tmu00_platform_data = { >> .name = "TMU00", >> @@ -913,7 +882,6 @@ static struct platform_device *sh73a0_devices_dt[] __initdata = { >> &scif6_device, >> &scif7_device, >> &scif8_device, >> - &cmt10_device, >> }; > > I didn't test this patch, > but setup-sh73a0.c :: sh73a0_devices_dt is > used from sh73a0_add_standard_devices() or sh73a0_add_early_devices(), > and it is used from board-kzm9g.c (not -reference.c). > > Does board-kzm9g.c still works ? > Is it better that sh73a0_early_devices[] has it ? > As the timer devices have no board dependencies we can put them into the general sh73a0.dtsi and it works for the reference and no-reference case. Still - while rechecking it I discovered a small slip I made in my series. In 0003-Add OF to TMU I forgot 2 trivial lines. So thanks for asking ;) Cheers, Bastian > Best regards > --- > Kuninori Morimoto -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/arm/boot/dts/sh73a0.dtsi b/arch/arm/boot/dts/sh73a0.dtsi index 8a59465..6549d6c 100644 --- a/arch/arm/boot/dts/sh73a0.dtsi +++ b/arch/arm/boot/dts/sh73a0.dtsi @@ -97,4 +97,15 @@ 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>; + }; }; diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c index 95a75af..64bc2c5 100644 --- a/arch/arm/mach-shmobile/setup-sh73a0.c +++ b/arch/arm/mach-shmobile/setup-sh73a0.c @@ -247,37 +247,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", @@ -913,7 +882,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 = {
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> --- v2: - Moved the definition from the board .dts to the SoC .dtsi - Renamed cmt@0xe6138010 to timer@e6138010 arch/arm/boot/dts/sh73a0.dtsi | 11 +++++++++++ arch/arm/mach-shmobile/setup-sh73a0.c | 32 -------------------------------- 2 files changed, 11 insertions(+), 32 deletions(-)