From: Fabio Estevam Date: Thu, 23 Nov 2017 12:55:33 +0000 (-0200) Subject: imx: Remove boolean parameter from wdog powerdown function X-Git-Tag: v2018.01-rc1~66^2~10 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e2162d709f9c0f7d8b781cad849cdb2f2cc6efa8;p=u-boot imx: Remove boolean parameter from wdog powerdown function imx_set_wdog_powerdown() is always used to disable the power down enable bit, so remove the boolean parameter of the function. It is also a bit strange to write a boolean value into registers, so this new version makes explicit that we are writing 0. While at it, rename it to imx_wdog_disable_powerdown(). Signed-off-by: Fabio Estevam --- diff --git a/arch/arm/include/asm/mach-imx/sys_proto.h b/arch/arm/include/asm/mach-imx/sys_proto.h index 703634334f..a80a392a73 100644 --- a/arch/arm/include/asm/mach-imx/sys_proto.h +++ b/arch/arm/include/asm/mach-imx/sys_proto.h @@ -105,7 +105,7 @@ void set_chipselect_size(int const); void init_aips(void); void init_src(void); -void imx_set_wdog_powerdown(bool enable); +void imx_wdog_disable_powerdown(void); int board_mmc_get_env_dev(int devno); diff --git a/arch/arm/mach-imx/init.c b/arch/arm/mach-imx/init.c index 2a05c59642..0aa8295751 100644 --- a/arch/arm/mach-imx/init.c +++ b/arch/arm/mach-imx/init.c @@ -65,7 +65,7 @@ void init_aips(void) } } -void imx_set_wdog_powerdown(bool enable) +void imx_wdog_disable_powerdown(void) { struct wdog_regs *wdog1 = (struct wdog_regs *)WDOG1_BASE_ADDR; struct wdog_regs *wdog2 = (struct wdog_regs *)WDOG2_BASE_ADDR; @@ -75,13 +75,13 @@ void imx_set_wdog_powerdown(bool enable) #endif /* Write to the PDE (Power Down Enable) bit */ - writew(enable, &wdog1->wmcr); - writew(enable, &wdog2->wmcr); + writew(0, &wdog1->wmcr); + writew(0, &wdog2->wmcr); if (is_mx6sx() || is_mx6ul() || is_mx6ull() || is_mx7()) - writew(enable, &wdog3->wmcr); + writew(0, &wdog3->wmcr); #ifdef CONFIG_MX7D - writew(enable, &wdog4->wmcr); + writew(0, &wdog4->wmcr); #endif } diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c index ad72c12511..43cb58106b 100644 --- a/arch/arm/mach-imx/mx6/soc.c +++ b/arch/arm/mach-imx/mx6/soc.c @@ -436,7 +436,7 @@ int arch_cpu_init(void) if (is_mx6sl()) setbits_le32(&ccm->cscmr1, MXC_CCM_CSCMR1_PER_CLK_SEL_MASK); - imx_set_wdog_powerdown(false); /* Disable PDE bit of WMCR register */ + imx_wdog_disable_powerdown(); /* Disable PDE bit of WMCR register */ if (is_mx6sx()) setbits_le32(&ccm->cscdr1, MXC_CCM_CSCDR1_UART_CLK_SEL); diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c index 87bf105f38..d160e80146 100644 --- a/arch/arm/mach-imx/mx7/soc.c +++ b/arch/arm/mach-imx/mx7/soc.c @@ -236,7 +236,7 @@ int arch_cpu_init(void) init_csu(); /* Disable PDE bit of WMCR register */ - imx_set_wdog_powerdown(false); + imx_wdog_disable_powerdown(); imx_enet_mdio_fixup();