Merge branches 'arm', 'at91', 'bcmring', 'ep93xx', 'mach-types', 'misc' and 'w90x900...
[firefly-linux-kernel-4.4.55.git] / arch / arm / mach-ep93xx / include / mach / system.h
index ed8f35e4f068f29c6c6c39934cded13712108d88..6d661fe9d66c00d05ec8a8f61581206a007b6646 100644 (file)
@@ -11,15 +11,13 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-       u32 devicecfg;
-
        local_irq_disable();
 
-       devicecfg = __raw_readl(EP93XX_SYSCON_DEVICE_CONFIG);
-       __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK);
-       __raw_writel(devicecfg | 0x80000000, EP93XX_SYSCON_DEVICE_CONFIG);
-       __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK);
-       __raw_writel(devicecfg & ~0x80000000, EP93XX_SYSCON_DEVICE_CONFIG);
+       /*
+        * Set then clear the SWRST bit to initiate a software reset
+        */
+       ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_SWRST);
+       ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_SWRST);
 
        while (1)
                ;