Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964776AbbBBIbK (ORCPT ); Mon, 2 Feb 2015 03:31:10 -0500 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:21910 "EHLO mx0a-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932832AbbBBIbA (ORCPT ); Mon, 2 Feb 2015 03:31:00 -0500 From: Chao Xie To: , , , , , , Subject: [PATCH 3/4] arm: mmp: make SOCes with DT use new timer driver Date: Mon, 2 Feb 2015 16:31:38 +0800 Message-ID: <1422865899-8152-4-git-send-email-chao.xie@marvell.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1422865899-8152-1-git-send-email-chao.xie@marvell.com> References: <1422865899-8152-1-git-send-email-chao.xie@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-02-02_01:2015-01-30,2015-02-01,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1502020092 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5633 Lines: 187 From: Chao Xie Change the dtsi and DT support for mmp SOCes to make them use the new timer driver. Signed-off-by: Chao Xie --- arch/arm/boot/dts/mmp2.dtsi | 19 ++++++++++++++++--- arch/arm/boot/dts/pxa168.dtsi | 20 +++++++++++++++++--- arch/arm/boot/dts/pxa910.dtsi | 26 ++++++++++++++++---------- arch/arm/mach-mmp/Kconfig | 2 ++ arch/arm/mach-mmp/mmp-dt.c | 4 +++- arch/arm/mach-mmp/mmp2-dt.c | 4 +++- 6 files changed, 57 insertions(+), 18 deletions(-) diff --git a/arch/arm/boot/dts/mmp2.dtsi b/arch/arm/boot/dts/mmp2.dtsi index 766bbb8..e63e3a3 100644 --- a/arch/arm/boot/dts/mmp2.dtsi +++ b/arch/arm/boot/dts/mmp2.dtsi @@ -127,9 +127,22 @@ ranges; timer0: timer@d4014000 { - compatible = "mrvl,mmp-timer"; - reg = <0xd4014000 0x100>; - interrupts = <13>; + compatible = "marvell,mmp-timer"; + reg = <0xd4014000 0xc8>; + clocks = <&soc_clocks MMP2_CLK_VCTCXO>, <&soc_clocks MMP2_CLK_TIMER>; + status = "okay"; + + counter0 { + compatible = "marvell,timer-counter-clkevt"; + interrupts = <13>; + marvell,timer-counter-id = <0>; + marvell,timer-counter-cpu = <0>; + }; + + counter1 { + compatible = "marvell,timer-counter-clksrc"; + marvell,timer-counter-id = <1>; + }; }; uart1: uart@d4030000 { diff --git a/arch/arm/boot/dts/pxa168.dtsi b/arch/arm/boot/dts/pxa168.dtsi index b899e25..5a2f385 100644 --- a/arch/arm/boot/dts/pxa168.dtsi +++ b/arch/arm/boot/dts/pxa168.dtsi @@ -51,9 +51,23 @@ ranges; timer0: timer@d4014000 { - compatible = "mrvl,mmp-timer"; - reg = <0xd4014000 0x100>; - interrupts = <13>; + compatible = "marvell,mmp-timer"; + reg = <0xd4014000 0xc8>; + clocks = <&soc_clocks PXA168_CLK_PLL1_24>, <&soc_clocks PXA168_CLK_TIMER>; + status = "okay"; + + counter0 { + compatible = "marvell,timer-counter-clkevt"; + interrupts = <13>; + marvell,timer-counter-id = <0>; + marvell,timer-counter-cpu = <0>; + }; + + counter1 { + compatible = "marvell,timer-counter-clksrc"; + marvell,timer-counter-id = <1>; + }; + }; uart1: uart@d4017000 { diff --git a/arch/arm/boot/dts/pxa910.dtsi b/arch/arm/boot/dts/pxa910.dtsi index 0868f67..beb25fc 100644 --- a/arch/arm/boot/dts/pxa910.dtsi +++ b/arch/arm/boot/dts/pxa910.dtsi @@ -56,16 +56,22 @@ ranges; timer0: timer@d4014000 { - compatible = "mrvl,mmp-timer"; - reg = <0xd4014000 0x100>; - interrupts = <13>; - }; - - timer1: timer@d4016000 { - compatible = "mrvl,mmp-timer"; - reg = <0xd4016000 0x100>; - interrupts = <29>; - status = "disabled"; + compatible = "marvell,mmp-timer"; + reg = <0xd4014000 0xc8>; + clocks = <&soc_clocks PXA910_CLK_PLL1_24>, <&soc_clocks PXA910_CLK_TIMER0>; + status = "okay"; + + counter0 { + compatible = "marvell,timer-counter-clkevt"; + interrupts = <13>; + marvell,timer-counter-id = <0>; + marvell,timer-counter-cpu = <0>; + }; + + counter1 { + compatible = "marvell,timer-counter-clksrc"; + marvell,timer-counter-id = <1>; + }; }; uart1: uart@d4017000 { diff --git a/arch/arm/mach-mmp/Kconfig b/arch/arm/mach-mmp/Kconfig index fdbfadf..4bbe202 100644 --- a/arch/arm/mach-mmp/Kconfig +++ b/arch/arm/mach-mmp/Kconfig @@ -87,6 +87,7 @@ config MACH_GPLUGD config MACH_MMP_DT bool "Support MMP (ARMv5) platforms from device tree" select USE_OF + select CLKSRC_OF select PINCTRL select PINCTRL_SINGLE select COMMON_CLK @@ -101,6 +102,7 @@ config MACH_MMP2_DT bool "Support MMP2 (ARMv7) platforms from device tree" depends on !CPU_MOHAWK select USE_OF + select CLKSRC_OF select PINCTRL select PINCTRL_SINGLE select COMMON_CLK diff --git a/arch/arm/mach-mmp/mmp-dt.c b/arch/arm/mach-mmp/mmp-dt.c index b2296c9..2e91871 100644 --- a/arch/arm/mach-mmp/mmp-dt.c +++ b/arch/arm/mach-mmp/mmp-dt.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -35,8 +36,9 @@ static void __init mmp_init_time(void) #ifdef CONFIG_CACHE_TAUROS2 tauros2_init(0); #endif - mmp_dt_init_timer(); of_clk_init(NULL); + /* Initialize timers. */ + clocksource_of_init(); } DT_MACHINE_START(PXA168_DT, "Marvell PXA168 (Device Tree Support)") diff --git a/arch/arm/mach-mmp/mmp2-dt.c b/arch/arm/mach-mmp/mmp2-dt.c index 998c0f5..a42d32e 100644 --- a/arch/arm/mach-mmp/mmp2-dt.c +++ b/arch/arm/mach-mmp/mmp2-dt.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -26,8 +27,9 @@ static void __init mmp_init_time(void) #ifdef CONFIG_CACHE_TAUROS2 tauros2_init(0); #endif - mmp_dt_init_timer(); of_clk_init(NULL); + /* Initialize timers. */ + clocksource_of_init(); } static const char *mmp2_dt_board_compat[] __initdata = { -- 1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/