]> git.sur5r.net Git - u-boot/blobdiff - board/shannon/flash.c
* Added VIA configuration table
[u-boot] / board / shannon / flash.c
index 8e0f7521939230066dc3ea0cb2d7d31066651b03..475b76b30bdcafee719199c02c917e712f8cbcb8 100644 (file)
@@ -73,7 +73,7 @@ ulong flash_init(void)
        if (i == 0)
          flashbase = PHYS_FLASH_1;
        else
-         panic("configured to many flash banks!\n");
+         panic("configured too many flash banks!\n");
        for (j = 0; j < flash_info[i].sector_count; j++)
        {
 
@@ -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,
@@ -178,6 +178,7 @@ void flash_print_info  (flash_info_t *info)
     printf ("\n");
 
 Done:
+    ;
 }
 
 /*-----------------------------------------------------------------------
@@ -314,7 +315,7 @@ outahere:
  * Copy memory to flash
  */
 
-volatile static int write_word (flash_info_t *info, ulong dest, ulong data)
+static int write_word (flash_info_t *info, ulong dest, ulong data)
 {
     vu_long *addr = (vu_long *)dest;
     ulong result;
@@ -327,7 +328,7 @@ volatile static int write_word (flash_info_t *info, ulong dest, ulong data)
      */
     result = *addr;
     if ((result & data) != data)
-        return ERR_NOT_ERASED;
+       return ERR_NOT_ERASED;
 
 
     /*
@@ -393,7 +394,7 @@ volatile static int write_word (flash_info_t *info, ulong dest, ulong data)
     *addr = CMD_READ_ARRAY;
 
     if (chip1 == ERR || chip2 == ERR || *addr != data)
-        rc = ERR_PROG_ERROR;
+       rc = ERR_PROG_ERROR;
 
     if (iflag)
       enable_interrupts();