summaryrefslogtreecommitdiff
path: root/cpu/xscale
diff options
context:
space:
mode:
Diffstat (limited to 'cpu/xscale')
-rw-r--r--cpu/xscale/i2c.c7
-rw-r--r--cpu/xscale/start.S26
2 files changed, 32 insertions, 1 deletions
diff --git a/cpu/xscale/i2c.c b/cpu/xscale/i2c.c
index f546f14..406f825 100644
--- a/cpu/xscale/i2c.c
+++ b/cpu/xscale/i2c.c
@@ -41,6 +41,7 @@
* - I2C_PXA_SLAVE_ADDR
*/
+#include <asm/arch/hardware.h>
#include <asm/arch/pxa-regs.h>
#include <i2c.h>
@@ -244,6 +245,12 @@ i2c_transfer_finish:
void i2c_init(int speed, int slaveaddr)
{
+#ifdef CFG_I2C_INIT_BOARD
+ /* call board specific i2c bus reset routine before accessing the */
+ /* environment, which might be in a chip on that bus. For details */
+ /* about this problem see doc/I2C_Edge_Conditions. */
+ i2c_init_board();
+#endif
}
diff --git a/cpu/xscale/start.S b/cpu/xscale/start.S
index e63fece..3d9784e 100644
--- a/cpu/xscale/start.S
+++ b/cpu/xscale/start.S
@@ -84,6 +84,17 @@ _armboot_end:
.word armboot_end
/*
+ * This is defined in the board specific linker script
+ */
+.globl _bss_start
+_bss_start:
+ .word bss_start
+
+.globl _bss_end
+_bss_end:
+ .word bss_end
+
+/*
* _armboot_real_end is the first usable RAM address behind armboot
* and the various stacks
*/
@@ -143,7 +154,20 @@ copy_loop:
ldr r0, _uboot_reloc /* upper 128 KiB: relocated uboot */
sub r0, r0, #CFG_MALLOC_LEN /* malloc area */
/* FIXME: bdinfo should be here */
- sub sp, r0, #12 /* leave 3 words for abort-stack */
+ sub sp, r0, #12 /* leave 3 words for abort-stack */
+
+clear_bss:
+
+ ldr r0, _bss_start /* find start of bss segment */
+ add r0, r0, #4 /* start at first byte of bss */
+ ldr r1, _bss_end /* stop here */
+ mov r2, #0x00000000 /* clear */
+
+clbss_l:str r2, [r0] /* clear loop... */
+ add r0, r0, #4
+ cmp r0, r1
+ bne clbss_l
+
ldr pc, _start_armboot