From f5076f869855045e527de7f1367c65f55a2b1448 Mon Sep 17 00:00:00 2001 From: rick Date: Wed, 17 May 2017 10:59:20 +0800 Subject: nds32: Support AG101P timer DM. Support AG101P timer device tree flow. Signed-off-by: rick --- arch/nds32/cpu/n1213/ag101/timer.c | 3 ++- arch/nds32/dts/ag101p.dts | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/nds32/cpu/n1213/ag101/timer.c b/arch/nds32/cpu/n1213/ag101/timer.c index 758b354..0c03a10 100644 --- a/arch/nds32/cpu/n1213/ag101/timer.c +++ b/arch/nds32/cpu/n1213/ag101/timer.c @@ -8,7 +8,7 @@ * * SPDX-License-Identifier: GPL-2.0+ */ - +#ifndef CONFIG_TIMER #include #include #include @@ -189,3 +189,4 @@ ulong get_tbclk(void) return CONFIG_SYS_CLK_FREQ; #endif } +#endif /* CONFIG_TIMER */ diff --git a/arch/nds32/dts/ag101p.dts b/arch/nds32/dts/ag101p.dts index 2baa3dc..91314b5 100644 --- a/arch/nds32/dts/ag101p.dts +++ b/arch/nds32/dts/ag101p.dts @@ -13,6 +13,7 @@ /* bootargs = "console=ttyS0,38400n8 earlyprintk=uart8250-32bit,0x99600000 debug bootmem_debug memblock=debug loglevel=7"; */ bootargs = "console=ttyS0,38400n8 earlyprintk=uart8250-32bit,0x99600000 debug loglevel=7"; stdout-path = "uart0:38400n8"; + tick-timer = &timer0; }; memory@0 { @@ -46,4 +47,11 @@ no-loopback-test = <1>; }; + timer0: timer@98400000 { + compatible = "andestech,attmr010"; + reg = <0x98400000 0x1000>; + interrupts = <19 4>; + clock-frequency = <15000000>; + }; + }; -- cgit v1.1