From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vlad Zakharov Date: Wed, 8 Feb 2017 11:24:31 +0300 Subject: [U-Boot] [PATCH v2 0/3] arc: introduce timer driver and update device tree Message-ID: <1486542274-26536-1-git-send-email-vzakhar@synopsys.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de ARC cores may have up to 2 built-in timers: timer0 and timer1, usually at least one of them exists. They both are driven by the same core clock. They are controlled through auxiliary registers and so we don't have to remap their control registers as we used to do with MMIO registers of external peripheral devices. This patch series replaces legacy approach to access ARC timer via specific code in "arch/arc/lib/time.c" and uses timer driver instead. We want to have common device tree blobs for both Linux and U-Boot. To achieve this the patch updates arc device trees with the following: 1. Separate axs10x.dts device tree in order to reflect the real structure of AXS101 and AXS103 development boards. 2. Add timer device to skeleton ARC device tree. 3. Add core_clk devices to all ARC boards as it is referenced from timer device. --- Changes v1..v2: - Minor cleanups of code - Added comments that describe why code is duplicated in arc_timer_probe Vlad Zakharov (3): drivers: timer: Introduce ARC timer driver arc: dts: separate single axs10x.dts file arc: use timer driver for ARC boards arch/Kconfig | 3 + arch/arc/Kconfig | 9 ++- arch/arc/dts/Makefile | 3 +- arch/arc/dts/abilis_tb100.dts | 12 +++- arch/arc/dts/axc001.dtsi | 19 +++++ arch/arc/dts/axc003.dtsi | 19 +++++ arch/arc/dts/axs101.dts | 19 +++++ arch/arc/dts/axs103.dts | 19 +++++ arch/arc/dts/axs10x.dts | 57 --------------- arch/arc/dts/axs10x_mb.dtsi | 66 +++++++++++++++++ arch/arc/dts/nsim.dts | 12 +++- arch/arc/dts/skeleton.dtsi | 19 ++++- arch/arc/include/asm/arcregs.h | 4 ++ board/synopsys/axs10x/Kconfig | 2 +- configs/axs101_defconfig | 4 +- configs/axs103_defconfig | 3 +- doc/device-tree-bindings/timer/arc_timer.txt | 24 +++++++ drivers/timer/Kconfig | 9 +++ drivers/timer/Makefile | 1 + drivers/timer/arc_timer.c | 103 +++++++++++++++++++++++++++ include/configs/axs10x.h | 2 - include/configs/nsim.h | 5 -- include/configs/tb100.h | 5 -- 23 files changed, 334 insertions(+), 85 deletions(-) create mode 100644 arch/arc/dts/axc001.dtsi create mode 100644 arch/arc/dts/axc003.dtsi create mode 100644 arch/arc/dts/axs101.dts create mode 100644 arch/arc/dts/axs103.dts delete mode 100644 arch/arc/dts/axs10x.dts create mode 100644 arch/arc/dts/axs10x_mb.dtsi create mode 100644 doc/device-tree-bindings/timer/arc_timer.txt create mode 100644 drivers/timer/arc_timer.c -- 2.7.4