]> git.sur5r.net Git - u-boot/commitdiff
* Patches by Anders Larsen, 17 Sep 2003:
authorwdenk <wdenk>
Thu, 18 Sep 2003 09:21:33 +0000 (09:21 +0000)
committerwdenk <wdenk>
Thu, 18 Sep 2003 09:21:33 +0000 (09:21 +0000)
  - fix spelling errors
  - set GD_FLG_DEVINIT flag only after device function pointers
    are valid
  - Allow CFG_ALT_MEMTEST on systems where address zero isn't
    writeable
  - enable 3.rd UART (ST-UART) on PXA(XScale) CPUs
  - trigger watchdog while waiting in serial driver

28 files changed:
CHANGELOG
README
board/at91rm9200dk/flash.c
board/cradle/flash.c
board/csb226/flash.c
board/dnp1110/flash.c
board/ep7312/flash.c
board/impa7/flash.c
board/innokom/flash.c
board/lart/flash.c
board/logodl/flash.c
board/lubbock/flash.c
board/ml2/flash.c
board/mpl/vcma9/flash.c
board/omap1510inn/flash.c
board/omap1610inn/flash.c
board/sc520_cdp/flash.c
board/sc520_cdp/flash_old.c
board/sc520_spunk/flash.c
board/shannon/flash.c
board/shannon/shannon.c
board/smdk2410/flash.c
common/cmd_mem.c
common/console.c
common/devices.c
common/usb.c
cpu/pxa/cpu.c
cpu/pxa/serial.c

index 83b5b6ab682f5f65dcba714f7dc1ae2dfc3f7c8a..9782fd49b0aed2a4e94a11bb8cbb6152273ba059 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,15 @@
 Changes for U-Boot 1.0.0:
 ======================================================================
 
+* Patches by Anders Larsen, 17 Sep 2003:
+  - fix spelling errors
+  - set GD_FLG_DEVINIT flag only after device function pointers
+    are valid
+  - Allow CFG_ALT_MEMTEST on systems where address zero isn't
+    writeable
+  - enable 3.rd UART (ST-UART) on PXA(XScale) CPUs
+  - trigger watchdog while waiting in serial driver
+
 * Add auto-update code for TRAB board using USB memory sticks,
   support new configuration with more memory
 
diff --git a/README b/README
index 691140f53cfd71f2d5b1a8a95d6482d9932b84e4..aee88ed725ae4f70f4fe552272603f0af088cfd8 100644 (file)
--- a/README
+++ b/README
@@ -1498,6 +1498,10 @@ Configuration Settings:
 - CFG_ALT_MEMTEST:
                Enable an alternate, more extensive memory test.
 
+- CFG_MEMTEST_SCRATCH:
+               Scratch address used by the alternate memory test
+               You only need to set this if address zero isn't writeable
+
 - CFG_TFTP_LOADADDR:
                Default load address for network file downloads
 
index ebbd6f4aec6fa932eed58ca9dc22da0d7294bda3..9a67755dc349668998280f60170e17d6b83c4f00 100644 (file)
@@ -160,7 +160,7 @@ ulong flash_init (void)
                if (i == 0)
                        flashbase = PHYS_FLASH_1;
                else
-                       panic ("configured to many flash banks!\n");
+                       panic ("configured too many flash banks!\n");
 
                sector = 0;
                start_address = flashbase;
index e2d174e524d776e97641c0848775506f464c0544..d867a11ce3a0937c355b064170f772376bf18261 100644 (file)
@@ -59,7 +59,7 @@ ulong flash_init(void)
                flashbase = PHYS_FLASH_2;
                break;
         default:
-               panic("configured to many flash banks!\n");
+               panic("configured too many flash banks!\n");
                break;
       }
       for (j = 0; j < flash_info[i].sector_count; j++)
index 9801773eb7e844625099e88ea96b89e3a6343d26..6b0e51ac4354778c457476a2551fec58f5e396de 100644 (file)
@@ -62,7 +62,7 @@ ulong flash_init(void)
                                flashbase = PHYS_FLASH_1;
                                break;
                        default:
