diff mbox

[U-Boot,v3,05/15] imx-common: timer: add i.MX6UL support

Message ID 1437391715-1344-6-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
Add i.MX6UL GPT timer support.

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

Changes v3:
 none

Changes v2:
 system counter patch is removed. Now, defaut use gpt.

 arch/arm/imx-common/timer.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Comments

Stefano Babic Aug. 2, 2015, 9:16 a.m. UTC | #1
On 20/07/2015 13:28, Peng Fan wrote:
> Add i.MX6UL GPT timer support.
> 
> Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
> ---
> 
> Changes v3:
>  none
> 
> Changes v2:
>  system counter patch is removed. Now, defaut use gpt.
> 
>  arch/arm/imx-common/timer.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/imx-common/timer.c b/arch/arm/imx-common/timer.c
> index c12556a..1a88ce6 100644
> --- a/arch/arm/imx-common/timer.c
> +++ b/arch/arm/imx-common/timer.c
> @@ -45,7 +45,8 @@ static inline int gpt_has_clk_source_osc(void)
>  #if defined(CONFIG_MX6)
>  	if (((is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D)) &&
>  	    (soc_rev() > CHIP_REV_1_0)) || is_cpu_type(MXC_CPU_MX6DL) ||
> -	     is_cpu_type(MXC_CPU_MX6SOLO) || is_cpu_type(MXC_CPU_MX6SX))
> +	     is_cpu_type(MXC_CPU_MX6SOLO) || is_cpu_type(MXC_CPU_MX6SX) ||
> +	     is_cpu_type(MXC_CPU_MX6UL))
>  		return 1;
>  
>  	return 0;
> @@ -103,10 +104,11 @@ int timer_init(void)
>  	if (gpt_has_clk_source_osc()) {
>  		i |= GPTCR_CLKSOURCE_OSC | GPTCR_TEN;
>  
> -		/* For DL/S, SX, set 24Mhz OSC Enable bit and prescaler */
> +		/* For DL/S, SX, UL, set 24Mhz OSC Enable bit and prescaler */
>  		if (is_cpu_type(MXC_CPU_MX6DL) ||
>  		    is_cpu_type(MXC_CPU_MX6SOLO) ||
> -		    is_cpu_type(MXC_CPU_MX6SX)) {
> +		    is_cpu_type(MXC_CPU_MX6SX) ||
> +		    is_cpu_type(MXC_CPU_MX6UL)) {
>  			i |= GPTCR_24MEN;
>  
>  			/* Produce 3Mhz clock */
> 

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic
diff mbox

Patch

diff --git a/arch/arm/imx-common/timer.c b/arch/arm/imx-common/timer.c
index c12556a..1a88ce6 100644
--- a/arch/arm/imx-common/timer.c
+++ b/arch/arm/imx-common/timer.c
@@ -45,7 +45,8 @@  static inline int gpt_has_clk_source_osc(void)
 #if defined(CONFIG_MX6)
 	if (((is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D)) &&
 	    (soc_rev() > CHIP_REV_1_0)) || is_cpu_type(MXC_CPU_MX6DL) ||
-	     is_cpu_type(MXC_CPU_MX6SOLO) || is_cpu_type(MXC_CPU_MX6SX))
+	     is_cpu_type(MXC_CPU_MX6SOLO) || is_cpu_type(MXC_CPU_MX6SX) ||
+	     is_cpu_type(MXC_CPU_MX6UL))
 		return 1;
 
 	return 0;
@@ -103,10 +104,11 @@  int timer_init(void)
 	if (gpt_has_clk_source_osc()) {
 		i |= GPTCR_CLKSOURCE_OSC | GPTCR_TEN;
 
-		/* For DL/S, SX, set 24Mhz OSC Enable bit and prescaler */
+		/* For DL/S, SX, UL, set 24Mhz OSC Enable bit and prescaler */
 		if (is_cpu_type(MXC_CPU_MX6DL) ||
 		    is_cpu_type(MXC_CPU_MX6SOLO) ||
-		    is_cpu_type(MXC_CPU_MX6SX)) {
+		    is_cpu_type(MXC_CPU_MX6SX) ||
+		    is_cpu_type(MXC_CPU_MX6UL)) {
 			i |= GPTCR_24MEN;
 
 			/* Produce 3Mhz clock */