]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/eltec/elppc/misc.c
imported Freescale specific U-Boot additions for i.MX28,... release L2.6.31_10.08.01
[karo-tx-uboot.git] / board / eltec / elppc / misc.c
index 5fb20ae66c079c8fa7cae827310bba4c1de79c46..cbaf10b7e676533040c22f41bbc7e594cb4a4635 100755 (executable)
@@ -29,7 +29,7 @@
 #include "srom.h"
 
 /* imports  */
-extern char console_buffer[CFG_CBSIZE];
+extern char console_buffer[CONFIG_SYS_CBSIZE];
 extern int l2_cache_enable (int l2control);
 extern int eepro100_write_eeprom (struct eth_device *dev, int location,
                                  int addr_len, unsigned short data);
@@ -42,7 +42,7 @@ extern int read_eeprom (struct eth_device *dev, int location, int addr_len);
 void *nvram_read (void *dest, const long src, size_t count)
 {
        uchar *d = (uchar *) dest;
-       uchar *s = (uchar *) (CFG_ENV_MAP_ADRS + src);
+       uchar *s = (uchar *) (CONFIG_ENV_MAP_ADRS + src);
 
        while (count--)
                *d++ = *s++;
@@ -52,7 +52,7 @@ void *nvram_read (void *dest, const long src, size_t count)
 
 void nvram_write (long dest, const void *src, size_t count)
 {
-       uchar *d = (uchar *) (CFG_ENV_MAP_ADRS + dest);
+       uchar *d = (uchar *) (CONFIG_ENV_MAP_ADRS + dest);
        uchar *s = (uchar *) src;
 
        while (count--)
@@ -95,7 +95,7 @@ int misc_init_r (void)
                          SECOND_DEVICE, FIRST_BLOCK);
 
        /* read out current nvram shadow image */
-       nvram_read (buf, CFG_NV_SROM_COPY_ADDR, CFG_SROM_SIZE);
+       nvram_read (buf, CONFIG_SYS_NV_SROM_COPY_ADDR, CONFIG_SYS_SROM_SIZE);
 
        if (strcmp (eerev.magic, "ELTEC") != 0) {
                /* srom is not initialized -> create a default revision info */
@@ -124,8 +124,8 @@ int misc_init_r (void)
        }
 
        if ((copyNv == 0)
-           && (el_srom_checksum ((u_char *) & eerev, CFG_SROM_SIZE) !=
-               el_srom_checksum ((u_char *) buf, CFG_SROM_SIZE))) {
+           && (el_srom_checksum ((u_char *) & eerev, CONFIG_SYS_SROM_SIZE) !=
+               el_srom_checksum ((u_char *) buf, CONFIG_SYS_SROM_SIZE))) {
                printf ("Invalid revision info copy in nvram !\n");
                printf ("Press key:\n  <c> to copy current revision info to nvram.\n");
                printf ("  <r> to reenter revision info.\n");
@@ -232,16 +232,16 @@ int misc_init_r (void)
                        printf ("OK\n\n");
 
                /* write new values as shadow image to nvram */
-               nvram_write (CFG_NV_SROM_COPY_ADDR, (void *) &eerev,
-                            CFG_SROM_SIZE);
+               nvram_write (CONFIG_SYS_NV_SROM_COPY_ADDR, (void *) &eerev,
+                            CONFIG_SYS_SROM_SIZE);
 
        }
 
        /*if (initSrom) */
        /* copy current values as shadow image to nvram */
        if (initSrom == 0 && copyNv == 1)
-               nvram_write (CFG_NV_SROM_COPY_ADDR, (void *) &eerev,
-                            CFG_SROM_SIZE);
+               nvram_write (CONFIG_SYS_NV_SROM_COPY_ADDR, (void *) &eerev,
+                            CONFIG_SYS_SROM_SIZE);
 
        /* update environment */
        sprintf (buf, "%02x:%02x:%02x:%02x:%02x:%02x",