ARM: OMAP2+: PRM: initialize en_uart4_mask and grpsel_uart4_mask
authorColin Ian King <colin.king@canonical.com>
Mon, 24 Oct 2016 11:00:21 +0000 (12:00 +0100)
committerTony Lindgren <tony@atomide.com>
Mon, 7 Nov 2016 23:21:53 +0000 (16:21 -0700)
In the case where has_uart4 is false, en_uart4_mask and grpsel_uart4_mask
are not initialized and so any garbage value is being logically or'd into
the write of PM_WKEN and OMAP3430_PM_MPUGRPSEL.  Fix this by initializing
these masks to zero.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/prm3xxx.c

index 62680aad212666af7f07131546ff1e9bc01c2572..718981bb80cdf594d77c6b0d5d5067c806729862 100644 (file)
@@ -319,6 +319,9 @@ void __init omap3_prm_init_pm(bool has_uart4, bool has_iva)
        if (has_uart4) {
                en_uart4_mask = OMAP3630_EN_UART4_MASK;
                grpsel_uart4_mask = OMAP3630_GRPSEL_UART4_MASK;
+       } else {
+               en_uart4_mask = 0;
+               grpsel_uart4_mask = 0;
        }
 
        /* Enable wakeups in PER */