]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
* Get (mostly) rid of CFG_MONITOR_LEN definition; compute real length LABEL_2003_05_30_1450
authorwdenk <wdenk>
Fri, 30 May 2003 12:48:29 +0000 (12:48 +0000)
committerwdenk <wdenk>
Fri, 30 May 2003 12:48:29 +0000 (12:48 +0000)
  instead CFG_MONITOR_LEN is now only used to determine  _at_compile_
  _time_  (!) if the environment is embedded within the U-Boot image,
  or in a separate flash sector.

* Cleanup CFG_DER #defines in config files (wd maintained only)

125 files changed:
CHANGELOG
README
board/LEOX/elpt860/flash.c
board/MAI/AmigaOneG3SE/flash_new.c
board/RPXClassic/flash.c
board/RPXlite/flash.c
board/RRvision/flash.c
board/atc/flash.c
board/bmw/flash.c
board/c2mon/flash.c
board/cmi/flash.c
board/cogent/flash.c
board/cpc45/flash.c
board/cpu86/flash.c
board/cradle/flash.c
board/cray/L1/flash.c
board/csb226/flash.c
board/cu824/flash.c
board/dnp1110/flash.c
board/eltec/bab7xx/flash.c
board/eltec/elppc/flash.c
board/eltec/mhpc/flash.c
board/ep7312/flash.c
board/ep8260/flash.c
board/eric/flash.c
board/esd/adciop/flash.c
board/esd/ar405/flash.c
board/esd/canbt/flash.c
board/esd/cpci405/flash.c
board/esd/cpci440/strataflash.c
board/esd/cpciiser4/flash.c
board/esd/dasa_sim/flash.c
board/esd/du405/flash.c
board/esd/ocrtc/flash.c
board/esd/pci405/flash.c
board/esteem192e/flash.c
board/etx094/flash.c
board/fads/flash.c
board/flagadm/flash.c
board/gen860t/flash.c
board/genietv/flash.c
board/gth/flash.c
board/gw8260/flash.c
board/hermes/flash.c
board/hymod/flash.c
board/icu862/flash.c
board/impa7/flash.c
board/incaip/flash.c
board/ip860/flash.c
board/iphase4539/flash.c
board/ivm/flash.c
board/kup4k/flash.c
board/lantec/flash.c
board/lart/flash.c
board/lubbock/flash.c
board/lwmon/flash.c
board/mbx8xx/flash.c
board/mpc8260ads/flash.c
board/mpc8266ads/flash.c
board/mpl/common/flash.c
board/mpl/vcma9/flash.c
board/musenki/flash.c
board/mvs1/flash.c
board/netvia/flash.c
board/nx823/flash.c
board/oxc/flash.c
board/pcippc2/flash.c
board/pm826/flash.c
board/ppmc8260/strataflash.c
board/purple/flash.c
board/purple/purple.c
board/r360mpi/flash.c
board/rpxsuper/flash.c
board/rsdproto/flash.c
board/sacsng/flash.c
board/sandpoint/flash.c
board/sbc8260/flash.c
board/shannon/flash.c
board/siemens/CCM/flash.c
board/siemens/SCM/flash.c
board/siemens/pcu_e/flash.c
board/sixnet/flash.c
board/smdk2400/flash.c
board/smdk2410/flash.c
board/svm_sc8xx/flash.c
board/tqm8260/flash.c
board/tqm8xx/flash.c
board/trab/flash.c
board/utx8245/flash.c
board/v37/flash.c
board/w7o/flash.c
board/walnut405/flash.c
board/wepep250/flash.c
board/westel/amx860/flash.c
cpu/74xx_7xx/start.S
cpu/mips/start.S
cpu/mpc5xx/start.S
cpu/mpc824x/start.S
cpu/mpc8260/start.S
cpu/mpc8xx/start.S
cpu/ppc4xx/start.S
include/common.h
include/configs/ETX094.h
include/configs/FPS850L.h
include/configs/FPS860L.h
include/configs/IP860.h
include/configs/IVML24.h
include/configs/IVMS8.h
include/configs/KUP4K.h
include/configs/LANTEC.h
include/configs/R360MPI.h
include/configs/RRvision.h
include/configs/SM850.h
include/configs/SPD823TS.h
include/configs/TQM823L.h
include/configs/TQM850L.h
include/configs/TQM855L.h
include/configs/TQM860L.h
include/configs/TQM862L.h
include/configs/c2mon.h
include/configs/hermes.h
include/configs/lwmon.h
lib_arm/board.c
lib_mips/board.c
lib_ppc/board.c

index f28631a6878a34e0418268fb7a23411b4bcc0294..3a97de7e1d05e11953f0018584293c520ba60862 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,13 @@
 Changes since U-Boot 0.3.1:
 ======================================================================
 
+* Get (mostly) rid of CFG_MONITOR_LEN definition; compute real length
+  instead CFG_MONITOR_LEN is now only used to determine  _at_compile_
+  _time_  (!) if the environment is embedded within the U-Boot image,
+  or in a separate flash sector.
+
+* Cleanup CFG_DER #defines in config files (wd maintained only)
+
 * Fix data abort exception handling for arm920t CPU
 
 * Fix alignment problems with flash driver for TRAB board
diff --git a/README b/README
index e9b714567f93cb3bd7e127f6a9fbe237b88f250e..06fade67fabaddef1c904a71b161327ef922937b 100644 (file)
--- a/README
+++ b/README
@@ -1183,13 +1183,13 @@ The following options need to be configured:
 
        Note:
 
-               In the current implementation, the local variables
-               space and global environment variables space are
-               separated. Local variables are those you define by
-               simply typing like `name=value'. To access a local
-               variable later on, you have write `$name' or
-               `${name}'; variable directly by typing say `$name' at
-               the command prompt.
+                In the current implementation, the local variables
+                space and global environment variables space are
+                separated. Local variables are those you define by
+                simply typing `name=value'. To access a local
+                variable later on, you have write `$name' or
+                `${name}'; to execute the contents of a variable
+                directly type `$name' at the command prompt.
 
                Global environment variables are those you use
                setenv/printenv to work with. To run a command stored
@@ -1389,7 +1389,10 @@ Configuration Settings:
                CFG_FLASH_BASE when booting from flash.
 
 - CFG_MONITOR_LEN:
-               Size of memory reserved for monitor code
+                Size of memory reserved for monitor code, used to
+                determine _at_compile_time_ (!) if the environment is
+                embedded within the U-Boot image, or in a separate
+                flash sector.
 
 - CFG_MALLOC_LEN:
                Size of DRAM reserved for malloc() use.
index a9238e16cfe14908897cf2f9b39e7c7dcabfaf6a..7107aaa6c26b5996ae97fbd13040aa7fff78dc0b 100644 (file)
@@ -118,7 +118,7 @@ flash_init (void)
   /* monitor protection ON by default */
   flash_protect (FLAG_PROTECT_SET,
                 CFG_MONITOR_BASE,
-                CFG_MONITOR_BASE + CFG_MONITOR_LEN-1,
+                CFG_MONITOR_BASE + monitor_flash_len-1,
                 &flash_info[0]);
 #endif
   
index 6eebeba0f2103bacb25ddad9c2de877ee9fa5d33..3fb9f1246b412cdec7d68dbd4697a4a7bee5c2bd 100644 (file)
@@ -120,7 +120,7 @@ unsigned long flash_init (void)
                /* monitor protection ON by default */
                flash_protect(FLAG_PROTECT_SET,
                              CFG_MONITOR_BASE,
-                             CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1,
+                             CFG_MONITOR_BASE + monitor_flash_len - 1,
                              &flash_info[0]);
 #endif
 
index 62934975fef2866fba10697b157bf80c864131e0..fdf90cfa94e51c4db08edb266b6a63e7bc217f3b 100644 (file)
@@ -64,7 +64,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 #endif
 
index 78c1838b792cc896f347009529e7ca2069311aa9..846794df3f76456f921416958c37bd0ae7dacd41 100644 (file)
@@ -85,7 +85,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 #endif
 
index 06f7c4b7ac24088be403a4b19023d3f58984c8d9..d8e07e6450fef91630eaa898ef647a9b38b10ba1 100644 (file)
@@ -73,7 +73,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 #endif
 
index 7e971822e07a73fda2dc4ae880ff45ae5fe772b6..6d7b38bde84b0f2c7b5a214c4d477b1cfa2be809 100644 (file)
@@ -91,7 +91,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      flash_get_info(CFG_MONITOR_BASE));
 #endif
 
index 6a7649ffe5a9f70c43ceb8b6d7c5179ff04f061d..be622743f09847e59f33eb1e4c1fce4aaf93ce88 100644 (file)
@@ -219,7 +219,7 @@ flash_init(void)
 #if CFG_MONITOR_BASE >= CFG_FLASH_BASE
     flash_protect(FLAG_PROTECT_SET,
                CFG_MONITOR_BASE,
-               CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1,
+               CFG_MONITOR_BASE + monitor_flash_len - 1,
                &flash_info[0]);
 #endif
 
index 181f82af2f4773cca606bee8ea8d76ef0599d678..b2be21c68451305aafd683670688289f776ef8b8 100644 (file)
@@ -91,7 +91,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 #endif
 
@@ -118,7 +118,7 @@ unsigned long flash_init (void)
                /* monitor protection ON by default */
                flash_protect(FLAG_PROTECT_SET,
                              CFG_MONITOR_BASE,
-                             CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                             CFG_MONITOR_BASE+monitor_flash_len-1,
                              &flash_info[1]);
 #endif
 
index b41ff12520e898470056aca8bb1e018e3794c753..9c802b9131dccb4649769cedc1138743e7a988e5 100644 (file)
@@ -106,7 +106,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 #endif
 
index 86da80edb81494f326d55d2ede794d4cd1a2468e..969520d277be263972f54019cbd19cfd6516b4d9 100644 (file)
@@ -323,7 +323,7 @@ flash_init(void)
 #if CFG_MONITOR_BASE == CFG_FLASH_BASE
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 #endif
 
