]> git.sur5r.net Git - u-boot/commitdiff
* Patches by Jon Diekema, 15 Sep 2003:
authorwdenk <wdenk>
Mon, 15 Sep 2003 18:00:00 +0000 (18:00 +0000)
committerwdenk <wdenk>
Mon, 15 Sep 2003 18:00:00 +0000 (18:00 +0000)
  - add description for missing CFG_CMD_* entries in the README file
  - sacsng tweaks:
   include/configs/sacsng.h:
       + Support extra bootp options like: 2nd DNS and send hostname
       + Enabling ping and irq command
       + Adding defines for a bunch of misc configrabled options
         (patches for these options will be coming)
       + Adding watchdog support, but it isn't enabled yet.

   board/sacsng/sacsng.c:

       + Suppressing unneeded output when the quiet environment
 is non-zero.
       + show_boot_progress() now accepts any negative number as a
 failure code.
       + show_boot_progress() flashes the error code 5 times, and
         then resets the board to retry the boot from the top

* Patch by Gleb Natapov, 14 Sep 2003:
  enable watchdog support for all MPC824x boards that have a watchdog

CHANGELOG
README
board/sacsng/sacsng.c
include/configs/sacsng.h

index 93e7c7f83ed9d03a8e1a2172eaace61bb5593792..0d7c5d7afe15ea68c77e7cdfe1af330ae501e0c9 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,10 @@
 Changes for U-Boot 1.0.0:
 ======================================================================
 
+* Patches by Jon Diekema, 15 Sep 2003:
+  - add description for missing CFG_CMD_* entries in the README file
+  - sacsng tweaks
+
 * Patch by Gleb Natapov, 14 Sep 2003:
   enable watchdog support for all MPC824x boards that have a watchdog
 
diff --git a/README b/README
index e431c29a744107507b88a9b7fc4f1fa490fa7e6c..691140f53cfd71f2d5b1a8a95d6482d9932b84e4 100644 (file)
--- a/README
+++ b/README
@@ -573,13 +573,18 @@ The following options need to be configured:
                #define enables commands:
                -------------------------
                CFG_CMD_ASKENV  * ask for env variable
+               CFG_CMD_AUTOSCRIPT Autoscript Support
                CFG_CMD_BDI       bdinfo
                CFG_CMD_BEDBUG    Include BedBug Debugger
+               CFG_CMD_BMP     * BMP support
                CFG_CMD_BOOTD     bootd
                CFG_CMD_CACHE     icache, dcache
                CFG_CMD_CONSOLE   coninfo
                CFG_CMD_DATE    * support for RTC, date/time...
                CFG_CMD_DHCP      DHCP support
+               CFG_CMD_DIAG    * Diagnostics
+               CFG_CMD_DOC     * Disk-On-Chip Support
+               CFG_CMD_DTT       Digital Therm and Thermostat 
                CFG_CMD_ECHO    * echo arguments
                CFG_CMD_EEPROM  * EEPROM read/write support
                CFG_CMD_ELF       bootelf, bootvx
@@ -589,27 +594,37 @@ The following options need to be configured:
                CFG_CMD_FDOS    * Dos diskette Support
                CFG_CMD_FLASH     flinfo, erase, protect
                CFG_CMD_FPGA      FPGA device initialization support
+               CFG_CMD_HWFLOW  * RTS/CTS hw flow control
                CFG_CMD_I2C     * I2C serial bus support
                CFG_CMD_IDE     * IDE harddisk support
                CFG_CMD_IMI       iminfo
+               CFG_CMD_IMLS      List all found images
                CFG_CMD_IMMAP   * IMMR dump support
                CFG_CMD_IRQ     * irqinfo
+               CFG_CMD_JFFS2   * JFFS2 Support
                CFG_CMD_KGDB    * kgdb
                CFG_CMD_LOADB     loadb
                CFG_CMD_LOADS     loads
                CFG_CMD_MEMORY    md, mm, nm, mw, cp, cmp, crc, base,
                                  loop, mtest
+               CFG_CMD_MISC      Misc functions like sleep etc
                CFG_CMD_MMC       MMC memory mapped support
                CFG_CMD_MII       MII utility commands
+               CFG_CMD_NAND    * NAND support
                CFG_CMD_NET       bootp, tftpboot, rarpboot
                CFG_CMD_PCI     * pciinfo
                CFG_CMD_PCMCIA  * PCMCIA support
+               CFG_CMD_PING    * send ICMP ECHO_REQUEST to network host
+               CFG_CMD_PORTIO    Port I/O
                CFG_CMD_REGINFO * Register dump
                CFG_CMD_RUN       run command in env variable
+               CFG_CMD_SAVES     save S record dump
                CFG_CMD_SCSI    * SCSI Support
