Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1226899
| From | Xing Zheng <zhengxing@rock-chips.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 7/9] rockchip: make sure timer5 is enabled on rk3036 platforms |
| Date | 2015-09-17 12:40 +0200 |
| Message-ID | <q9ELE-TQ-29@gated-at.bofh.it> (permalink) |
| References | <q9CTv-6sU-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The timer5 supplies the architected timer and thus as has to run when
the system clocksource and clockevents drivers are registered.
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
---
Changes in v2: None
arch/arm/mach-rockchip/rockchip.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/arch/arm/mach-rockchip/rockchip.c b/arch/arm/mach-rockchip/rockchip.c
index b6cf3b4..937047f 100644
--- a/arch/arm/mach-rockchip/rockchip.c
+++ b/arch/arm/mach-rockchip/rockchip.c
@@ -32,6 +32,8 @@
#define RK3288_GRF_SOC_CON0 0x244
#define RK3288_TIMER6_7_PHYS 0xff810000
+#define RK3036_TIMER5_PHYS 0x200440a0
+
static void __init rockchip_timer_init(void)
{
if (of_machine_is_compatible("rockchip,rk3288")) {
@@ -64,6 +66,25 @@ static void __init rockchip_timer_init(void)
regmap_write(grf, RK3288_GRF_SOC_CON0, 0x10000000);
else
pr_err("rockchip: could not get grf syscon\n");
+ } else if (of_machine_is_compatible("rockchip,rk3036")) {
+ void __iomem *reg_base;
+
+ /*
+ * Most/all uboot versions for rk3036 don't enable timer5
+ * which is needed for the architected timer to work.
+ * So make sure it is running during early boot.
+ */
+ reg_base = ioremap(RK3036_TIMER5_PHYS, SZ_16K);
+ if (reg_base) {
+ writel(0, reg_base + 0x10);
+ writel(0xffffffff, reg_base);
+ writel(0xffffffff, reg_base + 0x04);
+ writel(1, reg_base + 0x10);
+ dsb();
+ iounmap(reg_base);
+ } else {
+ pr_err("rockchip: could not map timer5 registers\n");
+ }
}
of_clk_init(NULL);
@@ -79,6 +100,7 @@ static void __init rockchip_dt_init(void)
static const char * const rockchip_board_dt_compat[] = {
"rockchip,rk2928",
+ "rockchip,rk3036",
"rockchip,rk3066a",
"rockchip,rk3066b",
"rockchip,rk3188",
--
1.7.9.5
--
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/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/9] Build and support rk3036 SoC platform Xing Zheng <zhengxing@rock-chips.com> - 2015-09-17 10:40 +0200
[PATCH v2 1/9] ARM: dts: rockchip: add core rk3036 dts Xing Zheng <zhengxing@rock-chips.com> - 2015-09-17 10:40 +0200
Re: [PATCH v2 1/9] ARM: dts: rockchip: add core rk3036 dts Heiko Stübner <heiko@sntech.de> - 2015-09-17 11:20 +0200
[PATCH v2 3/9] clk: rockchip: add clock controller for rk3036 Xing Zheng <zhengxing@rock-chips.com> - 2015-09-17 10:40 +0200
Re: [PATCH v2 3/9] clk: rockchip: add clock controller for rk3036 Heiko Stübner <heiko@sntech.de> - 2015-09-17 11:50 +0200
[PATCH v2 2/9] clk: rockchip: add dt-binding header for rk3036 Xing Zheng <zhengxing@rock-chips.com> - 2015-09-17 10:40 +0200
Re: [PATCH v2 2/9] clk: rockchip: add dt-binding header for rk3036 Heiko Stübner <heiko@sntech.de> - 2015-09-17 11:30 +0200
Re: [PATCH v2 0/9] Build and support rk3036 SoC platform Heiko Stübner <heiko@sntech.de> - 2015-09-17 12:00 +0200
[PATCH v2 8/9] ARM: rockchip: add support smp for rk3036 Xing Zheng <zhengxing@rock-chips.com> - 2015-09-17 12:40 +0200
Re: [PATCH v2 8/9] ARM: rockchip: add support smp for rk3036 Heiko Stübner <heiko@sntech.de> - 2015-09-17 22:20 +0200
[PATCH v2 6/9] pinctrl: rockchip: add support for the rk3036 Xing Zheng <zhengxing@rock-chips.com> - 2015-09-17 12:40 +0200
Re: [PATCH v2 6/9] pinctrl: rockchip: add support for the rk3036 Heiko Stübner <heiko@sntech.de> - 2015-09-17 14:50 +0200
[PATCH v2 7/9] rockchip: make sure timer5 is enabled on rk3036 platforms Xing Zheng <zhengxing@rock-chips.com> - 2015-09-17 12:40 +0200
Re: [PATCH v2 7/9] rockchip: make sure timer5 is enabled on rk3036 platforms Heiko Stübner <heiko@sntech.de> - 2015-09-17 17:10 +0200
[PATCH v2 9/9] rtc: hym8563: make sure hym8563 can be normal work Xing Zheng <zhengxing@rock-chips.com> - 2015-09-17 12:40 +0200
Re: [PATCH v2 9/9] rtc: hym8563: make sure hym8563 can be normal work Heiko Stübner <heiko@sntech.de> - 2015-09-17 14:10 +0200
Re: [PATCH v2 9/9] rtc: hym8563: make sure hym8563 can be normal work Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2015-09-17 14:40 +0200
Re: [PATCH v2 9/9] rtc: hym8563: make sure hym8563 can be normal work Xing Zheng <zhengxing@rock-chips.com> - 2015-09-17 15:00 +0200
[PATCH v2 5/9] dt-bindings: add documentation of rk3036 clock controller Xing Zheng <zhengxing@rock-chips.com> - 2015-09-17 12:40 +0200
Re: [PATCH v2 5/9] dt-bindings: add documentation of rk3036 clock controller Heiko Stübner <heiko@sntech.de> - 2015-09-17 17:20 +0200
csiph-web