-                               panic("configured to many flash banks!\n");
+                               panic("configured too many flash banks!\n");
                                break;
                }
                for (j = 0; j < flash_info[i].sector_count; j++) {
index 4416393fec75f5409bbec28e77c9082c4df21862..60874ba9b834ca1355cbebc6981c60cfaebf5d01 100644 (file)
@@ -74,7 +74,7 @@ unsigned long flash_init (void)
                 flash_get_offsets(PHYS_FLASH_1, &flash_info[i]);
                break;
           default:
-               panic("configured to many flash banks!\n");
+               panic("configured too many flash banks!\n");
                break;
        }
        size += flash_info[i].size;
index 1ee0a37a00de1747162dd7b33d9780d889583410..c687cc7365de83fa2e769b12f2a0731c86065fbf 100644 (file)
@@ -50,7 +50,7 @@ ulong flash_init (void)
                if (i == 0)
                        flashbase = PHYS_FLASH_1;
                else
-                       panic ("configured to many flash banks!\n");
+                       panic ("configured too many flash banks!\n");
                for (j = 0; j < flash_info[i].sector_count; j++) {
                        flash_info[i].start[j] = flashbase + j * MAIN_SECT_SIZE;
                }
index da4d31eb1e289b70dd854817bb982eb520340354..3e380e5f498afb96d277aa6e967e4ba157d11826 100644 (file)
@@ -53,7 +53,7 @@ ulong flash_init(void)
        else if (i == 1)
          flashbase = PHYS_FLASH_2;
        else
-         panic("configured to many flash banks!\n");
+         panic("configured too many flash banks!\n");
        for (j = 0; j < flash_info[i].sector_count; j++)
        {
            if (j <= 7)
index 3caf43d21c3146b13fa47f5d3ebc3fb64617795a..29c9166484295bfb61b2de1088d4fd10e686f665 100644 (file)
@@ -276,7 +276,7 @@ ulong flash_init(void)
                                flashbase = PHYS_FLASH_1;
                                break;
                        default:
-                               panic("configured to many flash banks!\n");
+                               panic("configured too many flash banks!\n");
                                break;
                }
                for (j = 0; j < flash_info[i].sector_count; j++) {
index ad6134be746b16ac4f37e3278cd1929fc720d4b3..013c2fd10ff4867ce0905f822454c94cc0010178 100644 (file)
@@ -86,7 +86,7 @@ ulong flash_init(void)
        if (i == 0)
          flashbase = PHYS_FLASH_1;
        else
-         panic("configured to many flash banks!\n");
+         panic("configured too many flash banks!\n");
        for (j = 0; j < flash_info[i].sector_count; j++)
        {
            if (j <= 7)
index cef0b4dee4781489497c432902e9f2957bcf5463..8c304f9392ccf9ef742b61ee16113db6582b30ad 100644 (file)
@@ -91,7 +91,7 @@ ulong flash_init(void)
                flashbase = PHYS_FLASH_2;
                break;
           default:
-               panic("configured to many flash banks!\n");
+               panic("configured too many flash banks!\n");
                break;
        }
        for (j = 0; j < flash_info[i].sector_count; j++)
index 9e07b1140d4e38fc641ba891bfccc9fc03de1669..ba82892dde557e22b1ea97b1e75828e17460c4ed 100644 (file)
@@ -76,7 +76,7 @@ unsigned long flash_init (void)
                        flash_get_offsets (PHYS_FLASH_2, &flash_info[i]);
                        break;
                default:
-                       panic ("configured to many flash banks!\n");
+                       panic ("configured too many flash banks!\n");
                        break;
                }
                size += flash_info[i].size;
