summaryrefslogtreecommitdiff
path: root/tools/updater/flash_hw.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/updater/flash_hw.c')
-rw-r--r--tools/updater/flash_hw.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/tools/updater/flash_hw.c b/tools/updater/flash_hw.c
index ec11589..1d782c6 100644
--- a/tools/updater/flash_hw.c
+++ b/tools/updater/flash_hw.c
@@ -31,7 +31,6 @@
/*---------------------------------------------------------------------*/
#undef DEBUG_FLASH
-//#define DEBUG_FLASH
#ifdef DEBUG_FLASH
#define DEBUGF(fmt,args...) mon_printf(fmt ,##args)
@@ -68,7 +67,7 @@ static void flash_to_mem(void)
unsigned char x;
flash_xd_nest --;
-
+
if (flash_xd_nest == 0)
{
DEBUGF("Flash on memory bus\n");
@@ -327,7 +326,7 @@ static int flash_get_offsets (ulong base, flash_info_t *info)
/* set sector offsets for uniform sector type */
for (i = 0; i < info->sector_count; i++) {
info->start[i] = base + i * info->size /
- info->sector_count;
+ info->sector_count;
}
break;
default:
@@ -479,7 +478,7 @@ int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
}
if ((rc = write_word(info, wp, data)) != 0) {
- flash_to_mem();
+ flash_to_mem();
return (rc);
}
wp += 4;
@@ -491,7 +490,7 @@ int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
* handle word aligned part
*/
while (cnt >= 4) {
- if (out_cnt>26214)
+ if (out_cnt>26214)
{
mon_putc(219);
out_cnt = 0;
@@ -590,7 +589,7 @@ static int write_word (flash_info_t *info, ulong dest, ulong data)
*/
static void flash_reset (ulong addr)
{
- flash_to_xd();
+ flash_to_xd();
out8(addr, 0xF0); /* reset bank */
iobarrier_rw();
flash_to_mem();
@@ -641,10 +640,10 @@ void flash_print_info (flash_info_t *info)
info->size / 0x100000, info->sector_count);
} else if (info->size % 0x400 == 0) {
mon_printf (" Size: %ld KB in %d Sectors\n",
- info->size / 0x400, info->sector_count);
+ info->size / 0x400, info->sector_count);
} else {
mon_printf (" Size: %ld B in %d Sectors\n",
- info->size, info->sector_count);
+ info->size, info->sector_count);
}
mon_printf (" Sector Start Addresses:");