+               CFG_CMD_SDRAM   * print SDRAM configuration information
                CFG_CMD_SETGETDCR Support for DCR Register access (4xx only)
                CFG_CMD_SPI     * SPI serial bus support
                CFG_CMD_USB     * USB support
+               CFG_CMD_VFD     * VFD support (TRAB)
                CFG_CMD_BSP     * Board SPecific functions
                -----------------------------------------------
                CFG_CMD_ALL     all
index eb7e416df520e62a1cfd88da8c0f48f17edee8e2..60563d4ab2b151b89c02521c1f9ec7bb1cab71e5 100644 (file)
 #include <mpc8260.h>
 #include <i2c.h>
 #include <spi.h>
+#include <command.h>
 
 #ifdef CONFIG_SHOW_BOOT_PROGRESS
 #include <status_led.h>
 #endif
 
+#ifdef CONFIG_ETHER_LOOPBACK_TEST
+extern void eth_loopback_test(void);
+#endif /* CONFIG_ETHER_LOOPBACK_TEST */
+
+extern int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+
 #include "clkinit.h"
 #include "ioconfig.h" /* I/O configuration table */
 
@@ -243,15 +250,15 @@ long int initdram(int board_type)
 
     /* We don't trust CL less than 2 (only saw it on an old 16MByte DIMM) */
     if(caslatency < 2) {
-       printf("CL was %d, forcing to 2\n", caslatency);
+       printf("WARNING: CL was %d, forcing to 2\n", caslatency);
        caslatency = 2;
     }
     if(rows > 14) {
-       printf("This doesn't look good, rows = %d, should be <= 14\n", rows);
+       printf("WARNING: This doesn't look good, rows = %d, should be <= 14\n", rows);
        rows = 14;
     }
     if(cols > 11) {
-       printf("This doesn't look good, columns = %d, should be <= 11\n", cols);
+       printf("WARNING: This doesn't look good, columns = %d, should be <= 11\n", cols);
        cols = 11;
     }
 
@@ -450,6 +457,15 @@ int misc_init_r(void)
     int  sample_128x;  /* Use 128/4 clocking for the ADC/DAC */
     int  right_just;   /* Is the data to the DAC right justified? */
     int  mclk_divide;  /* MCLK Divide */
+    int  quiet;        /* Quiet or minimal output mode */
+
+    quiet = 0;
+    if ((ep = getenv("quiet")) != NULL) {
+       quiet = simple_strtol(ep, NULL, 10);
+    }
+    else {
+       setenv("quiet", "0");
+    }
 
     /*
      * SACSng custom initialization:
@@ -517,8 +533,12 @@ int misc_init_r(void)
        setenv("Daq128xSampling", "1");
     }
 
-    /* Display the ADC/DAC clocking information */
-    Daq_Display_Clocks();
+    /* 
+     * Display the ADC/DAC clocking information 
+     */
+    if (!quiet) {
+        Daq_Display_Clocks();
+    }
 
     /*
      * Determine the DAC data justification
@@ -552,8 +572,10 @@ int misc_init_r(void)
      * 3) Write the I2C address to register 6
      * 4) Enable address matching by setting the MSB in register 7
      */
-
-    printf("Initializing the ADC...\n");
+    
+    if (!quiet) {
+        printf("Initializing the ADC...\n");
+    }
     udelay(ADC_INITIAL_DELAY);         /* 10uSec per uF of VREF cap */
 
     iopa->pdat &= ~ADC_SDATA1_MASK;     /* release SDATA1 */
@@ -615,7 +637,9 @@ int misc_init_r(void)
      * sending an I2C "start" sequence.  When we bring the I2C back to
      * the normal state, we send an I2C "stop" sequence.
      */
-    printf("Initializing the DAC...\n");
+    if (!quiet) {
+       printf("Initializing the DAC...\n");
+    }
 
     /*
      * Bring the I2C clock and data lines low for initialization
@@ -695,7 +719,16 @@ int misc_init_r(void)
     I2C_DELAY;
     I2C_TRISTATE;
 
-    printf("\n");
+    if (!quiet) {
+        printf("\n");
+    }
+
+#ifdef CONFIG_ETHER_LOOPBACK_TEST
+    /*
+     * Run the Ethernet loopback test
+     */
+    eth_loopback_test ();
+#endif /* CONFIG_ETHER_LOOPBACK_TEST */
 
 #ifdef CONFIG_SHOW_BOOT_PROGRESS
     /*
@@ -758,17 +791,44 @@ static int last_boot_progress;
 
 void show_boot_progress (int status)
 {
-    if(status != -1) {
+    int i,j;
+    if(status > 0) {
        last_boot_progress = status;
     } else {
+        /* 
+        * If a specific failure code is given, flash this code
+        * else just use the last success code we've seen
+        */
+       if(status < -1)
+           last_boot_progress = -status;
+       
+       /* 
+        * Flash this code 5 times
+        */
+       for(j=0; j<5; j++) {
+           /*
+            * Houston, we have a problem.
+            * Blink the last OK status which indicates where things failed.
+            */
+           status_led_set(STATUS_LED_RED, STATUS_LED_ON);
+           flash_code(last_boot_progress, 5, 3);
+
+           /* 
+            * Delay 5 seconds between repetitions, 
+            * with the fault LED blinking 
+            */
+           for(i=0; i<5; i++) {
+               status_led_set(STATUS_LED_RED, STATUS_LED_OFF);
+               udelay(500000);
+               status_led_set(STATUS_LED_RED, STATUS_LED_ON);
+               udelay(500000);
+           }
+       }
+
        /*
-        * Houston, we have a problem.  Blink the last OK status which
-        * indicates where things failed.
+        * Reset the board to retry initialization.
         */
