summaryrefslogtreecommitdiff
path: root/arch/arm/mach-rockchip/rockchip.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2015-05-07 16:19:27 (GMT)
committerArnd Bergmann <arnd@arndb.de>2015-05-07 16:19:27 (GMT)
commitd6bcc8069b27090f7e5bbe0521774f11c68a7001 (patch)
treede8cc88628b8fb13fcb95fc4d2683317f16c0b43 /arch/arm/mach-rockchip/rockchip.c
parent5ebe6afaf0057ac3eaeb98defd5456894b446d22 (diff)
parent2a9fe3ca84afff6259820c4f62e579f41476becc (diff)
downloadlinux-d6bcc8069b27090f7e5bbe0521774f11c68a7001.tar.xz
Merge tag 'v4.1-rockchip-socfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into fixes
Merge "ARM: rockchip: some soc-level fixes for 4.1" from Heiko Stübner: Two fixes from Chris Zhong, fixing some suspend oddities. And I've given up on the timer7 issue. While I initially thought devices would either have both the grave mmu issue requiring a uboot update and the timer7 issue or none, it looks like in all units in the field the mmu issue got fixed while the timer7 issue stayed on. So instead of making everybody wanting to use mainline jump through a hoop just make sure timer7 is on on boot before we init the arch-timer. * tag 'v4.1-rockchip-socfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: rockchip: make sure timer7 is enabled on rk3288 platforms ARM: rockchip: fix undefined instruction of reset_ctrl_regs ARM: rockchip: disable dapswjdp during suspend
Diffstat (limited to 'arch/arm/mach-rockchip/rockchip.c')
-rw-r--r--arch/arm/mach-rockchip/rockchip.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mach-rockchip/rockchip.c b/arch/arm/mach-rockchip/rockchip.c
index d360ec0..b6cf3b4 100644
--- a/arch/arm/mach-rockchip/rockchip.c
+++ b/arch/arm/mach-rockchip/rockchip.c
@@ -30,11 +30,30 @@
#include "pm.h"
#define RK3288_GRF_SOC_CON0 0x244
+#define RK3288_TIMER6_7_PHYS 0xff810000
static void __init rockchip_timer_init(void)
{
if (of_machine_is_compatible("rockchip,rk3288")) {
struct regmap *grf;
+ void __iomem *reg_base;
+
+ /*
+ * Most/all uboot versions for rk3288 don't enable timer7
+ * which is needed for the architected timer to work.
+ * So make sure it is running during early boot.
+ */
+ reg_base = ioremap(RK3288_TIMER6_7_PHYS, SZ_16K);
+ if (reg_base) {
+ writel(0, reg_base + 0x30);
+ writel(0xffffffff, reg_base + 0x20);
+ writel(0xffffffff, reg_base + 0x24);
+ writel(1, reg_base + 0x30);
+ dsb();
+ iounmap(reg_base);
+ } else {
+ pr_err("rockchip: could not map timer7 registers\n");
+ }
/*
* Disable auto jtag/sdmmc switching that causes issues