index 090725df1ddf9615b8d937965aaee782d408f39d..4f805a663b1e4d6504fbf54be52b05b3fc87c63e 100644 (file)
@@ -72,7 +72,7 @@ ulong flash_init(void) {
                if (i==0)
                        flashbase = CFG_FLASH_BASE;
                else
-                       panic("configured to many flash banks!\n");
+                       panic("configured too many flash banks!\n");
                for (j = 0; j < flash_info[i].sector_count; j++)
                                flash_info[i].start[j]=flashbase + j * SECT_SIZE;
 
index 91517c463f9e7ab43c8096a370ab742f211653d6..829396bfd0def197ddcbcfd6556ed3947cdf726b 100644 (file)
@@ -80,7 +80,7 @@ ulong flash_init(void)
        if (i == 0)
          flashbase = PHYS_FLASH_1;
        else
-         panic("configured to many flash banks!\n");
+         panic("configured too many flash banks!\n");
        for (j = 0; j < flash_info[i].sector_count; j++)
        {
            if (j <= 3)
index 6b2739d3ab97ea3cf07b9e4682a099e1cf1cefec..9453987aa9d8cbaa15cc9b654acba2e0a15b2da5 100644 (file)
@@ -72,7 +72,7 @@ unsigned long flash_init (void)
                        flash_get_offsets (PHYS_FLASH_1, &flash_info[i]);
                        break;
                default:
-                       panic ("configured to many flash banks!\n");
+                       panic ("configured too many flash banks!\n");
                        break;
                }
                size += flash_info[i].size;
index 59f5b68b38d245e43abadb580aa1a0ab16d36291..0108545d41ee94d6290d42d8b1f4bf79f0e5a8dc 100644 (file)
@@ -96,7 +96,7 @@ unsigned long flash_init (void)
                        flash_get_offsets (PHYS_FLASH_1, &flash_info[i]);
                        break;
                default:
-                       panic ("configured to many flash banks!\n");
+                       panic ("configured too many flash banks!\n");
                        break;
                }
                size += flash_info[i].size;
index 2f7ce5254af44419bb6f882f1b1d0127969260a8..d52a847c73bf4fe46fd9b2f9f409ba00c6007e41 100644 (file)
@@ -234,7 +234,7 @@ ulong flash_init(void)
                        flashbase = SC520_FLASH_BANK2_BASE;
                        break;
                default:
-                       panic("configured to many flash banks!\n");
+                       panic("configured too many flash banks!\n");
                }
 
                id = identify_flash(flashbase, 4);
index 416b01d2a57e2a788fc83c178c132a0e430db624..3c0f6d6a6803cf7c4b75956b3a75ed69e1201264 100644 (file)
@@ -101,7 +101,7 @@ ulong flash_init(void)
                        flashbase = SC520_FLASH_BANK0_BASE;
                        break;
                default:
-                       panic("configured to many flash banks!\n");
+                       panic("configured too many flash banks!\n");
                }
 
                for (j = 0; j < flash_info[i].sector_count; j++) {
index d97dc21865531b85908fc72d0caca7ce772ad550..4942e598d35cd8461b8b4357e02f383bfe7e64a4 100644 (file)
@@ -239,7 +239,7 @@ ulong flash_init(void)
                        flashbase = SC520_FLASH_BANK0_BASE;
                        break;
                default:
-                       panic("configured to many flash banks!\n");
+                       panic("configured too many flash banks!\n");
                }
 
                id = identify_flash(flashbase, 2);
index 74f5f6929bcbf17f97d3a62e3efd1766a0032ec2..65ebc279c50df9882d996ef66b50e413c5c76ba7 100644 (file)
@@ -73,7 +73,7 @@ ulong flash_init(void)
        if (i == 0)
          flashbase = PHYS_FLASH_1;
        else
-         panic("configured to many flash banks!\n");
+         panic("configured too many flash banks!\n");
        for (j = 0; j < flash_info[i].sector_count; j++)
        {
 
index 1876e3ed312aebb59abdd7a000e534f5266f937e..c090bde4aab5a3c9793b50395b6b962c0fd46af8 100644 (file)
@@ -60,7 +60,7 @@ int board_init (void)
        *(unsigned long *)temp = 0x00060006;
 
        }
