Patch by Markus Pietrek, 04 May 2004:
authorwdenk <wdenk>
Wed, 9 Jun 2004 00:10:59 +0000 (00:10 +0000)
committerwdenk <wdenk>
Wed, 9 Jun 2004 00:10:59 +0000 (00:10 +0000)
Fix clear_bss code for ARM systems (all except s3c44b0 which
doesn't clear BSS at all?)

CHANGELOG
cpu/arm720t/start.S
cpu/arm920t/start.S
cpu/arm925t/start.S
cpu/arm926ejs/start.S
cpu/at91rm9200/start.S
cpu/ixp/start.S
cpu/pxa/start.S
cpu/sa1100/start.S
drivers/inca-ip_sw.c

index 4cd62f6..82d977e 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,16 @@
 Changes since U-Boot 1.1.1:
 ======================================================================
 
+* Patch by Markus Pietrek, 04 May 2004:
+  Fix clear_bss code for ARM systems (all except s3c44b0 which
+  doesn't clear BSS at all?)
+
+* Fix "ping" problem on INC-IP board. Strange problem:
+  Sometimes the store word instruction hangs while writing to one of
+  the Switch registers, but only if the next instruction is 16-byte
+  aligned. Moving the instruction into a separate function somehow
+  makes the problem go away.
+
 * Patch by Rishi Bhattacharya, 08 May 2004:
   Add support for TI OMAP5912 OSK Board
 
index 791049a..f6ae9d6 100644 (file)
@@ -154,7 +154,6 @@ stack_setup:
 
 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                            */
 
index 49264da..0e372d0 100644 (file)
@@ -191,7 +191,6 @@ stack_setup:
 
 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                            */
 
index da84de1..134a576 100644 (file)
@@ -197,7 +197,6 @@ stack_setup:
 
 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                            */
 
index ad5d847..70be4de 100644 (file)
@@ -172,7 +172,6 @@ stack_setup:
 
 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                            */
 
index b9b889a..d73af20 100644 (file)
@@ -147,7 +147,6 @@ stack_setup:
 
 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                            */
 
index 09ecc73..9240b5c 100644 (file)
@@ -289,7 +289,6 @@ stack_setup:
 
 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                            */
 
index de2a084..b1f6e7e 100644 (file)
@@ -141,7 +141,6 @@ stack_setup:
 
 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                            */
 
index fe1316c..52f2c5d 100644 (file)
@@ -154,7 +154,6 @@ stack_setup:
 
 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                            */
 
index f8fe52e..ab22b4d 100644 (file)
 
 
 #define DELAY  udelay(10000)
+  /* Sometimes the store word instruction hangs while writing to one
+   * of the Switch registers. Moving the instruction into a separate
+   * function somehow makes the problem go away.
+   */
+static void SWORD(volatile u32 * reg, u32 value)
+{
+       *reg = value;
+}
 
 #define DMA_WRITE_REG(reg, value) *((volatile u32 *)reg) = (u32)value;
 #define DMA_READ_REG(reg, value)    value = (u32)*((volatile u32*)reg)
 #define SW_WRITE_REG(reg, value)   \
-       *((volatile u32*)reg) = (u32)value;\
+       SWORD(reg, value);\
        DELAY;\
-       *((volatile u32*)reg) = (u32)value;
+       SWORD(reg, value);
 
 #define SW_READ_REG(reg, value)           \
        value = (u32)*((volatile u32*)reg);\