ARM: tegra: Use readl/writel_relaxed for reset
authorColin Cross <ccross@android.com>
Wed, 2 Mar 2011 20:34:38 +0000 (12:34 -0800)
committerColin Cross <ccross@android.com>
Fri, 4 Mar 2011 02:53:08 +0000 (18:53 -0800)
tegra_assert_system_reset is called after the cache is disabled.
Calling writel will cause the PL310 store buffers to be drained,
which requires taking a spinlock.  Taking a spinlock is not safe
after the caches are disabled.  Convert to readl_relaxed and
writel_relaxed.

Change-Id: I6850179b931ca865580c0fd3fe003b46bdfa43ae
Signed-off-by: Colin Cross <ccross@android.com>
arch/arm/mach-tegra/include/mach/system.h

index 70c95ac93355db7727e9e0d3997dfb4edf654a8b..ccf371aefc9c8564549b6857c864f8fd83416655 100644 (file)
@@ -35,9 +35,9 @@ static inline void tegra_assert_system_reset(void)
        void __iomem *reset = IO_ADDRESS(TEGRA_CLK_RESET_BASE + 0x04);
        u32 reg;
 
-       reg = readl(reset);
+       reg = readl_relaxed(reset);
        reg |= 0x04;
-       writel(reg, reset);
+       writel_relaxed(reg, reset);
 }
 
 static inline void arch_reset(char mode, const char *cmd)