Selaa lähdekoodia

imx: timer: update gpt driver for i.MX6ULL

The i.MX6ULL's GPT supportting taking OSC as clock source.
Add i.MX6ULL support.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Peng Fan 8 vuotta sitten
vanhempi
commit
988acd2d4c
1 muutettua tiedostoa jossa 4 lisäystä ja 3 poistoa
  1. 4 3
      arch/arm/imx-common/timer.c

+ 4 - 3
arch/arm/imx-common/timer.c

@@ -44,7 +44,8 @@ static inline int gpt_has_clk_source_osc(void)
 {
 {
 #if defined(CONFIG_MX6)
 #if defined(CONFIG_MX6)
 	if (((is_mx6dq()) && (soc_rev() > CHIP_REV_1_0)) ||
 	if (((is_mx6dq()) && (soc_rev() > CHIP_REV_1_0)) ||
-	    is_mx6dqp() || is_mx6sdl() || is_mx6sx() || is_mx6ul())
+	    is_mx6dqp() || is_mx6sdl() || is_mx6sx() || is_mx6ul() ||
+	    is_mx6ull())
 		return 1;
 		return 1;
 
 
 	return 0;
 	return 0;
@@ -83,8 +84,8 @@ int timer_init(void)
 	if (gpt_has_clk_source_osc()) {
 	if (gpt_has_clk_source_osc()) {
 		i |= GPTCR_CLKSOURCE_OSC | GPTCR_TEN;
 		i |= GPTCR_CLKSOURCE_OSC | GPTCR_TEN;
 
 
-		/* For DL/S, SX, UL, set 24Mhz OSC Enable bit and prescaler */
-		if (is_mx6sdl() || is_mx6sx() || is_mx6ul()) {
+		/* For DL/S, SX, UL, ULL set 24Mhz OSC Enable bit and prescaler */
+		if (is_mx6sdl() || is_mx6sx() || is_mx6ul() || is_mx6ull()) {
 			i |= GPTCR_24MEN;
 			i |= GPTCR_24MEN;
 
 
 			/* Produce 3Mhz clock */
 			/* Produce 3Mhz clock */