-       status_led_set(STATUS_LED_RED, STATUS_LED_ON);
-       flash_code(last_boot_progress, 5, 3);
-       udelay(1000000);
-       status_led_set(STATUS_LED_RED, STATUS_LED_BLINKING);
+       do_reset (NULL, 0, 0, NULL);
     }
 }
 #endif /* CONFIG_SHOW_BOOT_PROGRESS */
index 6fd8abc9c3b1207f73dc13b2b7e11ea53151791a..cc4936677d5de762335934a2be2ff7f0e91d4dc3 100644 (file)
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-/* Enable debug prints */
 #undef DEBUG                 /* General debug */
 #undef DEBUG_BOOTP_EXT       /* Debug received vendor fields */
 
+#undef CONFIG_LOGBUFFER       /* External logbuffer support */
+
 /*****************************************************************************
  *
  * These settings must match the way _your_ board is set up
 
 #ifdef CONFIG_ETHER_ON_FCC
 #define CONFIG_ETHER_INDEX     2       /* which SCC/FCC channel for ethernet */
+#undef  CONFIG_ETHER_LOOPBACK_TEST      /* Ethernet external loopback test */
 #define CONFIG_MII                     /* MII PHY management           */
 #define CONFIG_BITBANGMII              /* bit-bang MII PHY management  */
 /*
  * will be part of the default enviroment compiled into the boot image.
  */
 #define CONFIG_EXTRA_ENV_SETTINGS \
-"serverip=192.168.123.201\0" \
+"quiet=0\0" \
+"serverip=192.168.123.205\0" \
 "ipaddr=192.168.123.203\0" \
 "checkhostname=VR8500\0" \
 "reprog="\
+    "bootp; " \
     "tftpboot 0x140000 /bdi2000/u-boot.bin; " \
     "protect off 60000000 6003FFFF; " \
     "erase 60000000 6003FFFF; " \
 "adc-12=echo ### ADC-12 ; imd.b e 81 e\0" \
 "adc-34=echo ### ADC-34 ; imd.b f 81 e\0" \
 "dac=echo ### DAC ; imd.b 11 81 5\0" \
-"boot-hook=run ana\0"
+"boot-hook=echo\0"
 
 /* What should the console's baud rate be? */
 #define CONFIG_BAUDRATE                9600
 
 #define CONFIG_BOOTP_RANDOM_DELAY       /* Randomize the BOOTP retry delay */
 
-#define CONFIG_BOOTP_RETRY_COUNT 0x40000000 /* # of timeouts before giving up */
-
 /* Add support for a few extra bootp options like:
  *     - File size
- *     - DNS
+ *     - DNS (up to 2 servers)
+ *      - Send hostname to DHCP server 
  */
 #define CONFIG_BOOTP_MASK      (CONFIG_BOOTP_DEFAULT | \
                                 CONFIG_BOOTP_BOOTFILESIZE | \
-                                CONFIG_BOOTP_DNS)
+                                CONFIG_BOOTP_DNS | \
+                                 CONFIG_BOOTP_DNS2 | \
+                                 CONFIG_BOOTP_SEND_HOSTNAME)
 
 /* undef this to save memory */
 #define CFG_LONGHELP
  */
 #define CONFIG_TIMESTAMP
 
+/* If this variable is defined, an environment variable named "ver" 
+ * is created by U-Boot showing the U-Boot version.
+ */
+#define CONFIG_VERSION_VARIABLE
+
 /* What U-Boot subsytems do you want enabled? */
 #ifdef CONFIG_ETHER_ON_FCC
 # define CONFIG_COMMANDS       (((CONFIG_CMD_DFL & ~(CFG_CMD_KGDB))) | \
                                CFG_CMD_SDRAM   | \
                                CFG_CMD_REGINFO | \
                                CFG_CMD_IMMAP   | \