index 6e81b9c335b7c60f5c6a2ef940e0b41a5e8b3090..a289d0894202831d3a51eda46fffbd333220fd0d 100644 (file)
@@ -132,12 +132,12 @@ unsigned long flash_init(void)
 #if CFG_MONITOR_BASE >= CFG_FLASH_BASE + FLASH_BANK_SIZE
     flash_protect(FLAG_PROTECT_SET,
               CFG_MONITOR_BASE,
-              CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1,
+              CFG_MONITOR_BASE + monitor_flash_len - 1,
               &flash_info[1]);
 #else
     flash_protect(FLAG_PROTECT_SET,
               CFG_MONITOR_BASE,
-              CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1,
+              CFG_MONITOR_BASE + monitor_flash_len - 1,
               &flash_info[0]);
 #endif
 #endif
index 8cf761f1e65512ee3a2cf053a792e51d3ab71ce0..0769dc5c62652dcb0abe3402ccbc77294e1b71c9 100644 (file)
@@ -218,14 +218,14 @@ unsigned long flash_init (void)
 
                flash_protect  (FLAG_PROTECT_SET,
                                CFG_MONITOR_BASE,
-                               CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1, &flash_info[1]
+                               CFG_MONITOR_BASE + monitor_flash_len - 1, &flash_info[1]
                );
        }
 #else
 #if CFG_MONITOR_BASE >= CFG_FLASH_BASE
        flash_protect (FLAG_PROTECT_SET,
                       CFG_MONITOR_BASE,
-                      CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1, &flash_info[0]
+                      CFG_MONITOR_BASE + monitor_flash_len - 1, &flash_info[0]
        );
 #endif
 #endif
