diff options
author | Fabio Estevam <fabio.estevam@nxp.com> | 2017-11-23 10:55:33 -0200 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2017-11-27 10:34:49 +0100 |
commit | e2162d709f9c0f7d8b781cad849cdb2f2cc6efa8 (patch) | |
tree | afa151dd01fedad2510dab6ac975d6398900ecba | |
parent | b42287f4c92517022ab4e9a21ed27b9384c725cb (diff) | |
download | u-boot-e2162d709f9c0f7d8b781cad849cdb2f2cc6efa8.tar.gz |
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 <fabio.estevam@nxp.com>
-rw-r--r-- | arch/arm/include/asm/mach-imx/sys_proto.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/init.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-imx/mx6/soc.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/mx7/soc.c | 2 |
4 files changed, 8 insertions, 8 deletions
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(); |