-#endif /* CONFIG_INIT_CRITICAL */
+#endif /* CONFIG_INFERNO */
 
        /* arch number for shannon */
        gd->bd->bi_arch_number = 97;
index d7479f085f57b02eee2f4ebdd622bcbdf4a728bc..a37c6f8fb86a4e5a05011b1e2c083261598f4005 100644 (file)
@@ -80,7 +80,7 @@ ulong flash_init(void)
        if (i == 0)
          flashbase = PHYS_FLASH_1;
        else
-         panic("configured to many flash banks!\n");
+         panic("configured too many flash banks!\n");
        for (j = 0; j < flash_info[i].sector_count; j++)
        {
            if (j <= 3)
index 3e225988bba1e989d7a4060fb37b01474a336a88..39186781406503de8a7cfe9182fad81dcc908cd6 100644 (file)
@@ -555,7 +555,11 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        vu_long temp;
        vu_long anti_pattern;
        vu_long num_words;
+#if defined(CFG_MEMTEST_SCRATCH)
+       vu_long *dummy = (vu_long*)CFG_MEMTEST_SCRATCH;
+#else
        vu_long *dummy = NULL;
+#endif
        int     j;
        int iterations = 1;
 
index 148c59981d36bd572e1b72b0fdd680b6614dadc3..d933c33519ce559ed8fb86a8f7bd1655af0e80b4 100644 (file)
@@ -436,6 +436,8 @@ int console_init_r (void)
                console_setfile (stdin, inputdev);
        }
 
+       gd->flags |= GD_FLG_DEVINIT;    /* device initialization completed */
+
 #ifndef CFG_CONSOLE_INFO_QUIET
        /* Print information */
        printf ("In:    ");
@@ -480,6 +482,8 @@ int console_init_r (void)
 /* Called after the relocation - use desired console functions */
 int console_init_r (void)
 {
+       DECLARE_GLOBAL_DATA_PTR;
+
        device_t *inputdev = NULL, *outputdev = NULL;
        int i, items = ListNumItems (devlist);
 
@@ -514,6 +518,8 @@ int console_init_r (void)
                console_setfile (stdin, inputdev);
        }
 
+       gd->flags |= GD_FLG_DEVINIT;    /* device initialization completed */
+
 #ifndef CFG_CONSOLE_INFO_QUIET
        /* Print information */
        printf ("In:    ");
index 4839eacbb16eb67210d9e6358d4f5739a4d7e9ea..7b4a1cd81fea7b9f303e1436a670fcd8cd1f3dfc 100644 (file)
@@ -158,8 +158,6 @@ int device_deregister(char *devname)
 
 int devices_init (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
 #ifndef CONFIG_ARM     /* already relocated for current ARM implementation */
        ulong relocation_offset = gd->reloc_off;
        int i;
@@ -195,8 +193,6 @@ int devices_init (void)
 #endif
        drv_system_init ();
 
-       gd-> flags |= GD_FLG_DEVINIT;   /* device initialization done */
-
        return (0);
 }
 
index 9474abee4d5640cad68a6cbcadb84a16be85f909..a96052a0c0e5dab1bae0816a8a23f9f4313c4e60 100644 (file)
@@ -595,7 +595,7 @@ struct usb_device * usb_alloc_new_device(void)
        int i;
        USB_PRINTF("New Device %d\n",dev_index);
        if(dev_index==USB_MAX_DEVICE) {
-               printf("ERROR, to many USB Devices max=%d\n",USB_MAX_DEVICE);
+               printf("ERROR, too many USB Devices, max=%d\n",USB_MAX_DEVICE);
                return NULL;
        }
        usb_dev[dev_index].devnum=dev_index+1; /* default Address is 0, real addresses start with 1 */
index cc9b3ff40844990dec01d36faa0b6466f825571f..6b82f04f7d716fffcff07eebde526cc77f92ab27 100644 (file)
@@ -83,7 +83,7 @@ int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
        extern void reset_cpu (ulong addr);
 
