diff mbox

[U-Boot,v3,09/15] imx: mx6ul update soc related settings

Message ID 1437391715-1344-10-git-send-email-Peng.Fan@freescale.com
State Awaiting Upstream
Delegated to: Stefano Babic
Headers show

Commit Message

Peng Fan July 20, 2015, 11:28 a.m. UTC
1.Update WDOG settings.
2.No need to gate/ungate all PFDs for i.MX6UL.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
---

Changes v3:
 none

Changes v2:
 runtime check for wdog part.

 arch/arm/cpu/armv7/mx6/soc.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Comments

Stefano Babic Aug. 2, 2015, 9:17 a.m. UTC | #1
On 20/07/2015 13:28, Peng Fan wrote:
> 1.Update WDOG settings.
> 2.No need to gate/ungate all PFDs for i.MX6UL.
> 
> Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
> Signed-off-by: Ye.Li <B37916@freescale.com>
> ---
> 
> Changes v3:
>  none
> 
> Changes v2:
>  runtime check for wdog part.
> 
>  arch/arm/cpu/armv7/mx6/soc.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
> index e80c09c..033f9de 100644
> --- a/arch/arm/cpu/armv7/mx6/soc.c
> +++ b/arch/arm/cpu/armv7/mx6/soc.c
> @@ -316,11 +316,10 @@ static void imx_set_wdog_powerdown(bool enable)
>  {
>  	struct wdog_regs *wdog1 = (struct wdog_regs *)WDOG1_BASE_ADDR;
>  	struct wdog_regs *wdog2 = (struct wdog_regs *)WDOG2_BASE_ADDR;
> -
> -#ifdef CONFIG_MX6SX
>  	struct wdog_regs *wdog3 = (struct wdog_regs *)WDOG3_BASE_ADDR;
> -	writew(enable, &wdog3->wmcr);
> -#endif
> +
> +	if (is_cpu_type(MXC_CPU_MX6SX) || is_cpu_type(MXC_CPU_MX6UL))
> +		writew(enable, &wdog3->wmcr);
>  
>  	/* Write to the PDE (Power Down Enable) bit */
>  	writew(enable, &wdog1->wmcr);
> @@ -530,7 +529,7 @@ void s_init(void)
>  	u32 mask528;
>  	u32 reg, periph1, periph2;
>  
> -	if (is_cpu_type(MXC_CPU_MX6SX))
> +	if (is_cpu_type(MXC_CPU_MX6SX) || is_cpu_type(MXC_CPU_MX6UL))
>  		return;
>  
>  	/* Due to hardware limitation, on MX6Q we need to gate/ungate all PFDs
> 

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic
diff mbox

Patch

diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
index e80c09c..033f9de 100644
--- a/arch/arm/cpu/armv7/mx6/soc.c
+++ b/arch/arm/cpu/armv7/mx6/soc.c
@@ -316,11 +316,10 @@  static void imx_set_wdog_powerdown(bool enable)
 {
 	struct wdog_regs *wdog1 = (struct wdog_regs *)WDOG1_BASE_ADDR;
 	struct wdog_regs *wdog2 = (struct wdog_regs *)WDOG2_BASE_ADDR;
-
-#ifdef CONFIG_MX6SX
 	struct wdog_regs *wdog3 = (struct wdog_regs *)WDOG3_BASE_ADDR;
-	writew(enable, &wdog3->wmcr);
-#endif
+
+	if (is_cpu_type(MXC_CPU_MX6SX) || is_cpu_type(MXC_CPU_MX6UL))
+		writew(enable, &wdog3->wmcr);
 
 	/* Write to the PDE (Power Down Enable) bit */
 	writew(enable, &wdog1->wmcr);
@@ -530,7 +529,7 @@  void s_init(void)
 	u32 mask528;
 	u32 reg, periph1, periph2;
 
-	if (is_cpu_type(MXC_CPU_MX6SX))
+	if (is_cpu_type(MXC_CPU_MX6SX) || is_cpu_type(MXC_CPU_MX6UL))
 		return;
 
 	/* Due to hardware limitation, on MX6Q we need to gate/ungate all PFDs