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

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 */

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.
Signed-off-by: Daniel Mack daniel@caiaq.de
---
cpu/pxa/start.S | 4 ++-- include/asm-arm/arch-pxa/pxa-regs.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/cpu/pxa/start.S b/cpu/pxa/start.S index 63ab0c5..4be3a7a 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 */
participants (1)
-
Daniel Mack