-       printf ("reseting ...\n");
+       printf ("resetting ...\n");
 
        udelay (50000);                         /* wait 50 ms */
        disable_interrupts ();
index c9d5f70bc473097671f3f429c824a89ae76657ba..cedebfe496bc257bffea7f56c781e97be9654802 100644 (file)
@@ -29,6 +29,7 @@
  */
 
 #include <common.h>
+#include <watchdog.h>
 #include <asm/arch/pxa-regs.h>
 
 void serial_setbrg (void)
@@ -38,7 +39,7 @@ void serial_setbrg (void)
        unsigned int quot = 0;
 
        if (gd->baudrate == 1200)
-               quot = 192;
+               quot = 768;
        else if (gd->baudrate == 9600)
                quot = 96;
        else if (gd->baudrate == 19200)
@@ -53,7 +54,6 @@ void serial_setbrg (void)
                hang ();
 
 #ifdef CONFIG_FFUART
-
        CKEN |= CKEN6_FFUART;
 
        FFIER = 0;                                      /* Disable for now */
@@ -82,9 +82,21 @@ void serial_setbrg (void)
        BTIER = IER_UUE;                        /* Enable BFUART */
 
 #elif defined(CONFIG_STUART)
-#error "Bad: not implemented yet!"
+       CKEN |= CKEN5_STUART;
+
+       STIER = 0;
+       STFCR = 0;
+
+       /* set baud rate */
+       STLCR = LCR_DLAB;
+       STDLL = quot & 0xff;
+       STDLH = quot >> 8;
+       STLCR = LCR_WLS0 | LCR_WLS1;
+
+       STIER = IER_UUE;                        /* Enable STUART */
+
 #else
-#error "Bad: you didn't configured serial ..."
+#error "Bad: you didn't configure serial ..."
 #endif
 }
 
@@ -109,13 +121,17 @@ void serial_putc (const char c)
 {
 #ifdef CONFIG_FFUART
        /* wait for room in the tx FIFO on FFUART */
-       while ((FFLSR & LSR_TEMT) == 0);
-
+       while ((FFLSR & LSR_TEMT) == 0)
+               WATCHDOG_RESET ();      /* Reset HW Watchdog, if needed */
        FFTHR = c;
 #elif defined(CONFIG_BTUART)
-       while ((BTLSR & LSR_TEMT ) == 0 );
+       while ((BTLSR & LSR_TEMT ) == 0 )
+               WATCHDOG_RESET ();      /* Reset HW Watchdog, if needed */
        BTTHR = c;
 #elif defined(CONFIG_STUART)
+       while ((STLSR & LSR_TEMT ) == 0 )
+               WATCHDOG_RESET ();      /* Reset HW Watchdog, if needed */
+       STTHR = c;
 #endif
 
        /* If \n, also do \r */
@@ -135,6 +151,7 @@ int serial_tstc (void)
 #elif defined(CONFIG_BTUART)
        return BTLSR & LSR_DR;
 #elif defined(CONFIG_STUART)
+       return STLSR & LSR_DR;
 #endif
 }
 
@@ -146,14 +163,17 @@ int serial_tstc (void)
 int serial_getc (void)
 {
 #ifdef CONFIG_FFUART
-       while (!(FFLSR & LSR_DR));
-
+       while (!(FFLSR & LSR_DR))
+               WATCHDOG_RESET ();      /* Reset HW Watchdog, if needed */
        return (char) FFRBR & 0xff;
 #elif defined(CONFIG_BTUART)
-       while (!(BTLSR & LSR_DR));
-
+       while (!(BTLSR & LSR_DR))
+               WATCHDOG_RESET ();      /* Reset HW Watchdog, if needed */
        return (char) BTRBR & 0xff;
 #elif defined(CONFIG_STUART)
+       while (!(STLSR & LSR_DR))
+               WATCHDOG_RESET ();      /* Reset HW Watchdog, if needed */
+       return (char) STRBR & 0xff;
 #endif
 }