]> www.infradead.org Git - users/rw/ppcboot.git/commitdiff
* Run watchdog POST on every power-on
authorwdenk <wdenk>
Wed, 2 Oct 2002 20:50:49 +0000 (20:50 +0000)
committerwdenk <wdenk>
Wed, 2 Oct 2002 20:50:49 +0000 (20:50 +0000)
* Fix problems with LWMON's 100 ms watchdog period

* Fix bug in init sequence (caused by injudicious code
  re-arrangement)

* Increase monitor size for TQM8xxL to 256 kB; more memory is needed
  when using redundand environment

* Fix building under FreeBSD

CHANGELOG
cpu/mpc8xx/i2c.c
cpu/mpc8xx/interrupts.c
include/configs/TQM823L.h
include/configs/TQM850L.h
include/configs/TQM855L.h
include/configs/TQM860L.h
include/elf.h
include/version.h
lib_ppc/board.c
post/tests.c

index a060ac963e74aea4fb9d43b1b16cc0ab392dc535..f0c0cbbb2b0cd5ef6127d3a24c02e5a568a8c8e1 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,18 @@
 Modifications since 1.2.0:
 ======================================================================
 
+* Run watchdog POST on every power-on
+
+* Fix problems with LWMON's 100 ms watchdog period
+
+* Fix bug in init sequence (caused by injudicious code
+  re-arrangement)
+
+* Increase monitor size for TQM8xxL to 256 kB; more memory is needed
+  when using redundand environment
+
+* Fix building under FreeBSD
+
 * Fix flash sector size for SMDK2400, and flash bank size for TRAB
 
 * Fix undefined variables problem in lib_ppc/board.c for some boards
index fcbeac0e76524cebb188cc2adf1e7eb3447f78e5..9d5d9d265fc4426f8f887899525669daef2fa012 100644 (file)
@@ -33,6 +33,9 @@
 
 #include <commproc.h>
 #include <i2c.h>
+#ifdef CONFIG_LWMON
+#include <watchdog.h>
+#endif
 
 /* define to enable debug messages */
 #undef DEBUG_I2C
@@ -611,6 +614,10 @@ int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len)
        uchar xaddr[4];
        int rc;
 
+#ifdef CONFIG_LWMON
+       WATCHDOG_RESET();
+#endif
+
        xaddr[0] = (addr >> 24) & 0xFF;
        xaddr[1] = (addr >> 16) & 0xFF;
        xaddr[2] = (addr >>  8) & 0xFF;
index d6136437db9cd9f599da4b467ec09f7fbae7e458..3f3559e202124e09a8713a7772e8b3a760a72fc5 100644 (file)
@@ -309,12 +309,18 @@ void timer_interrupt(struct pt_regs *regs)
 
 #if defined(CONFIG_WATCHDOG) || defined(CFG_CMA_LCD_HEARTBEAT)
 
-        /*
-         * The shortest watchdog period of all boards is (so far)
-         * approx. 1 sec, thus re-trigger watchdog at least
+
+       /*
+        * The shortest watchdog period of all boards (except LWMON)
+        * is approx. 1 sec, thus re-trigger watchdog at least
         * every 500 ms = CFG_HZ / 2
         */