+                               CFG_CMD_IRQ     | \
+                               CFG_CMD_PING    | \
                                CFG_CMD_MII     )
 #else
 # define CONFIG_COMMANDS       (((CONFIG_CMD_DFL & ~(CFG_CMD_KGDB))) | \
                                CFG_CMD_SPI     | \
                                CFG_CMD_SDRAM   | \
                                CFG_CMD_REGINFO | \
-                               CFG_CMD_IMMAP   )
+                               CFG_CMD_IMMAP   | \
+                               CFG_CMD_IRQ     | \
+                               CFG_CMD_PING    )
 #endif /* CONFIG_ETHER_ON_FCC */
 
 /* Where do the internal registers live? */
 #define CFG_IMMR               0xF0000000
 
+#undef CONFIG_WATCHDOG                 /* disable the watchdog */
+
 /*****************************************************************************
  *
  * You should not have to modify any of the following settings
 /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
 #include <cmd_confdefs.h>
 
+
 /*
  * Miscellaneous configurable options
  */
+#define CFG_BOOTM_HEADER_QUIET 1        /* Suppress the image header dump    */
+                                        /* in the bootm command.             */
+#define CFG_BOOTM_PROGESS_QUIET 1       /* Suppress the progress displays,   */
+                                        /* "## <message>" from the bootm cmd */
+#define CFG_BOOTP_CHECK_HOSTNAME 1      /* If checkhostname environment is   */
+                                        /* defined, then the hostname param  */
+                                        /* validated against checkhostname.  */
+#define CFG_BOOTP_RETRY_COUNT 0x40000000 /* # of timeouts before giving up   */
+#define CFG_BOOTP_SHORT_RANDOM_DELAY 1  /* Use a short random delay value    */
+                                        /* (limited to maximum of 1024 msec) */
+#define CFG_CHK_FOR_ABORT_AT_LEAST_ONCE 1
+                                        /* Check for abort key presses       */
+                                        /* at least once in dependent of the */
+                                        /* CONFIG_BOOTDELAY value.           */
+#define CFG_CONSOLE_INFO_QUIET 1        /* Don't print console @ startup     */
+#define CFG_FAULT_ECHO_LINK_DOWN 1      /* Echo the inverted Ethernet link   */
+                                        /* state to the fault LED.           */
+#define CFG_FAULT_MII_ADDR 0x02         /* MII addr of the PHY to check for  */
+                                        /* the Ethernet link state.          */
+#define CFG_STATUS_FLASH_UNTIL_TFTP_OK 1 /* Keeping the status LED flashing  */
+                                        /* until the TFTP is successful.     */
+#define CFG_STATUS_OFF_AFTER_NETBOOT 1  /* After a successful netboot,       */
+                                        /* turn off the STATUS LEDs.         */
+#define CFG_TFTP_BLINK_STATUS_ON_DATA_IN 1 /* Blink status LED based on      */
+                                        /* incoming data.                    */
+#define CFG_TFTP_BLOCKS_PER_HASH 100    /* For every XX blocks, output a '#' */
+                                        /* to signify that tftp is moving.   */
+#define CFG_TFTP_HASHES_PER_FLASH 200   /* For every '#' hashes,             */
+                                       /* flash the status LED.             */
+#define CFG_TFTP_HASHES_PER_LINE 65     /* Only output XX '#'s per line      */
+                                        /* during the tftp file transfer.    */
+#define CFG_TFTP_PROGESS_QUIET 1        /* Suppress the progress displays    */
+                                        /* '#'s from the tftp command.       */
+#define CFG_TFTP_STATUS_QUIET 1         /* Suppress the status displays      */
+                                        /* issued during the tftp command.   */
+#define CFG_TFTP_TIMEOUT_COUNT 5        /* How many timeouts TFTP will allow */
+                                       /* before it gives up.               */
+
 #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
 #  define CFG_CBSIZE           1024    /* Console I/O Buffer Size           */
 #else
  *-----------------------------------------------------------------------
  * Watchdog & Bus Monitor Timer max, 60x Bus Monitor enable
  */
+#if defined(CONFIG_WATCHDOG)
+#define CFG_SYPCR      (SYPCR_SWTC |\
+                        SYPCR_BMT  |\
+                        SYPCR_PBME |\
+                        SYPCR_LBME |\
+                        SYPCR_SWRI |\
+                        SYPCR_SWP  |\
+                         SYPCR_SWE)
+#else
 #define CFG_SYPCR      (SYPCR_SWTC |\
                         SYPCR_BMT  |\
                         SYPCR_PBME |\
                         SYPCR_LBME |\
                         SYPCR_SWRI |\
                         SYPCR_SWP)
+#endif /* CONFIG_WATCHDOG */
 
 /*-----------------------------------------------------------------------
  * TMCNTSC - Time Counter Status and Control                    4-40