[U-Boot] [PATCH] PXA3xx: fix CKEN[AB]

Daniel Mack daniel at caiaq.de
Sat Nov 29 00:13:08 CET 2008


Hi,

there are some bits in PXA3xx' CKENA/CKENB registers which need to be
set always, according to the documentation. They are actually different
for the three families, but as there is no way to keep track of them yet
in U-Boot, I'd rather apply this patch and enable some clocks on some
processors which are not neccessarily needed.

Best regards,
Daniel


diff --git a/cpu/pxa/start.S b/cpu/pxa/start.S
index 63ab0c5..9d74d6c 100644
--- a/cpu/pxa/start.S
+++ b/cpu/pxa/start.S
@@ -235,10 +235,10 @@ cpu_init_crit:
 
        /* turn off all clocks but the ones we will definitly require */
        ldr     r1, =CKENA
-       ldr     r2, =(CKENA_22_FFUART | CKENA_10_SRAM | CKENA_9_SMC | CKENA_8_DMC)
+       ldr     r2, =(CKENA_22_FFUART | CKENA_10_SRAM | CKENA_9_SMC | CKENA_8_DMC | CKENA_SETALWAYS)
        str     r2, [r1]
        ldr     r1, =CKENB
-       ldr     r2, =(CKENB_6_IRQ)
+       ldr     r2, =(CKENB_6_IRQ | CKENB_SETALWAYS)
        str     r2, [r1]
 #endif /* !CONFIG_CPU_MONAHANS */
 
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h
index e014568..25d640b 100644
--- a/include/asm-arm/arch-pxa/pxa-regs.h
+++ b/include/asm-arm/arch-pxa/pxa-regs.h
@@ -1757,6 +1757,7 @@ typedef void              (*ExcpHndlr) (void) ;
 #define CKENA_3_CAMERA (1 << 3)        /* Camera Interface Clock Enable */
 #define CKENA_2_USBHOST        (1 << 2)        /* USB Host Unit Clock Enable */
 #define CKENA_1_LCD    (1 << 1)        /* LCD Unit Clock Enable */
+#define CKENA_SETALWAYS        (0x800000a1)    /* bits marked 'SETALWAYS' */
 
 #define CKENB_8_1WIRE  ((1 << 8) + 32) /* One Wire Interface Unit Clock Enable */
 #define CKENB_7_GPIO   ((1 << 7) + 32) /* GPIO Clock Enable */
@@ -1764,6 +1765,7 @@ typedef void              (*ExcpHndlr) (void) ;
 #define CKENB_4_I2C    ((1 << 4) + 32) /* I2C Unit Clock Enable */
 #define CKENB_1_PWM1   ((1 << 1) + 32) /* PWM2 & PWM3 Clock Enable */
 #define CKENB_0_PWM0   ((1 << 0) + 32) /* PWM0 & PWM1 Clock Enable */
+#define CKENB_SETALWAYS        (0xfffcfc4c)    /* bits marked 'SETALWAYS' */
 
 #else /* if defined CONFIG_CPU_MONAHANS */



More information about the U-Boot mailing list