summaryrefslogtreecommitdiff
path: root/board/MAI/AmigaOneG3SE/flash_new.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-06-27 21:31:46 +0000
committerwdenk <wdenk>2003-06-27 21:31:46 +0000
commit8bde7f776c77b343aca29b8c7b58464d915ac245 (patch)
tree20f1fd99975215e7c658454a15cdb4ed4694e2d4 /board/MAI/AmigaOneG3SE/flash_new.c
parent993cad9364c6b87ae429d1ed1130d8153f6f027e (diff)
downloadu-boot-imx-8bde7f776c77b343aca29b8c7b58464d915ac245.zip
u-boot-imx-8bde7f776c77b343aca29b8c7b58464d915ac245.tar.gz
u-boot-imx-8bde7f776c77b343aca29b8c7b58464d915ac245.tar.bz2
* Code cleanup:
- remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen)
Diffstat (limited to 'board/MAI/AmigaOneG3SE/flash_new.c')
-rw-r--r--board/MAI/AmigaOneG3SE/flash_new.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/board/MAI/AmigaOneG3SE/flash_new.c b/board/MAI/AmigaOneG3SE/flash_new.c
index 3fb9f12..d46bf46 100644
--- a/board/MAI/AmigaOneG3SE/flash_new.c
+++ b/board/MAI/AmigaOneG3SE/flash_new.c
@@ -27,11 +27,10 @@
#include <common.h>
#include <flash.h>
#include <asm/io.h>
-#include "memio.h"
+#include "memio.h"
/*---------------------------------------------------------------------*/
#undef DEBUG_FLASH
-//#define DEBUG_FLASH
#ifdef DEBUG_FLASH
#define DEBUGF(fmt,args...) 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:
@@ -478,7 +477,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;
@@ -493,7 +492,7 @@ int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
data = (data << 8) | *src++;
}
if ((rc = write_word(info, wp, data)) != 0) {
- flash_to_mem();
+ flash_to_mem();
return (rc);
}
wp += 4;
@@ -582,7 +581,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();
@@ -633,10 +632,10 @@ void flash_print_info (flash_info_t *info)
info->size / 0x100000, info->sector_count);
} else if (info->size % 0x400 == 0) {
printf (" Size: %ld KB in %d Sectors\n",
- info->size / 0x400, info->sector_count);
+ info->size / 0x400, info->sector_count);
} else {
printf (" Size: %ld B in %d Sectors\n",
- info->size, info->sector_count);
+ info->size, info->sector_count);
}
printf (" Sector Start Addresses:");