+#ifndef CONFIG_LWMON
        if ((timestamp % (CFG_HZ / 2)) == 0) {
+#else
+       if ((timestamp % (CFG_HZ / 20)) == 0) {
+#endif
+
 #if defined(CFG_CMA_LCD_HEARTBEAT)
                extern void lcd_heartbeat(void);
                lcd_heartbeat();
index 204f2b633c1c1d519fe78dc9076a5e582445d4fe..4eec70c560cd49a63c7fbef63d6575a8409a2604 100644 (file)
  */
 #define        CFG_SDRAM_BASE          0x00000000
 #define CFG_FLASH_BASE         0x40000000
-#if defined(DEBUG)
 #define        CFG_MONITOR_LEN         (256 << 10)     /* Reserve 256 kB for Monitor   */
-#else
-#define        CFG_MONITOR_LEN         (192 << 10)     /* Reserve 192 kB for Monitor   */
-#endif
 #define CFG_MONITOR_BASE       CFG_FLASH_BASE
 #define        CFG_MALLOC_LEN          (128 << 10)     /* Reserve 128 kB for malloc()  */
 
index 5213c0ad7f0c9f65a4075ee12c402968047feef1..71ea2a860a7fc0e67ab80d4defe4fafd54a1d1c3 100644 (file)
  */
 #define        CFG_SDRAM_BASE          0x00000000
 #define CFG_FLASH_BASE         0x40000000
-#if defined(DEBUG)
 #define        CFG_MONITOR_LEN         (256 << 10)     /* Reserve 256 kB for Monitor   */
-#else
-#define        CFG_MONITOR_LEN         (192 << 10)     /* Reserve 192 kB for Monitor   */
-#endif
 #define CFG_MONITOR_BASE       CFG_FLASH_BASE
 #define        CFG_MALLOC_LEN          (128 << 10)     /* Reserve 128 kB for malloc()  */
 
index 3c7dd611cc1654c0b74b8df25459bd4dedd105ee..68151b41f245fdc0e17c5f5d4b1e650d76cd2cd1 100644 (file)
  */
 #define        CFG_SDRAM_BASE          0x00000000
 #define CFG_FLASH_BASE         0x40000000
-#if defined(DEBUG)
 #define        CFG_MONITOR_LEN         (256 << 10)     /* Reserve 256 kB for Monitor   */
-#else
-#define        CFG_MONITOR_LEN         (192 << 10)     /* Reserve 192 kB for Monitor   */
-#endif
 #define CFG_MONITOR_BASE       CFG_FLASH_BASE
 #define        CFG_MALLOC_LEN          (128 << 10)     /* Reserve 128 kB for malloc()  */
 
index 82a49030b77a0906cd1006c6544fecdf17a9dd96..a3d6b27caeea99935c65e19afa787cc61f713b72 100644 (file)
  */
 #define        CFG_SDRAM_BASE          0x00000000
 #define CFG_FLASH_BASE         0x40000000
-#if defined(DEBUG)
 #define        CFG_MONITOR_LEN         (256 << 10)     /* Reserve 256 kB for Monitor   */
-#else
-#define        CFG_MONITOR_LEN         (192 << 10)     /* Reserve 192 kB for Monitor   */
-#endif
 #define CFG_MONITOR_BASE       CFG_FLASH_BASE
 #define        CFG_MALLOC_LEN          (128 << 10)     /* Reserve 128 kB for malloc()  */
 
index 82e8ca801048416307d584ca0b48f31a09270be4..ed238c37f462cc3c396b7c7117320d9b18f5e41d 100644 (file)
 #ifndef _ELF_H
 #define _ELF_H
 
-#if defined(__BEOS__)  || \
-    defined(__NetBSD__) || \
-    defined(__sun__)   || \
+#if defined(__BEOS__)   || \
+    defined(__NetBSD__)  || \
+    defined(__FreeBSD__) || \
+    defined(__sun__)    || \
     defined(__APPLE__)
 #include <inttypes.h>
 #elif defined(__linux__) && defined(USE_HOSTCC)
index 165558e8bb827307959a11ec5224af8306be52ea..197f8c5cc53679585d5380c95d6fbd175b5e5244 100644 (file)
@@ -24,6 +24,6 @@
 #ifndef        __VERSION_H__
 #define        __VERSION_H__
 
-#define        PPCBOOT_VERSION "PPCBoot 1.2.0"
+#define        PPCBOOT_VERSION "PPCBoot 1.2.1"
 
 #endif /* __VERSION_H__ */
index defbb344c7fae99840f13c1640640c65097e70dd..007de0bb772f523874676d746d0c7841ee61e8b6 100644 (file)
@@ -556,58 +556,6 @@ void board_init_r (gd_t *id, ulong dest_addr)
 
        gd->reloc_off = dest_addr - CFG_MONITOR_BASE;
 
-       /*
-        * Fill in missing fields of bd_info.
-         * We do this here, where we have "normal" access to the
-         * environment; we used to do this still running from ROM,
-         * where had to use getenv_r(), which can be pretty slow when
-         * the environment is in EEPROM.
-        */
-       s = getenv ("ethaddr");
-#if defined (CONFIG_MBX) || defined (CONFIG_RPXCLASSIC) || defined(CONFIG_IAD210)
-       if (s == NULL)
-               board_get_enetaddr (bd->bi_enetaddr);
-       else
-#endif
-               for (i = 0; i < 6; ++i) {
-                       bd->bi_enetaddr[i] = s ? simple_strtoul (s, &e, 16) : 0;
-                       if (s)
-                               s = (*e) ? e + 1 : e;
-               }
-#ifdef CONFIG_HERMES
-       if ((gd->board_type >> 16) == 2)
-               bd->bi_ethspeed = gd->board_type & 0xFFFF;
-       else
-               bd->bi_ethspeed = 0xFFFF;
-#endif
-
-#ifdef CONFIG_NX823
-       load_sernum_ethaddr ();
-#endif
-
-#if defined(CFG_GT_6426x) || defined(CONFIG_PN62)
-       /* handle the 2nd ethernet address */
-
-       s = getenv ("eth1addr");
-
-       for (i = 0; i < 6; ++i) {
-               bd->bi_enet1addr[i] = s ? simple_strtoul (s, &e, 16) : 0;
-               if (s)
-                       s = (*e) ? e + 1 : e;
-       }
-#endif
-#if defined(CFG_GT_6426x)
-       /* handle the 3rd ethernet address */
-
-       s = getenv ("eth2addr");
-
-       for (i = 0; i < 6; ++i) {
-               bd->bi_enet2addr[i] = s ? simple_strtoul (s, &e, 16) : 0;
-               if (s)
-                       s = (*e) ? e + 1 : e;
-       }
-#endif
-
        /*
         * We have to relocate the command table manually
         */
@@ -733,6 +681,59 @@ void board_init_r (gd_t *id, ulong dest_addr)
        /* relocate environment function pointers etc. */
        env_relocate ();
 
+       /*
+        * Fill in missing fields of bd_info.
+         * We do this here, where we have "normal" access to the
+         * environment; we used to do this still running from ROM,
+         * where had to use getenv_r(), which can be pretty slow when
+         * the environment is in EEPROM.
+        */
+       s = getenv ("ethaddr");
+#if defined (CONFIG_MBX) || defined (CONFIG_RPXCLASSIC) || defined(CONFIG_IAD210)
+       if (s == NULL)
+               board_get_enetaddr (bd->bi_enetaddr);
+       else
+#endif
+               for (i = 0; i < 6; ++i) {
+                       bd->bi_enetaddr[i] = s ? simple_strtoul (s, &e, 16) : 0;
+                       if (s)
+                               s = (*e) ? e + 1 : e;
+               }
+#ifdef CONFIG_HERMES
+       if ((gd->board_type >> 16) == 2)
+               bd->bi_ethspeed = gd->board_type & 0xFFFF;
+       else
+               bd->bi_ethspeed = 0xFFFF;
+#endif
+
+#ifdef CONFIG_NX823
+       load_sernum_ethaddr ();
+#endif
+
+#if defined(CFG_GT_6426x) || defined(CONFIG_PN62)
+       /* handle the 2nd ethernet address */
+
+       s = getenv ("eth1addr");
+
+       for (i = 0; i < 6; ++i) {
+               bd->bi_enet1addr[i] = s ? simple_strtoul (s, &e, 16) : 0;
+               if (s)
+                       s = (*e) ? e + 1 : e;
+       }
+#endif
+#if defined(CFG_GT_6426x)
+       /* handle the 3rd ethernet address */
+
+       s = getenv ("eth2addr");
+
+       for (i = 0; i < 6; ++i) {
+               bd->bi_enet2addr[i] = s ? simple_strtoul (s, &e, 16) : 0;
+               if (s)
+                       s = (*e) ? e + 1 : e;
+       }
+#endif
+
+
 #if defined(CONFIG_TQM8xxL) || defined(CONFIG_TQM8260) || \
     defined(CONFIG_CCM)
        load_sernum_ethaddr ();
index b200703404908a6889471a39b1343036a868dda7..dfe5c3292b9bfca48c2ef92bc91379baeaab406b 100644 (file)
@@ -55,7 +55,7 @@ struct post_test post_list[] =
         "Watchdog timer test",
         "watchdog",
         "This test checks the watchdog timer.",
-        POST_RAM | POST_POWERFAIL | POST_MANUAL | POST_REBOOT,
+        POST_RAM | POST_POWERON | POST_POWERFAIL | POST_MANUAL | POST_REBOOT,
         &watchdog_post_test
     },
 #endif