index 265b609648b2e6aa7d94ee5b0d21f9cbff6de109..463026d0ea89551d51120bf60c059ee353384969 100644 (file)
@@ -73,7 +73,7 @@ ulong flash_init(void)
     */
    flash_protect(FLAG_PROTECT_SET,
                   CFG_FLASH_BASE,
-                  CFG_FLASH_BASE + _armboot_end_data - _armboot_start,
+                  CFG_FLASH_BASE + monitor_flash_len - 1,
                   &flash_info[0]);
 
    flash_protect(FLAG_PROTECT_SET,
index 6d66905d9a0ff3617e85edbc2616dd11b0c7255d..829dbaecbe316411da44fda258be46c43fddcba0 100644 (file)
@@ -88,7 +88,7 @@ unsigned long flash_init (void)
            /* Monitor protection ON by default */
            (void)flash_protect(FLAG_PROTECT_SET,
                                FLASH_BASE0_PRELIM,
-                               FLASH_BASE0_PRELIM+CFG_MONITOR_LEN-1,
+                               FLASH_BASE0_PRELIM+monitor_flash_len-1,
                                &flash_info[0]);
 #endif
            size_b1 = 0 ;
index c6cb95e2f348cb8ef400c9afd830d79d70d0c5b6..0ee78e6f2fc3cb5065e4a731a8b1074ea8d3e38d 100644 (file)
@@ -74,7 +74,7 @@ ulong flash_init(void)
        /* Protect monitor and environment sectors */
        flash_protect(FLAG_PROTECT_SET,
                        CFG_FLASH_BASE,
-                       CFG_FLASH_BASE + _armboot_end_data - _armboot_start,
+                       CFG_FLASH_BASE + monitor_flash_len - 1,
                        &flash_info[0]);
 
        flash_protect(FLAG_PROTECT_SET,
index 0cec41ebdbd2782baccc8d7c7e2b4ce794b8bcd1..61b759ec57561bece980766ea6305609340b43ff 100644 (file)
@@ -125,12 +125,12 @@ unsigned long flash_init(void)
 #if CFG_MONITOR_BASE >= CFG_FLASH_BASE + FLASH_BANK_SIZE
     flash_protect(FLAG_PROTECT_SET,
               CFG_MONITOR_BASE,
-              CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1,
+              CFG_MONITOR_BASE + monitor_flash_len - 1,
               &flash_info[1]);
 #else
     flash_protect(FLAG_PROTECT_SET,
               CFG_MONITOR_BASE,
-              CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1,
+              CFG_MONITOR_BASE + monitor_flash_len - 1,
               &flash_info[0]);
 #endif
 #endif
index bb6d2e7995995269f676d240b7bd72575a224911..f4a8b999c6186e9117b61b024c69897fa068112c 100644 (file)
@@ -84,7 +84,7 @@ unsigned long flash_init (void)
      */
     flash_protect(FLAG_PROTECT_SET,
                  CFG_FLASH_BASE,
-                 CFG_FLASH_BASE + _armboot_end_data - _armboot_start,
+                 CFG_FLASH_BASE + monitor_flash_len  - 1,
                  &flash_info[0]);
 
     flash_protect(FLAG_PROTECT_SET,
index 5834c9999903e4e816443f9567718a5bd8f402e4..73496a13dedcb4735cf9318db06ab29c7f2182a0 100644 (file)
@@ -83,21 +83,21 @@ unsigned long flash_init (void)
     {
         (void)flash_protect(FLAG_PROTECT_SET,
                 FLASH_BASE0_PRELIM,
-                FLASH_BASE0_PRELIM+CFG_MONITOR_LEN-1,
+                FLASH_BASE0_PRELIM+monitor_flash_len-1,
                 &flash_info[0]);
     }
     if (size2 == 512*1024)
     {
         (void)flash_protect(FLAG_PROTECT_SET,
                 FLASH_BASE1_PRELIM,
-                FLASH_BASE1_PRELIM+CFG_MONITOR_LEN-1,
+                FLASH_BASE1_PRELIM+monitor_flash_len-1,
                 &flash_info[1]);
     }
     if (size2 == 4*1024*1024)
     {
         (void)flash_protect(FLAG_PROTECT_SET,
                 CFG_FLASH_BASE,
-                CFG_FLASH_BASE+CFG_MONITOR_LEN-1,
+                CFG_FLASH_BASE+monitor_flash_len-1,
                 &flash_info[1]);
     }
 
index 5834c9999903e4e816443f9567718a5bd8f402e4..73496a13dedcb4735cf9318db06ab29c7f2182a0 100644 (file)
@@ -83,21 +83,21 @@ unsigned long flash_init (void)
     {
         (void)flash_protect(FLAG_PROTECT_SET,
                 FLASH_BASE0_PRELIM,
-                FLASH_BASE0_PRELIM+CFG_MONITOR_LEN-1,
+                FLASH_BASE0_PRELIM+monitor_flash_len-1,
                 &flash_info[0]);
     }
     if (size2 == 512*1024)
     {
         (void)flash_protect(FLAG_PROTECT_SET,
                 FLASH_BASE1_PRELIM,
-                FLASH_BASE1_PRELIM+CFG_MONITOR_LEN-1,
+                FLASH_BASE1_PRELIM+monitor_flash_len-1,
                 &flash_info[1]);
     }
     if (size2 == 4*1024*1024)
     {
         (void)flash_protect(FLAG_PROTECT_SET,
                 CFG_FLASH_BASE,
-                CFG_FLASH_BASE+CFG_MONITOR_LEN-1,
+                CFG_FLASH_BASE+monitor_flash_len-1,
                 &flash_info[1]);
     }
 
index 58cfd7047fd19e5bb5e8754df965286c51f0ae56..e9c8f9862d4e3f3c714dc4afd40e41546d5f5b87 100644 (file)
@@ -92,7 +92,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        (void)flash_protect(FLAG_PROTECT_SET,
                            CFG_FLASH_BASE,
-                           CFG_FLASH_BASE+CFG_MONITOR_LEN-1,
+                           CFG_FLASH_BASE+monitor_flash_len-1,
                            &flash_info[0]);
 
        flash_info[0].size = size_b0;
index 373d238ccf1982c634600ebc1a9b7ea64a346298..1ee0a37a00de1747162dd7b33d9780d889583410 100644 (file)
@@ -61,7 +61,7 @@ ulong flash_init (void)
         */
        flash_protect ( FLAG_PROTECT_SET,
                        CFG_FLASH_BASE,
-                       CFG_FLASH_BASE + _armboot_end_data - _armboot_start,
+                       CFG_FLASH_BASE + monitor_flash_len - 1,
                        &flash_info[0]);
 
        flash_protect ( FLAG_PROTECT_SET,
index cae8a13dde0e5df6fa3dfb292ea988db9c9d0155..d9dbdbee921306617f7210cbdb0459a7ff69e8fb 100644 (file)
@@ -140,7 +140,7 @@ unsigned long flash_init (void)
 #if CFG_MONITOR_BASE >= CFG_FLASH0_BASE
     flash_protect(FLAG_PROTECT_SET,
                  CFG_MONITOR_BASE,
-                 CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                 CFG_MONITOR_BASE+monitor_flash_len-1,
                  &flash_info[0]);
 #endif
 
index c3f6e15bc54019c815d39f23e316702cc280590c..5dfb620c6cb3ffa56e2e52f5bce6335f33fef65c 100644 (file)
@@ -83,13 +83,13 @@ unsigned long flash_init (void)
            /* Monitor protection ON by default */
 #if 0      /* sand: */
            (void)flash_protect(FLAG_PROTECT_SET,
-                               FLASH_BASE0_PRELIM-CFG_MONITOR_LEN+size_b0,
+                               FLASH_BASE0_PRELIM-monitor_flash_len+size_b0,
                                FLASH_BASE0_PRELIM-1+size_b0,
                                &flash_info[0]);
 #else
            (void)flash_protect(FLAG_PROTECT_SET,
                                CFG_MONITOR_BASE,
-                               CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                               CFG_MONITOR_BASE+monitor_flash_len-1,
                                &flash_info[0]);
 #endif
            size_b1 = 0 ;
@@ -132,13 +132,13 @@ unsigned long flash_init (void)
            /* monitor protection ON by default */
 #if 0      /* sand: */
            (void)flash_protect(FLAG_PROTECT_SET,
-                               FLASH_BASE0_PRELIM-CFG_MONITOR_LEN+size_b0,
+                               FLASH_BASE0_PRELIM-monitor_flash_len+size_b0,
                                FLASH_BASE0_PRELIM-1+size_b0,
                                &flash_info[0]);
 #else
            (void)flash_protect(FLAG_PROTECT_SET,
                                CFG_MONITOR_BASE,
-                               CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                               CFG_MONITOR_BASE+monitor_flash_len-1,
                                &flash_info[0]);
 #endif
 
@@ -150,12 +150,12 @@ unsigned long flash_init (void)
 
              /* monitor protection ON by default */
              (void)flash_protect(FLAG_PROTECT_SET,
-                                 base_b1+size_b1-CFG_MONITOR_LEN,
+                                 base_b1+size_b1-monitor_flash_len,
                                  base_b1+size_b1-1,
                                  &flash_info[1]);
              /* monitor protection OFF by default (one is enough) */
              (void)flash_protect(FLAG_PROTECT_CLEAR,
-                                 base_b0+size_b0-CFG_MONITOR_LEN,
+                                 base_b0+size_b0-monitor_flash_len,
                                  base_b0+size_b0-1,
                                  &flash_info[0]);
            } else {
index 46ae03b3c062bf920f9f95ea031f60a21a7e112b..69618de1fcec7db21f09de3ec21399825bccb8af 100644 (file)
@@ -80,7 +80,7 @@ unsigned long flash_init (void)
 
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
-                     FLASH_BASE0_PRELIM+size_b0-CFG_MONITOR_LEN,
+                     FLASH_BASE0_PRELIM+size_b0-monitor_flash_len,
                      FLASH_BASE0_PRELIM+size_b0-1,
                      &flash_info[0]);
 
@@ -93,12 +93,12 @@ unsigned long flash_init (void)
 
                /* monitor protection ON by default */
                flash_protect(FLAG_PROTECT_SET,
-                             FLASH_BASE0_PRELIM+size_b0+size_b1-CFG_MONITOR_LEN,
+                             FLASH_BASE0_PRELIM+size_b0+size_b1-monitor_flash_len,
                              FLASH_BASE0_PRELIM+size_b0+size_b1-1,
                              &flash_info[1]);
                 /* monitor protection OFF by default (one is enough) */
                 flash_protect(FLAG_PROTECT_CLEAR,
-                             FLASH_BASE0_PRELIM+size_b0-CFG_MONITOR_LEN,
+                             FLASH_BASE0_PRELIM+size_b0-monitor_flash_len,
                              FLASH_BASE0_PRELIM+size_b0-1,
                              &flash_info[0]);
        } else {
index 4fa6b2733fd12f126684dab901eb6300cc58c930..3a644f9cc564cdbdc964028e8bc80d9a05e3ad0b 100644 (file)
@@ -94,7 +94,7 @@ unsigned long flash_init (void)
 
        /* monitor protection ON by default */
        (void)flash_protect(FLAG_PROTECT_SET,
-                           base_b0+size_b0-CFG_MONITOR_LEN,
+                           base_b0+size_b0-monitor_flash_len,
                            base_b0+size_b0-1,
                            &flash_info[0]);
 
@@ -106,12 +106,12 @@ unsigned long flash_init (void)
 
                /* monitor protection ON by default */
                (void)flash_protect(FLAG_PROTECT_SET,
-                                   base_b1+size_b1-CFG_MONITOR_LEN,
+                                   base_b1+size_b1-monitor_flash_len,
                                    base_b1+size_b1-1,
                                    &flash_info[1]);
                 /* monitor protection OFF by default (one is enough) */
                 (void)flash_protect(FLAG_PROTECT_CLEAR,
-                                    base_b0+size_b0-CFG_MONITOR_LEN,
+                                    base_b0+size_b0-monitor_flash_len,
                                     base_b0+size_b0-1,
                                     &flash_info[0]);
        } else {
index 214948f6d8587cb0c91674698c7aa7bc4dc029b6..685850e84fda5e40f57ac5d865c91293e81e18bd 100644 (file)
@@ -74,7 +74,7 @@ unsigned long flash_init (void)
 
         /* Monitor protection ON by default */
         (void)flash_protect(FLAG_PROTECT_SET,
-                            -CFG_MONITOR_LEN,
+                            -monitor_flash_len,
                             0xffffffff,
                             &flash_info[0]);
 
index 02de050b742db02691667ed71f855dd88a7ce92c..e766895bb06eb185726536ec07329f7cbdc3e024 100644 (file)
@@ -125,7 +125,7 @@ unsigned long flash_init (void)
 
        /* monitor protection ON by default */
        flash_protect (FLAG_PROTECT_SET,
-                       base_b0 + size_b0 - CFG_MONITOR_LEN,
+                       base_b0 + size_b0 - monitor_flash_len,
                        base_b0 + size_b0 - 1, &flash_info[0]);
 
        if (size_b1) {
@@ -136,11 +136,11 @@ unsigned long flash_init (void)
 
                /* monitor protection ON by default */
                flash_protect (FLAG_PROTECT_SET,
-                               base_b1 + size_b1 - CFG_MONITOR_LEN,
+                               base_b1 + size_b1 - monitor_flash_len,
                                base_b1 + size_b1 - 1, &flash_info[1]);
                /* monitor protection OFF by default (one is enough) */
                flash_protect (FLAG_PROTECT_CLEAR,
-                               base_b0 + size_b0 - CFG_MONITOR_LEN,
+                               base_b0 + size_b0 - monitor_flash_len,
                                base_b0 + size_b0 - 1, &flash_info[0]);
        } else {
                flash_info[1].flash_id = FLASH_UNKNOWN;
index 6f6286694bdaebfad3ec5a201cc229e8b793c30a..de57318e26cb647e6536d79c8ac93c11dcd8f19a 100644 (file)
@@ -200,7 +200,7 @@ unsigned long flash_init (void)
 #if 0 /* test-only */
        /* Monitor protection ON by default */
 #if (CFG_MONITOR_BASE >= CFG_FLASH_BASE)
-       for(i=0; flash_info[0].start[i] < CFG_MONITOR_BASE+CFG_MONITOR_LEN-1; i++)
+       for(i=0; flash_info[0].start[i] < CFG_MONITOR_BASE+monitor_flash_len-1; i++)
                (void)flash_real_protect(&flash_info[0], i, 1);
 #endif
 #endif
index 214948f6d8587cb0c91674698c7aa7bc4dc029b6..685850e84fda5e40f57ac5d865c91293e81e18bd 100644 (file)
@@ -74,7 +74,7 @@ unsigned long flash_init (void)
 
         /* Monitor protection ON by default */
         (void)flash_protect(FLAG_PROTECT_SET,
-                            -CFG_MONITOR_LEN,
+                            -monitor_flash_len,
                             0xffffffff,
                             &flash_info[0]);
 
index 2574eac7fdc848f6d392629ee4e381922442adb7..32cd64cf0883c4fcceca7ec31fae86b88d28ec02 100644 (file)
@@ -67,7 +67,7 @@ unsigned long flash_init (void)
 
         /* Monitor protection ON by default */
         (void)flash_protect(FLAG_PROTECT_SET,
-                            -CFG_MONITOR_LEN,
+                            -monitor_flash_len,
                             0xffffffff,
                             &flash_info[0]);
 
index 97d832228ea5a53ddba406271f416cfaff608bda..14549c0147e329bb6345488a424db35db26eae92 100644 (file)
@@ -94,7 +94,7 @@ unsigned long flash_init (void)
 
        /* monitor protection ON by default */
        flash_protect (FLAG_PROTECT_SET,
-                       base_b0 + size_b0 - CFG_MONITOR_LEN,
+                       base_b0 + size_b0 - monitor_flash_len,
                        base_b0 + size_b0 - 1, &flash_info[0]);
 
        if (size_b1) {
@@ -105,11 +105,11 @@ unsigned long flash_init (void)
 
                /* monitor protection ON by default */
                flash_protect (FLAG_PROTECT_SET,
-                               base_b1 + size_b1 - CFG_MONITOR_LEN,
+                               base_b1 + size_b1 - monitor_flash_len,
                                base_b1 + size_b1 - 1, &flash_info[1]);
                /* monitor protection OFF by default (one is enough) */
                flash_protect (FLAG_PROTECT_CLEAR,
-                               base_b0 + size_b0 - CFG_MONITOR_LEN,
+                               base_b0 + size_b0 - monitor_flash_len,
                                base_b0 + size_b0 - 1, &flash_info[0]);
        } else {
                flash_info[1].flash_id = FLASH_UNKNOWN;
index 90965eadf5f92174a16390ed06346858d4221453..c3d8bec91378863aefcb481325827374f7ae3c18 100644 (file)
@@ -127,7 +127,7 @@ unsigned long flash_init (void)
 
        /* monitor protection ON by default */
        flash_protect (FLAG_PROTECT_SET,
-                       base_b0 + size_b0 - CFG_MONITOR_LEN,
+                       base_b0 + size_b0 - monitor_flash_len,
                        base_b0 + size_b0 - 1, &flash_info[0]);
 
        if (size_b1) {
@@ -138,11 +138,11 @@ unsigned long flash_init (void)
 
                /* monitor protection ON by default */
                flash_protect (FLAG_PROTECT_SET,
-                               base_b1 + size_b1 - CFG_MONITOR_LEN,
+                               base_b1 + size_b1 - monitor_flash_len,
                                base_b1 + size_b1 - 1, &flash_info[1]);
                /* monitor protection OFF by default (one is enough) */
                flash_protect (FLAG_PROTECT_CLEAR,
-                               base_b0 + size_b0 - CFG_MONITOR_LEN,
+                               base_b0 + size_b0 - monitor_flash_len,
                                base_b0 + size_b0 - 1, &flash_info[0]);
        } else {
                flash_info[1].flash_id = FLASH_UNKNOWN;
index f904affc4f60d624978f957a6e9b55f2d53b1684..1707dcf6e19172275840ae92972ca38f4e99b071 100644 (file)
@@ -91,7 +91,7 @@ unsigned long flash_init (void)
 
         /* Monitor protection ON by default */
         (void)flash_protect(FLAG_PROTECT_SET,
-                            -CFG_MONITOR_LEN,
+                            -monitor_flash_len,
                             0xffffffff,
                             &flash_info[0]);
 
index 55845fac111a8c2beaeea8d896c32421701ba278..5322430de383badc375059c69ffee5a5ad0f9023 100644 (file)
@@ -104,7 +104,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        (void)flash_protect(FLAG_PROTECT_SET,
                            CFG_MONITOR_BASE,
-                           CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                           CFG_MONITOR_BASE+monitor_flash_len-1,
                            &flash_info[0]);
 #endif
 
@@ -124,7 +124,7 @@ unsigned long flash_init (void)
                /* monitor protection ON by default */
                (void)flash_protect(FLAG_PROTECT_SET,
                                    CFG_MONITOR_BASE,
-                                   CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                                   CFG_MONITOR_BASE+monitor_flash_len-1,
                                    &flash_info[1]);
 #endif
        } else {
index b3c620e868c3076e3ccdc11a34b1158a647f2de0..98a7c0c8d7715a7aaa15810cd31d4b47bc809f25 100644 (file)
@@ -91,7 +91,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 #endif
 
@@ -115,7 +115,7 @@ unsigned long flash_init (void)
                /* monitor protection ON by default */
                flash_protect(FLAG_PROTECT_SET,
                              CFG_MONITOR_BASE,
-                             CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                             CFG_MONITOR_BASE+monitor_flash_len-1,
                              &flash_info[1]);
 #endif
        } else {
index 22a7c410ce4b8fe941caeb5aabb33f5742dfd5e4..680a2dc93ccbeea5a37eccb32142a488878605cd 100644 (file)
@@ -112,7 +112,7 @@ unsigned long flash_init (void)
                /* monitor protection ON by default */
                flash_protect(FLAG_PROTECT_SET,
                              CFG_MONITOR_BASE,
-                             CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                             CFG_MONITOR_BASE+monitor_flash_len-1,
                              &flash_info[i]);
 #endif
 
index fc5d963a91fa0b2e203ff03fcbbd6b7986b47e86..fd0082c135b05c4f320b1e2d04a6863bf5a57e2d 100644 (file)
@@ -77,7 +77,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 #endif
 
index 902b1b0afe63f6ba69255bf3c9920e79850189df..ec32d07dbf2542893b673a762b64c53446efd988 100644 (file)
@@ -157,7 +157,7 @@ flash_init (void)
         */
        flash_protect(FLAG_PROTECT_SET,
                          CFG_MONITOR_BASE,
-                         CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1,
+                         CFG_MONITOR_BASE + monitor_flash_len - 1,
                          &flash_info[0]);
 #endif
 
index 2314a53e7367d412a5afa7dd10d771352981c829..f12d0be552598830523578de19d280ccc9ab9763 100644 (file)
@@ -55,7 +55,7 @@ unsigned long flash_init (void)
        /* Monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 #endif
 
index 562a34992469a1ec8e3b26a6cdfb39b7c693b1bf..c8b56fb96b24a0585e543402af50078075cf5a58 100644 (file)
@@ -102,7 +102,7 @@ unsigned long flash_init (void)
          /* monitor protection ON by default */
          (void)flash_protect(FLAG_PROTECT_SET,
                            CFG_MONITOR_BASE,
-                           CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                           CFG_MONITOR_BASE+monitor_flash_len-1,
                            &flash_info[0]);
 #endif
 
@@ -121,7 +121,7 @@ unsigned long flash_init (void)
                /* monitor protection ON by default */
                (void)flash_protect(FLAG_PROTECT_SET,
                                    CFG_MONITOR_BASE,
-                                   CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                                   CFG_MONITOR_BASE+monitor_flash_len-1,
                                    &flash_info[1]);
 #endif
        }
index 532dd194d7b493025c866143f227a441282afa1c..5620a1d8b7d9f85870fda21f20a59a53ed37f67a 100644 (file)
@@ -96,7 +96,7 @@ unsigned long flash_init (void)
 #if CFG_MONITOR_BASE >= CFG_FLASH0_BASE
     flash_protect(FLAG_PROTECT_SET,
                  CFG_MONITOR_BASE,
-                 CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                 CFG_MONITOR_BASE+monitor_flash_len-1,
                  &flash_info[0]);
 #endif
 
index bb7635ecfe9368392d5ce4c26d533eec6fb17ecc..799fe83f3e6c46139bbddf3cc1daae8c31ec327c 100644 (file)
@@ -71,7 +71,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 #endif
 
index ee052e39593dd242ec3513a98bfb1e4a5a376142..0a09b4a70e5d57ed59fbc66eed7c1c47b45e9ddf 100644 (file)
@@ -321,7 +321,7 @@ flash_init(void)
 #if CFG_MONITOR_BASE == CFG_FLASH_BASE
        (void)flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 #endif
 
index 79e7cc28aeccb7e87237f61a5ef763c8167639fe..6315bd95b1193a6a9317203c4e2b0d724271b03f 100644 (file)
@@ -104,7 +104,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 #endif
 
index c59ffb86584b72143c5df707beed897b5d47bab9..7db0b3289dc6c260a7f2495030218474a618f842 100644 (file)
@@ -72,7 +72,7 @@ ulong flash_init(void)
      */
     flash_protect(FLAG_PROTECT_SET,
                  CFG_FLASH_BASE,
-                 CFG_FLASH_BASE + _armboot_end_data - _armboot_start,
+                 CFG_FLASH_BASE + monitor_flash_len - 1,
                  &flash_info[0]);
 
     flash_protect(FLAG_PROTECT_SET,
index 427f14a61685b615225a27d0c4bd330be0701d01..e7fd54063b4c40e7f123e94d62b5922f8efa7c8d 100644 (file)
@@ -100,7 +100,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      flash_get_info(CFG_MONITOR_BASE));
 #endif
 
index 4b0ea9bb01931647b4bacfa9658ba16870cc0979..2cf23b3e8c521e8e44c601caf7b81ba11da66fb0 100644 (file)
@@ -90,7 +90,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 #endif
 
index 401ffbe415f0a2fc102205d31a9b3034752b795e..4eca46720cc92ef395a3c5248ff203d23f15e71c 100644 (file)
@@ -71,7 +71,7 @@ unsigned long flash_init (void)
                /* monitor protection ON by default */
                flash_protect(FLAG_PROTECT_SET,
                              CFG_MONITOR_BASE,
-                             CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1,
+                             CFG_MONITOR_BASE + monitor_flash_len - 1,
                              flash_info + bank);
 #endif
 
index b5453dff1e45568fc2938610bf5a6d8dbe33fe2f..140ba2d530fc2d8db4f25a7ce05d69bcc51b178e 100644 (file)
@@ -87,7 +87,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 #endif
 
index 3837457687100808e269dde2adc487e8f6912ab1..7297c159e0e0d08243c2e11b107ba42767bacecc 100644 (file)
@@ -74,7 +74,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 #endif
 
index df585103334aea12374a16ff99abc900576ddb7f..0faa82cba4d691a7c7c8fe50a09aa72657224c82 100644 (file)
@@ -134,7 +134,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 #endif
 
@@ -166,7 +166,7 @@ unsigned long flash_init (void)
                /* monitor protection ON by default */
                flash_protect(FLAG_PROTECT_SET,
                              CFG_MONITOR_BASE,
-                             CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                             CFG_MONITOR_BASE+monitor_flash_len-1,
                              &flash_info[1]);
 #endif
 
index 7b195241393e684b39b42bfb239dff28bfeb6b18..89ab62c536575ee0390d301bfd7317befd0616ce 100644 (file)
@@ -105,7 +105,7 @@ ulong flash_init(void)
      */
     flash_protect(FLAG_PROTECT_SET,
                  CFG_FLASH_BASE,
-                 CFG_FLASH_BASE + _armboot_end_data - _armboot_start,
+                 CFG_FLASH_BASE + monitor_flash_len - 1,
                  &flash_info[0]);
 
     flash_protect(FLAG_PROTECT_SET,
index dcf829b2c55f4d2c149edaab89da73af19205c21..9e07b1140d4e38fc641ba891bfccc9fc03de1669 100644 (file)
@@ -86,7 +86,7 @@ unsigned long flash_init (void)
         */
        flash_protect ( FLAG_PROTECT_SET,
                        CFG_FLASH_BASE,
-                       CFG_FLASH_BASE + _armboot_end_data - _armboot_start,
+                       CFG_FLASH_BASE + monitor_flash_len - 1,
                        &flash_info[0] );
 
        flash_protect ( FLAG_PROTECT_SET,
index 3d2a00fd3e070aeb9f6dfe40a7ec31f30f3cb023..127738a4bb5027e508dcc7a908dcce82f9bd4c8d 100644 (file)
@@ -123,7 +123,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 #endif
 
@@ -156,7 +156,7 @@ unsigned long flash_init (void)
                /* monitor protection ON by default */
                flash_protect(FLAG_PROTECT_SET,
                              CFG_MONITOR_BASE,
-                             CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                             CFG_MONITOR_BASE+monitor_flash_len-1,
                              &flash_info[1]);
 #endif
 
index e1aa47bbaa96159572f2154eaf20da4ead2ddad5..a491f7bf0b7d2bd9af7fd98447a9b950e4187e8b 100644 (file)
@@ -79,7 +79,7 @@ unsigned long flash_init (void)
     /* monitor protection ON by default */
     flash_protect(FLAG_PROTECT_SET,
                  CFG_MONITOR_BASE,
-                 CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                 CFG_MONITOR_BASE+monitor_flash_len-1,
                  &flash_info[0]);
 #endif
 
index ec6a3b3fedf890bb9e8918cbb506efe0316fdef6..d61bfc6462f1710624f750ff7b896205ae78dd95 100644 (file)
@@ -100,7 +100,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 #endif
 
index b876d1cddd1812532103adfcf47625804d50e9b5..9512c72a0b94bb843f4e8af9426b7fcfa312dc7b 100644 (file)
@@ -101,7 +101,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 #endif
 
index 483d0fff34a355c6a5c68641db9f8f483c493ee8..563039b9cd077f778b94c0421f5deb06687156aa 100644 (file)
@@ -102,7 +102,7 @@ unsigned long flash_init (void)
 #if CFG_MONITOR_BASE >= CFG_FLASH_BASE
        flash_protect(FLAG_PROTECT_SET,
                        CFG_MONITOR_BASE,
-                       CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                       CFG_MONITOR_BASE+monitor_flash_len-1,
                        &flash_info[0]);
 #endif
        size_b1 = 0 ;
index c2075da2a54cdbc8030739c33f97c23eed2f8600..b442c9d28749aa6f2f5734402eca08045f1cc2e2 100644 (file)
@@ -113,7 +113,7 @@ ulong flash_init(void)
 
     flash_protect(FLAG_PROTECT_SET,
                  CFG_FLASH_BASE,
-                 CFG_FLASH_BASE + _armboot_end - _armboot_start,
+                 CFG_FLASH_BASE + monitor_flash_len - 1,
                  &flash_info[0]);
 
     flash_protect(FLAG_PROTECT_SET,
index a0a038f753abddb3dcae7bd634cbe4e4f6f8b0e7..1e8bfff8c65ee1924c1945b4b12ab7d9a473fa29 100644 (file)
@@ -146,11 +146,11 @@ unsigned long flash_init (void)
        flash_info[0].size = size_b0;
 
 #if CFG_MONITOR_BASE >= CFG_FLASH_BASE
-       DEBUGF("protect monitor %x @ %x\n", CFG_MONITOR_BASE, CFG_MONITOR_LEN);
+       DEBUGF("protect monitor %x @ %x\n", CFG_MONITOR_BASE, monitor_flash_len);
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 #endif
 
@@ -171,7 +171,7 @@ unsigned long flash_init (void)
                /* monitor protection ON by default */
                flash_protect(FLAG_PROTECT_SET,
                              CFG_MONITOR_BASE,
-                             CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                             CFG_MONITOR_BASE+monitor_flash_len-1,
                              &flash_info[1]);
 #endif
 
index 75d9048bac0b925c1b9efbf5da75a88b8a6acc9b..0845943587417e78e792df00aaf06301070a3d9e 100644 (file)
@@ -115,7 +115,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_FLASH_BASE,
-                     CFG_FLASH_BASE+CFG_MONITOR_LEN-1,
+                     CFG_FLASH_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 
        if (size_b1) {
@@ -136,7 +136,7 @@ unsigned long flash_init (void)
                /* monitor protection ON by default */
                flash_protect(FLAG_PROTECT_SET,
                              CFG_FLASH_BASE,
-                             CFG_FLASH_BASE+CFG_MONITOR_LEN-1,
+                             CFG_FLASH_BASE+monitor_flash_len-1,
                              &flash_info[1]);
        } else {
                memctl->memc_br1 = 0;           /* invalidate bank */
index 4204c341933cbbeea1246e0010a952d7f58e00f4..669031f7358497828a20b9dd9d08a645dc529098 100644 (file)
@@ -66,7 +66,7 @@ unsigned long flash_init(void)
        flash_get_offsets(CFG_FLASH_BASE, &flash_info[0]);
 
        /* monitor protection ON by default */
-       flash_protect(FLAG_PROTECT_SET, CFG_FLASH_BASE, CFG_FLASH_BASE + CFG_MONITOR_LEN - 1, &flash_info[0]);
+       flash_protect(FLAG_PROTECT_SET, CFG_FLASH_BASE, CFG_FLASH_BASE + monitor_flash_len - 1, &flash_info[0]);
 
        flash_info[0].size = size;
 
index 616a13f2c6f51e2aa416b2ba8d8b68840424389f..05ec687929ff290a44b53b4f4e3918682b38437b 100644 (file)
@@ -93,7 +93,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        (void)flash_protect(FLAG_PROTECT_SET,
                            CFG_FLASH_BASE,
-                           CFG_FLASH_BASE+CFG_MONITOR_LEN-1,
+                           CFG_FLASH_BASE+monitor_flash_len-1,
                            &flash_info[0]);
 
        flash_info[0].size = size_b0;
index 4f0220eab6b86c0f840a530642e83d1bcf6274ed..795b7ccff9a40702762233d588c68d9e250d42a0 100644 (file)
@@ -69,7 +69,7 @@ unsigned long flash_init (void)
     /* monitor protection ON by default */
     flash_protect(FLAG_PROTECT_SET,
                  CFG_MONITOR_BASE,
-                 CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                 CFG_MONITOR_BASE+monitor_flash_len-1,
                  &flash_info[0]);
 #endif
 
index 20f4d0343b83b856fe093ed7775e21c0dbc74060..6e9e3395c1b22c9154c9afb62f95dfb862b5f2e4 100644 (file)
@@ -70,7 +70,7 @@ unsigned long flash_init (void)
                /* monitor protection ON by default */
                flash_protect(FLAG_PROTECT_SET,
                              CFG_MONITOR_BASE,
-                             CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1,
+                             CFG_MONITOR_BASE + monitor_flash_len - 1,
                              &flash_info[0]);
 #endif
 
index 4d5147bf78c54fb44b01dd501ce060b17f234b8a..770a46db737f108913acb58882877c50341584f9 100644 (file)
@@ -133,7 +133,7 @@ unsigned long flash_init (void)
 # if CFG_MONITOR_BASE >= CFG_FLASH0_BASE
        flash_protect (FLAG_PROTECT_SET,
                       CFG_MONITOR_BASE,
-                      CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1, &flash_info[0]
+                      CFG_MONITOR_BASE + monitor_flash_len - 1, &flash_info[0]
        );
 # endif
 #endif /* CONFIG_BOOT_ROM */
index bb2184895bdccc2b1acc34bdf1e856e078b6b6f8..6d5a853829af91c8c2c7757df20550ae0d277df9 100644 (file)
@@ -201,7 +201,7 @@ unsigned long flash_init (void)
 
        /* Monitor protection ON by default */
 #if (CFG_MONITOR_BASE >= CFG_FLASH_BASE)
-       for(i=0; flash_info[0].start[i] < CFG_MONITOR_BASE+CFG_MONITOR_LEN-1; i++)
+       for(i=0; flash_info[0].start[i] < CFG_MONITOR_BASE+monitor_flash_len-1; i++)
                (void)flash_real_protect(&flash_info[0], i, 1);
 #endif
 
index 56d3acd160e67883245522c81b56889ebc1223bd..34f1b91c40003fee8d6858a4d3207624a25b6c28 100644 (file)
@@ -233,7 +233,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      flash_get_info(CFG_MONITOR_BASE));
 #endif
 
index dfd014b53b5b10961165fe823726f994d35e79c6..b1eb78f0e60e6976f3aacfe5ae240d6149119b68 100644 (file)
@@ -232,6 +232,7 @@ static void programLoad(void)
 */
 void copy_code (ulong dest_addr)
 {
+       extern long uboot_end_data;
        unsigned long start;
        unsigned long end;
 
@@ -243,7 +244,7 @@ void copy_code (ulong dest_addr)
         */
        copyLongs((ulong *)CFG_MONITOR_BASE,
                  (ulong *)dest_addr,
-                 (CFG_MONITOR_LEN + 3) / 4);
+                 ((ulong)&uboot_end_data - CFG_MONITOR_BASE + 3) / 4);
 
 
        /* flush caches
index fef483c3f8267f12d4a4b74d3b6d8acc7aaa31e4..9b42960c7d3e63f3fcdfec14b3b27cc05a34ed6c 100644 (file)
@@ -107,7 +107,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        (void) flash_protect (FLAG_PROTECT_SET,
                                CFG_FLASH_BASE,
-                               CFG_FLASH_BASE + CFG_MONITOR_LEN - 1,
+                               CFG_FLASH_BASE + monitor_flash_len - 1,
                                &flash_info[0]);
 #endif
 
index 0c298ba858fa2d534cace9e3c9a160c5a5182e01..73281bd4e20dd97837441243a24fb7b44751573d 100644 (file)
@@ -67,7 +67,7 @@ unsigned long flash_init (void)
 #if CFG_MONITOR_BASE >= CFG_FLASH0_BASE
     flash_protect(FLAG_PROTECT_SET,
                  CFG_MONITOR_BASE,
-                 CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                 CFG_MONITOR_BASE+monitor_flash_len-1,
                  &flash_info[0]);
 #endif
 
index 654012f607c673a8e910cef610fb1fef0cb181b0..d90e7db5473277d1bb52341fc805bce05979d044 100644 (file)
@@ -123,11 +123,11 @@ unsigned long flash_init (void)
 #if CFG_MONITOR_BASE >= PHYS_FLASH
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[1]);
 #endif
 
index 4fd04dfc067c55765706681ae7797d084974e769..52e01def5b1b82fe35eda67234d20b3719d69081 100644 (file)
@@ -69,7 +69,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 #endif
 
@@ -86,7 +86,7 @@ unsigned long flash_init (void)
                /* monitor protection ON by default */
                flash_protect(FLAG_PROTECT_SET,
                              CFG_MONITOR_BASE,
-                             CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                             CFG_MONITOR_BASE+monitor_flash_len-1,
                              &flash_info[1]);
 #endif
 
index 572199dd0af26edcccb995c60d85734d158c9481..4b6f2d06786257d27798cf5efa43d98454de1ec9 100644 (file)
@@ -228,7 +228,7 @@ flash_init(void)
 #if CFG_MONITOR_BASE >= CFG_FLASH_BASE
     flash_protect(FLAG_PROTECT_SET,
                CFG_MONITOR_BASE,
-               CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1,
+               CFG_MONITOR_BASE + monitor_flash_len - 1,
                &flash_info[0]);
 #endif
 
index ab2bf354c3a140ee35eee36cc556105f0f27d0e0..9a8b95225f91aa686577cf80d131359ae49f191e 100644 (file)
@@ -63,7 +63,7 @@ unsigned long flash_init (void)
 #if CFG_MONITOR_BASE >= CFG_FLASH0_BASE
     flash_protect(FLAG_PROTECT_SET,
                  CFG_MONITOR_BASE,
-                 CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                 CFG_MONITOR_BASE+monitor_flash_len-1,
                  &flash_info[0]);
 #endif
 
index 8e0f7521939230066dc3ea0cb2d7d31066651b03..c340fea52ca100972e8acc053badd902ea27014e 100644 (file)
@@ -124,7 +124,7 @@ ulong flash_init(void)
 #else
     flash_protect(FLAG_PROTECT_SET,
                  CFG_FLASH_BASE,
-                 CFG_FLASH_BASE + _armboot_end_data - _armboot_start,
+                 CFG_FLASH_BASE + monitor_flash_len - 1,
                  &flash_info[0]);
 
     flash_protect(FLAG_PROTECT_SET,
index e56114f80cc90ba2cc941059f49936bee0533015..9c32785b482640bb93cf5bdc146985b34a4ccbd8 100644 (file)
@@ -87,7 +87,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 #endif
 
@@ -106,7 +106,7 @@ unsigned long flash_init (void)
                /* monitor protection ON by default */
                flash_protect(FLAG_PROTECT_SET,
                              CFG_MONITOR_BASE,
-                             CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                             CFG_MONITOR_BASE+monitor_flash_len-1,
                              &flash_info[1]);
 #endif
        } else {
index dd7a4cc838ebf15b9e22447a4aa141f49e708652..056fe810b38a165a041c0028d5a8628304ef0325 100644 (file)
@@ -204,7 +204,7 @@ unsigned long flash_init (void)
 #if CFG_MONITOR_BASE >= CFG_FLASH0_BASE
        flash_protect (FLAG_PROTECT_SET,
                       CFG_MONITOR_BASE,
-                      CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1, &flash_info[0]);
+                      CFG_MONITOR_BASE + monitor_flash_len - 1, &flash_info[0]);
 #endif
 
 #if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
index b8c0df774322a62e66858d9fde1bcf1d8898687e..05c364bb23f8d63dd97c25b8b44d46ee9f7820a8 100644 (file)
@@ -148,7 +148,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      PCU_MONITOR_BASE,
-                     PCU_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     PCU_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 
 #ifdef CFG_ENV_IS_IN_FLASH
index c201875ba0e4a2aa321a3aba2549c373d9d42244..3bf2ff85db4b3805dfb7fc941da5042c8c1ab6bc 100644 (file)
@@ -100,7 +100,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 #endif
 
index 6882b8845132aea14a0eda55cffb8b1b8b4b4d76..eb9eaa0deb0a5da9c8a9b940c7f3978ae78e6935 100644 (file)
@@ -93,7 +93,7 @@ ulong flash_init (void)
         */
        flash_protect ( FLAG_PROTECT_SET,
                        CFG_FLASH_BASE,
-                       CFG_FLASH_BASE + _armboot_end_data - _armboot_start,
+                       CFG_FLASH_BASE + monitor_flash_len - 1,
                        &flash_info[0]);
 
        flash_protect ( FLAG_PROTECT_SET,
index c2ec2354b6d922ab9be39c7cfd9eeada57ee554b..5d04ed43d7453c4b381c16ab6eb6f21764949e09 100644 (file)
@@ -113,7 +113,7 @@ ulong flash_init(void)
 
     flash_protect(FLAG_PROTECT_SET,
                  CFG_FLASH_BASE,
-                 CFG_FLASH_BASE + _armboot_end_data - _armboot_start,
+                 CFG_FLASH_BASE + monitor_flash_len - 1,
                  &flash_info[0]);
 
     flash_protect(FLAG_PROTECT_SET,
index 8c0e229130ab4ec688c363baac08cbfc622b01d0..b50f77b6317217536d9b0ddbc836b093a9b9437d 100644 (file)
@@ -149,7 +149,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 #endif
 
@@ -176,7 +176,7 @@ unsigned long flash_init (void)
                /* monitor protection ON by default */
                flash_protect(FLAG_PROTECT_SET,
                              CFG_MONITOR_BASE,
-                             CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                             CFG_MONITOR_BASE+monitor_flash_len-1,
                              &flash_info[1]);
 #endif
 
index dd7a4cc838ebf15b9e22447a4aa141f49e708652..056fe810b38a165a041c0028d5a8628304ef0325 100644 (file)
@@ -204,7 +204,7 @@ unsigned long flash_init (void)
 #if CFG_MONITOR_BASE >= CFG_FLASH0_BASE
        flash_protect (FLAG_PROTECT_SET,
                       CFG_MONITOR_BASE,
-                      CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1, &flash_info[0]);
+                      CFG_MONITOR_BASE + monitor_flash_len - 1, &flash_info[0]);
 #endif
 
 #if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
index 2f74ccccf241f151bcd3c7b7fe34d1fdae57af4b..6b4ea7d227386a00059fb7019842f7bb2162fa38 100644 (file)
@@ -88,7 +88,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 #endif
 
@@ -113,7 +113,7 @@ unsigned long flash_init (void)
                /* monitor protection ON by default */
                flash_protect(FLAG_PROTECT_SET,
                              CFG_MONITOR_BASE,
-                             CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                             CFG_MONITOR_BASE+monitor_flash_len-1,
                              &flash_info[1]);
 #endif
 
index 1550e175a4f68df412cadf51acd13b96a61448ea..a2a21c6d25e6bf5d40faa597c63ad93116d7470a 100644 (file)
@@ -99,7 +99,7 @@ ulong flash_init (void)
         */
        flash_protect ( FLAG_PROTECT_SET,
                        CFG_FLASH_BASE,
-                       CFG_FLASH_BASE + _armboot_end_data - _armboot_start,
+                       CFG_FLASH_BASE + monitor_flash_len - 1,
                        &flash_info[0]);
 
        flash_protect ( FLAG_PROTECT_SET,
index 947fbc3aa5e85c124311417d3ace285d68bf0409..73bb04d98eebef729446e9aaa236cba32b178878 100644 (file)
@@ -145,7 +145,7 @@ unsigned long flash_init(void)
      */
 #if CFG_MONITOR_BASE >= CFG_FLASH_BASE
      flash_protect(FLAG_PROTECT_SET, CFG_MONITOR_BASE,
-              CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1, &flash_info[0]);
+              CFG_MONITOR_BASE + monitor_flash_len - 1, &flash_info[0]);
 #endif
 
 #if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
index cb0e676a138e6fcb4db00b2336141faf4adedc3f..b42f33501001b1759b7bd6ae1de7bf33829eef45 100644 (file)
@@ -79,7 +79,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 #endif
 
index 00484762361560e20e564a436924995540cc4a20..5651e1cfdd76a88afc9e9ff1dd9df498f2898714 100644 (file)
@@ -83,7 +83,7 @@ unsigned long flash_init (void)
 
     /* Monitor protection ON by default */
     (void)flash_protect(FLAG_PROTECT_SET,
-                        base_b0 + size_b0 - CFG_MONITOR_LEN,
+                        base_b0 + size_b0 - monitor_flash_len,
                         base_b0 + size_b0 - 1,
                         &flash_info[0]);
 
index 81f950ba8cbd3f613b714f2f469b33b708724aec..c9c7cbfdc2d1bc249d126cc319217fe203d6e8c9 100644 (file)
@@ -92,7 +92,7 @@ unsigned long flash_init (void)
            /* Monitor protection ON by default */
            (void)flash_protect(FLAG_PROTECT_SET,
                                FLASH_BASE0_PRELIM,
-                               FLASH_BASE0_PRELIM+CFG_MONITOR_LEN-1,
+                               FLASH_BASE0_PRELIM+monitor_flash_len-1,
                                &flash_info[0]);
            size_b1 = 0 ;
            flash_info[0].size = size_b0;
@@ -133,7 +133,7 @@ unsigned long flash_init (void)
 
            /* monitor protection ON by default */
            (void)flash_protect(FLAG_PROTECT_SET,
-                               base_b0+size_b0-CFG_MONITOR_LEN,
+                               base_b0+size_b0-monitor_flash_len,
                                base_b0+size_b0-1,
                                &flash_info[0]);
 
@@ -145,12 +145,12 @@ unsigned long flash_init (void)
 
              /* monitor protection ON by default */
              (void)flash_protect(FLAG_PROTECT_SET,
-                                 base_b1+size_b1-CFG_MONITOR_LEN,
+                                 base_b1+size_b1-monitor_flash_len,
                                  base_b1+size_b1-1,
                                  &flash_info[1]);
              /* monitor protection OFF by default (one is enough) */
              (void)flash_protect(FLAG_PROTECT_CLEAR,
-                                 base_b0+size_b0-CFG_MONITOR_LEN,
+                                 base_b0+size_b0-monitor_flash_len,
                                  base_b0+size_b0-1,
                                  &flash_info[0]);
            } else {
index 319dddc4b26ff325567792634b4fa0697d061cca..5c9d346da039cf053601225530af79e887835930 100644 (file)
@@ -135,7 +135,7 @@ ulong flash_init (void)
 
        flash_protect (FLAG_PROTECT_SET,
                                   CFG_FLASH_BASE,
-                                  CFG_FLASH_BASE + _armboot_end_data - _armboot_start,
+                                  CFG_FLASH_BASE + monitor_flash_len - 1,
                                   &flash_info[0]);
 
        flash_protect (FLAG_PROTECT_SET,
index 28238c1ca00a78262fdf184cfe6f342e079cfb96..12a1335b757ad1b052a76c3dd3e271e965124e37 100644 (file)
@@ -130,7 +130,7 @@ unsigned long flash_init (void)
        /* monitor protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
                      CFG_MONITOR_BASE,
-                     CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                     CFG_MONITOR_BASE+monitor_flash_len-1,
                      &flash_info[0]);
 #endif
 
@@ -162,7 +162,7 @@ unsigned long flash_init (void)
                /* monitor protection ON by default */
                flash_protect(FLAG_PROTECT_SET,
                              CFG_MONITOR_BASE,
-                             CFG_MONITOR_BASE+CFG_MONITOR_LEN-1,
+                             CFG_MONITOR_BASE+monitor_flash_len-1,
                              &flash_info[1]);
 # endif
 
index 96559c2e31865197425870b149901c76e7a9ceb9..4a0e7a11191ed1d6ed515467b8c10f6cc1c17e4d 100644 (file)
@@ -68,6 +68,7 @@
        GOT_ENTRY(_end_of_vectors)
        GOT_ENTRY(transfer_to_handler)
 
+       GOT_ENTRY(__init_end)
        GOT_ENTRY(_end)
        GOT_ENTRY(__bss_start)
        END_GOT
@@ -590,8 +591,8 @@ relocate_code:
        mr      r3,  r5                         /* Destination Address  */
        lis     r4, CFG_MONITOR_BASE@h          /* Source      Address  */
        ori     r4, r4, CFG_MONITOR_BASE@l
-       lis     r5, CFG_MONITOR_LEN@h           /* Length in Bytes      */
-       ori     r5, r5, CFG_MONITOR_LEN@l
+       lwz     r5, GOT(__init_end)
+       sub     r5, r5, r4
        li      r6, CFG_CACHELINE_SIZE          /* Cache Line Size      */
 
        /*
@@ -617,8 +618,8 @@ relocate_code:
        mr      r3, r10                         /* Destination Address  */
        lis     r4, CFG_MONITOR_BASE@h          /* Source      Address  */
        ori     r4, r4, CFG_MONITOR_BASE@l
-       lis     r5, CFG_MONITOR_LEN@h           /* Length in Bytes      */
-       ori     r5, r5, CFG_MONITOR_LEN@l
+       lwz     r5, GOT(__init_end)
+       sub     r5, r5, r4
        li      r6, CFG_CACHELINE_SIZE          /* Cache Line Size      */
 #else
        cmplw   cr1,r3,r4
@@ -738,12 +739,6 @@ in_ram:
        /* not reached - end relocate_code */
 /*-----------------------------------------------------------------------*/
 
-       /* Problems accessing "end" in C, so do it here */
-       .globl  get_endaddr
-get_endaddr:
-       lwz     r3,GOT(_end)
-       blr
-
        /*
         * Copy exception vector code to low memory
         *
index 86a8407f61afc4e2d82324aa26f053671166c162..b5043937293c634cf60c89f5b0662302e0e6a766 100644 (file)
@@ -302,7 +302,8 @@ relocate_code:
        sub     t6, gp, t6              /* t6 <-- relocation offset     */
        
        li      t0, CFG_MONITOR_BASE
-       add     t2, t0, CFG_MONITOR_LEN
+       la      t3, in_ram
+       lw      t2, -12(t3)     /* t2 <-- uboot_end_data        */
        move    t1, a2
 
        /*
index d8a8bec1e55353b972a3c2d35f970ba623047db9..4d7c71644f0fc10851f27ad34246d967935cfaae 100644 (file)
@@ -66,6 +66,7 @@
        GOT_ENTRY(_end_of_vectors)
        GOT_ENTRY(transfer_to_handler)
 
+       GOT_ENTRY(__init_end)
        GOT_ENTRY(_end)
        GOT_ENTRY(__bss_start)
        END_GOT
@@ -432,8 +433,8 @@ relocate_code:
        mr      r3,  r5                         /* Destination Address  */
        lis     r4, CFG_MONITOR_BASE@h          /* Source      Address  */
        ori     r4, r4, CFG_MONITOR_BASE@l
-       lis     r5, CFG_MONITOR_LEN@h           /* Length in Bytes      */
-       ori     r5, r5, CFG_MONITOR_LEN@l
+       lwz     r5, GOT(__init_end)
+       sub     r5, r5, r4
 
        /*
         * Fix GOT pointer:
@@ -544,12 +545,6 @@ clear_bss:
        mr      r4, r10         /* Destination Address          */
        bl      board_init_r
 
-       /* Problems accessing "end" in C, so do it here */
-       .globl  get_endaddr
-get_endaddr:
-       lwz     r3,GOT(_end)
-       blr
-
        /*
         * Copy exception vector code to low memory
         *
index 855b81f7bb2355b2ae3e7eb67b2ec855077c754a..d45bb3648058a5fbac2a2f7b7ced6afd5726e30a 100644 (file)
@@ -73,6 +73,7 @@
        GOT_ENTRY(_end_of_vectors)
        GOT_ENTRY(transfer_to_handler)
 
+       GOT_ENTRY(__init_end)
        GOT_ENTRY(_end)
        GOT_ENTRY(__bss_start)
 #if defined(CONFIG_FADS)
@@ -549,8 +550,8 @@ relocate_code:
        lis     r4, CFG_MONITOR_BASE@h          /* Source      Address  */
        ori     r4, r4, CFG_MONITOR_BASE@l
 #endif
-       lis     r5, CFG_MONITOR_LEN@h           /* Length in Bytes      */
-       ori     r5, r5, CFG_MONITOR_LEN@l
+       lwz     r5, GOT(__init_end)
+       sub     r5, r5, r4
        li      r6, CFG_CACHELINE_SIZE          /* Cache Line Size      */
 
        /*
@@ -683,12 +684,6 @@ clear_bss:
        mr      r4, r10         /* Destination Address          */
        bl      board_init_r
 
-       /* Problems accessing "end" in C, so do it here */
-       .globl  get_endaddr
-get_endaddr:
-       lwz     r3,GOT(_end)
-       blr
-
        /*
         * Copy exception vector code to low memory
         *
index 9ceb70495558e6469d8a28195aa67b21df024af1..a5b8b5f0f088bd42d525b4dd765f6fecbd71a79c 100644 (file)
@@ -66,6 +66,7 @@
        GOT_ENTRY(_end_of_vectors)
        GOT_ENTRY(transfer_to_handler)
 
+       GOT_ENTRY(__init_end)
        GOT_ENTRY(_end)
        GOT_ENTRY(__bss_start)
 #if defined(CONFIG_HYMOD)
@@ -863,8 +864,8 @@ relocate_code:
        mr      r3,  r5                         /* Destination Address  */
        lis     r4, CFG_MONITOR_BASE@h          /* Source      Address  */
        ori     r4, r4, CFG_MONITOR_BASE@l
-       lis     r5, CFG_MONITOR_LEN@h           /* Length in Bytes      */
-       ori     r5, r5, CFG_MONITOR_LEN@l
+       lwz     r5, GOT(__init_end)
+       sub     r5, r5, r4
        li      r6, CFG_CACHELINE_SIZE          /* Cache Line Size      */
 
        /*
@@ -1016,12 +1017,6 @@ clear_bss:
        mr      r4, r10         /* Destination Address          */
        bl      board_init_r
 
-       /* Problems accessing "end" in C, so do it here */
-       .globl  get_endaddr
-get_endaddr:
-       lwz     r3,GOT(_end)
-       blr
-
        /*
         * Copy exception vector code to low memory
         *
index 3cd0d9ae748070ddb672ebda891b2b3c0a3f060b..c5dc5a973afae6343a845da07dae3684541aa133 100644 (file)
@@ -73,6 +73,7 @@
        GOT_ENTRY(_end_of_vectors)
        GOT_ENTRY(transfer_to_handler)
 
+       GOT_ENTRY(__init_end)
        GOT_ENTRY(_end)
        GOT_ENTRY(__bss_start)
 #if defined(CONFIG_FADS) || defined(CONFIG_ICU862)
@@ -568,8 +569,8 @@ relocate_code:
        mr      r3,  r5                         /* Destination Address  */
        lis     r4, CFG_MONITOR_BASE@h          /* Source      Address  */
        ori     r4, r4, CFG_MONITOR_BASE@l
-       lis     r5, CFG_MONITOR_LEN@h           /* Length in Bytes      */
-       ori     r5, r5, CFG_MONITOR_LEN@l
+       lwz     r5, GOT(__init_end)
+       sub     r5, r5, r4
        li      r6, CFG_CACHELINE_SIZE          /* Cache Line Size      */
 
        /*
@@ -711,12 +712,6 @@ clear_bss:
        mr      r4, r10         /* Destination Address          */
        bl      board_init_r
 
-       /* Problems accessing "end" in C, so do it here */
-       .globl  get_endaddr
-get_endaddr:
-       lwz     r3,GOT(_end)
-       blr
-
        /*
         * Copy exception vector code to low memory
         *
index afe8635585cb8f63b48bdc1011c2a2cb497f0a8a..cc29548eba7e137296f62e818e33612cf684a2c3 100644 (file)
        GOT_ENTRY(_end_of_vectors)
        GOT_ENTRY(transfer_to_handler)
 
+       GOT_ENTRY(__init_end)
        GOT_ENTRY(_end)
        GOT_ENTRY(__bss_start)
        END_GOT
@@ -1235,8 +1236,8 @@ relocate_code:
        mr      r3,  r5                         /* Destination Address  */
        lis     r4, CFG_MONITOR_BASE@h          /* Source      Address  */
        ori     r4, r4, CFG_MONITOR_BASE@l
-       lis     r5, CFG_MONITOR_LEN@h           /* Length in Bytes      */
-       ori     r5, r5, CFG_MONITOR_LEN@l
+       lwz     r5, GOT(__init_end)
+       sub     r5, r5, r4
        li      r6, CFG_CACHELINE_SIZE          /* Cache Line Size      */
 
        /*
@@ -1369,12 +1370,6 @@ clear_bss:
        mr      r4, r10         /* Destination Address          */
        bl      board_init_r
 
-       /* Problems accessing "end" in C, so do it here */
-       .globl  get_endaddr
-get_endaddr:
-       lwz     r3,GOT(_end)
-       blr
-
        /*
         * Copy exception vector code to low memory
         *
index 2ff1c8c35a8ddd694e138f9cbb730ca8aa18325c..0a252c53fc3758d96eecaa61b4bf15343bc84c03 100644 (file)
@@ -128,6 +128,7 @@ int checkflash    (void);
 int    checkdram     (void);
 char * strmhz(char *buf, long hz);
 int    last_stage_init(void);
+extern ulong monitor_flash_len;
 
 /* common/flash.c */
 void flash_perror (int);
index 9d7c8689c819b37dc22edf0e58dd2d75b0d6e058..b6e19419dfd19ee423b477f0aba340c18ae77775 100644 (file)
  *-----------------------------------------------------------------------
  *
  */
-/*#define      CFG_DER 0x2002000F*/
 #define CFG_DER        0
 
 /*
index d04616dc9957eac75d9af8f1c0dec9d565dc2397..89a4d437b4d90df757f0534d513366c13bcdcd31 100644 (file)
  *-----------------------------------------------------------------------
  *
  */
-/*#define      CFG_DER 0x2002000F*/
 #define CFG_DER        0
 
 /*
index d2ac9d220583f55dc4a259998644a703e857d2ef..14546f0a2db73f83201557a0fdbf92b18a077e68 100644 (file)
  *-----------------------------------------------------------------------
  *
  */
-/*#define      CFG_DER 0x2002000F*/
 #define CFG_DER        0
 
 /*
index d7dce71e314deb131b9c24055de217d79c7825c3..fddf0ca3d501f2fe06d96b972a588cbbabdab8f9 100644 (file)
@@ -304,7 +304,6 @@ extern  unsigned long           ip860_get_clk_freq (void);
  *-----------------------------------------------------------------------
  *
  */
-/*#define      CFG_DER 0x2002000F*/
 #define CFG_DER        0
 
 /*
index 85900b5e0f0ebd51ff9f3585b78bcf32e64cfe14..77746e87f47d8d4be90fe2e424d45ebe0f37d18d 100644 (file)
  *-----------------------------------------------------------------------
  *
  */
-/*#define      CFG_DER 0x2002000F*/
 #define CFG_DER        0
 
 /*
index 2725e77c83ae6ab91c4ec00aa6d050788fd3e6c5..19063fa4dcaf8ee1278e3a2a4df3e5907fd3a59e 100644 (file)
  *-----------------------------------------------------------------------
  *
  */
-/*#define      CFG_DER 0x2002000F*/
 #define CFG_DER        0
 
 /*
index d02ec0d6376c1285c4543da984727ff5ad8a3f9d..f68f1e10db20121ebaaf500b4e87352e66435386 100644 (file)
  *-----------------------------------------------------------------------
  *
  */
-/*#define      CFG_DER 0x2002000F*/
 #define CFG_DER        0
 
 /*
index 7f4869fee106323717c7f6df4a4455b1cc1d6c92..81e207911383c4b3350fbc7d33d4ab1a55e4ddcb 100644 (file)
  *-----------------------------------------------------------------------
  *
  */
-/*#define      CFG_DER 0x2002000F*/
 #define CFG_DER        0
 
 /*
index 8aba25e06ebc628db00e59d8fc3783a25549ca64..8fa328e0cbec098624cd730d77d5a440b5a73671 100644 (file)
  *-----------------------------------------------------------------------
  *
  */
-#define        CFG_DER 0x2002000F
-/*#define CFG_DER      0*/
+#define CFG_DER        0
 
 /*
  * Init Memory Controller:
index acfe747cecaf94b4351ccf08ab1b394753545129..a1327e75aacb1cfb9bfad3d4d552d4faec40eef8 100644 (file)
  *-----------------------------------------------------------------------
  *
  */
-/*#define      CFG_DER 0x2002000F*/
 #define CFG_DER        0
 
 /*
index 5dfa8f3b0c9e54dce03a8e9d50469830e7fc8d42..c23b3860a8456a275289416109ea3990ee556f5f 100644 (file)
  *-----------------------------------------------------------------------
  *
  */
-/*#define      CFG_DER 0x2002000F*/
 #define CFG_DER        0
 
 /*
index 9ad1839154b4f415cf80f848da296ff58acff739..51f2c253c21a44939deba3ac227cdd447524b562 100644 (file)
  *-----------------------------------------------------------------------
  *
  */
-/*#define      CFG_DER 0x2002000F*/
 #define CFG_DER 0
 
 /*
index cc51ce6674854ccca5c238aa209c7361328789c6..66e3c91f48108d791306232fdd4ff8cc87f7e48a 100644 (file)
  *-----------------------------------------------------------------------
  *
  */
-/*#define      CFG_DER 0x2002000F*/
 #define CFG_DER        0
 
 /*
index 60aacfb76267c1b09d9d2c937c3083079cdc1966..07e6faa113adac03d4f14ce76e0ac90bf0348721 100644 (file)
  *-----------------------------------------------------------------------
  *
  */
-/*#define      CFG_DER 0x2002000F*/
 #define CFG_DER        0
 
 /*
index 37363a25ff91149fbba6d32cdaebd77eb632e620..7f1f153c899c8dc1e95f58ab4aad066f675d4d7a 100644 (file)
  *-----------------------------------------------------------------------
  *
  */
-/*#define      CFG_DER 0x2002000F*/
 #define CFG_DER        0
 
 /*
index a9d1afffcd815fc6b8b31fb61bca677c1e1e6177..c386d3c325f763db52bf03d17e7a50fefb519b3d 100644 (file)
  *-----------------------------------------------------------------------
  *
  */
-/*#define      CFG_DER 0x2002000F*/
 #define CFG_DER        0
 
 /*
index 608c4e16dd72c512abeaf0c53daa131ac8abe5a1..653d0c79aebab4ca8d8c90e9bb13e9bf1f76120d 100644 (file)
  *-----------------------------------------------------------------------
  *
  */
-/*#define      CFG_DER 0x2002000F*/
 #define CFG_DER        0
 
 /*
index b38150f4bca57a0ec229822f9e984160898bec5e..a4859b54646752fc463f82418ccefa51037e428e 100644 (file)
  *-----------------------------------------------------------------------
  *
  */
-/*#define      CFG_DER 0x2002000F*/
 #define CFG_DER        0
 
 /*
index 2d275f331a34632269f22f9e1e321b6894593d32..1486377caa9b5f102095d109e0b97fbd87f64b6b 100644 (file)
  *-----------------------------------------------------------------------
  *
  */
-/*#define      CFG_DER 0x2002000F*/
 #define CFG_DER        0
 
 /*
index 8ab650e24b3d60b26481621b4a9c39427d940090..2989d42a9aef411498c74e925528aa7a78825730 100644 (file)
  *-----------------------------------------------------------------------
  *
  */
-/*#define      CFG_DER 0x2002000F*/
 #define CFG_DER 0
 
 /*
index 54f554b6d4dc567bad9035cee06d2ea19ea77747..af6af14db76e58fd9c7898a30eb4944119448571 100644 (file)
@@ -35,6 +35,8 @@
 void nand_init (void);
 #endif
 
+ulong monitor_flash_len;
+
 const char version_string[] =
        U_BOOT_VERSION" (" __DATE__ " - " __TIME__ ")";
 
@@ -204,6 +206,8 @@ void start_armboot (void)
        gd->bd = &bd_data;
        memset (gd->bd, 0, sizeof (bd_t));
 
+       monitor_flash_len = _armboot_end_data - _armboot_start;
+
        for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
                if ((*init_fnc_ptr)() != 0) {
                        hang ();
index 4bab3c5855c0fb94822fa1e15624cf60f4331c06..2bbf029d2eeb7d48e716732014cde033d2754b23 100644 (file)
 
 extern int timer_init(void);
 
+extern ulong uboot_end_data;
+extern ulong uboot_end;
+
+ulong monitor_flash_len;
+
 const char version_string[] =
        U_BOOT_VERSION" (" __DATE__ " - " __TIME__ ")";
 
@@ -176,7 +181,7 @@ void board_init_f(ulong bootflag)
        gd_t gd_data, *id;
        bd_t *bd;
        init_fnc_t **init_fnc_ptr;
-       ulong addr, addr_sp, len   = CFG_MONITOR_LEN;
+       ulong addr, addr_sp, len = (ulong)&uboot_end - CFG_MONITOR_BASE;
 #ifdef CONFIG_PURPLE
        void copy_code (ulong);
 #endif
@@ -209,10 +214,10 @@ void board_init_f(ulong bootflag)
 #endif
         
                /* Reserve memory for U-Boot code, data & bss
-                * round down to next 4 kB limit
+                * round down to next 16 kB limit
                 */
        addr -= len;
-       addr &= ~(4096 - 1);
+       addr &= ~(16 * 1024 - 1);
 
 #ifdef DEBUG
        printf ("Reserving %ldk for U-Boot at: %08lx\n", len >> 10, addr);
@@ -319,6 +324,8 @@ void board_init_r (gd_t *id, ulong dest_addr)
 
        gd->reloc_off = dest_addr - CFG_MONITOR_BASE;
 
+       monitor_flash_len = (ulong)&uboot_end_data - dest_addr;
+
        /*
         * We have to relocate the command table manually
         */
@@ -360,7 +367,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
        bd->bi_flashstart = CFG_FLASH_BASE;
        bd->bi_flashsize = size;
 #if CFG_MONITOR_BASE == CFG_FLASH_BASE
-       bd->bi_flashoffset = CFG_MONITOR_LEN;   /* reserved area for U-Boot */
+       bd->bi_flashoffset = monitor_flash_len; /* reserved area for U-Boot */
 #else
        bd->bi_flashoffset = 0;
 #endif
index bba62d820d2036c53b6e811a94e8b933787f9a67..333d2d25c10406fc28e4643b50d14d0d33357bee 100644 (file)
@@ -93,6 +93,11 @@ extern flash_info_t flash_info[];
 #define        TOTAL_MALLOC_LEN        CFG_MALLOC_LEN
 #endif
 
+extern ulong __init_end;
+extern ulong _end;
+
+ulong monitor_flash_len;
+
 /*
  * Begin and End of memory area for malloc(), and current "brk"
  */
@@ -383,16 +388,7 @@ void board_init_f (ulong bootflag)
         *  - monitor code
         *  - board info struct
         */
-       len = get_endaddr () - CFG_MONITOR_BASE;
-
-       if (len > CFG_MONITOR_LEN) {
-               printf ("*** U-Boot size %ld > reserved memory (%d)\n",
-                               len, CFG_MONITOR_LEN);
-               hang ();
-       }
-
-       if (CFG_MONITOR_LEN > len)
-               len = CFG_MONITOR_LEN;
+       len = (ulong)&_end - CFG_MONITOR_BASE;
 
 #ifndef        CONFIG_VERY_BIG_RAM
        addr = CFG_SDRAM_BASE + gd->ram_size;
@@ -442,10 +438,10 @@ void board_init_f (ulong bootflag)
 
        /*
         * reserve memory for U-Boot code, data & bss
-        * round down to next 4 kB limit
+        * round down to next 16 kB limit
         */
        addr -= len;
-       addr &= ~(4096 - 1);
+       addr &= ~(16 * 1024 - 1);
 
 #ifdef DEBUG
        printf ("Reserving %ldk for U-Boot at: %08lx\n", len >> 10, addr);
@@ -600,6 +596,8 @@ void board_init_r (gd_t *id, ulong dest_addr)
        WATCHDOG_RESET ();
 
        gd->reloc_off = dest_addr - CFG_MONITOR_BASE;
+       
+       monitor_flash_len = (ulong)&__init_end - dest_addr;
 
        /*
         * We have to relocate the command table manually
@@ -705,7 +703,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
 #if defined(CONFIG_PCU_E) || defined(CONFIG_OXC)
        bd->bi_flashoffset = 0;
 #elif CFG_MONITOR_BASE == CFG_FLASH_BASE
-       bd->bi_flashoffset = CFG_MONITOR_LEN;   /* reserved area for startup monitor  */
+       bd->bi_flashoffset = monitor_flash_len; /* reserved area for startup monitor  */
 #else
        bd->bi_flashoffset = 0;
 #endif