diff options
author | wdenk <wdenk> | 2003-03-06 13:39:27 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2003-03-06 13:39:27 +0000 |
commit | 47cd00fa707af9de76408b69d3e911717dbbfab1 (patch) | |
tree | dd887729a4eaf11e7a225563f4c604ef4b7d695b /cpu | |
parent | db2f721ffcf9693086a7e5c6c7015f2019e7f52e (diff) | |
download | u-boot-midas-47cd00fa707af9de76408b69d3e911717dbbfab1.tar.gz u-boot-midas-47cd00fa707af9de76408b69d3e911717dbbfab1.tar.bz2 u-boot-midas-47cd00fa707af9de76408b69d3e911717dbbfab1.zip |
* Patches by Robert Schwebel, 06 Mar 2003:
- fix bug in BOOTP code (must use NetCopyIP)
- update of CSB226 port
- clear BSS segment on XScale
- added support for i2c_init_board() function
- update to the Innokom plattform
* Extend support for redundand environments for configurations where
environment size < sector size
Diffstat (limited to 'cpu')
-rw-r--r-- | cpu/mpc824x/drivers/i2c/i2c1.c | 9 | ||||
-rw-r--r-- | cpu/mpc8260/i2c.c | 7 | ||||
-rw-r--r-- | cpu/mpc8xx/i2c.c | 7 | ||||
-rw-r--r-- | cpu/ppc4xx/i2c.c | 8 | ||||
-rw-r--r-- | cpu/xscale/i2c.c | 7 | ||||
-rw-r--r-- | cpu/xscale/start.S | 26 |
6 files changed, 63 insertions, 1 deletions
diff --git a/cpu/mpc824x/drivers/i2c/i2c1.c b/cpu/mpc824x/drivers/i2c/i2c1.c index be6ec60a14..7a2eb66656 100644 --- a/cpu/mpc824x/drivers/i2c/i2c1.c +++ b/cpu/mpc824x/drivers/i2c/i2c1.c @@ -1128,6 +1128,15 @@ static void I2C_Set_Stat (unsigned int eumbbar, I2C_STAT stat) void i2c_init (int speed, int slaveadd) { +#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 + #ifdef DEBUG I2C_Initialize (0x7f, 0, (void *) printf); #else diff --git a/cpu/mpc8260/i2c.c b/cpu/mpc8260/i2c.c index 8bfa2e8e74..2d65e32734 100644 --- a/cpu/mpc8260/i2c.c +++ b/cpu/mpc8260/i2c.c @@ -221,6 +221,13 @@ void i2c_init(int speed, int slaveadd) volatile I2C_BD *rxbd, *txbd; uint dpaddr; +#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 + dpaddr = *((unsigned short*)(&immap->im_dprambase[PROFF_I2C_BASE])); if (dpaddr == 0) { /* need to allocate dual port ram */ diff --git a/cpu/mpc8xx/i2c.c b/cpu/mpc8xx/i2c.c index 9d5d9d265f..9e8b8c7e76 100644 --- a/cpu/mpc8xx/i2c.c +++ b/cpu/mpc8xx/i2c.c @@ -215,6 +215,13 @@ i2c_init(int speed, int slaveaddr) volatile I2C_BD *rxbd, *txbd; uint dpaddr; +#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 + #ifdef CFG_I2C_UCODE_PATCH iip = (iic_t *)&cp->cp_dpmem[iip->iic_rpbase]; #else diff --git a/cpu/ppc4xx/i2c.c b/cpu/ppc4xx/i2c.c index 68af057d1e..7d8db9bf43 100644 --- a/cpu/ppc4xx/i2c.c +++ b/cpu/ppc4xx/i2c.c @@ -85,7 +85,15 @@ void i2c_init (int speed, int slaveadd) unsigned long freqOPB; int val, divisor; +#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 + /* Handle possible failed I2C state */ + /* FIXME: put this into i2c_init_board()? */ _i2c_bus_reset (); /* clear lo master address */ diff --git a/cpu/xscale/i2c.c b/cpu/xscale/i2c.c index f546f14cbe..406f825cd5 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 e63fece8b2..3d9784ebf4 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 |