diff options
author | wdenk <wdenk> | 2003-06-27 21:31:46 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2003-06-27 21:31:46 +0000 |
commit | 8bde7f776c77b343aca29b8c7b58464d915ac245 (patch) | |
tree | 20f1fd99975215e7c658454a15cdb4ed4694e2d4 /board/csb226/flash.c | |
parent | 993cad9364c6b87ae429d1ed1130d8153f6f027e (diff) | |
download | u-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/csb226/flash.c')
-rw-r--r-- | board/csb226/flash.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/board/csb226/flash.c b/board/csb226/flash.c index 0ee78e6..9801773 100644 --- a/board/csb226/flash.c +++ b/board/csb226/flash.c @@ -7,7 +7,7 @@ * Marius Groeger <mgroeger@sysgo.de> * * (C) Copyright 2002 - * Robert Schwebel, Pengutronix, <r.schwebel@pengutronix.de> + * Robert Schwebel, Pengutronix, <r.schwebel@pengutronix.de> * * See file CREDITS for list of people who contributed to this * project. @@ -89,7 +89,7 @@ ulong flash_init(void) /** * flash_print_info: - print information about the flash situation * - * @param info: + * @param info: */ void flash_print_info (flash_info_t *info) @@ -118,13 +118,13 @@ void flash_print_info (flash_info_t *info) return; } - printf(" Size: %ld MB in %d Sectors\n", + printf(" Size: %ld MB in %d Sectors\n", info->size >> 20, info->sector_count); printf(" Sector Start Addresses:"); for (i = 0; i < info->sector_count; i++) { if ((i % 5) == 0) printf ("\n "); - + printf (" %08lX%s", info->start[i], info->protect[i] ? " (RO)" : " "); } @@ -153,7 +153,7 @@ int flash_erase(flash_info_t *info, int s_first, int s_last) if ((info->flash_id & FLASH_VENDMASK) != (INTEL_MANUFACT & FLASH_VENDMASK)) return ERR_UNKNOWN_FLASH_VENDOR; - + prot = 0; for (sect=s_first; sect<=s_last; ++sect) { if (info->protect[sect]) prot++; @@ -203,7 +203,7 @@ int flash_erase(flash_info_t *info, int s_first, int s_last) *addr = 0x00FF00FF; /* resest to read mode */ } - + printf("ok.\n"); } @@ -222,10 +222,10 @@ int flash_erase(flash_info_t *info, int s_first, int s_last) /** * write_word: - copy memory to flash - * + * * @param info: * @param dest: - * @param data: + * @param data: * @return: */ @@ -301,8 +301,8 @@ static int write_word (flash_info_t *info, ulong dest, ushort data) /** * write_buf: - Copy memory to flash. - * - * @param info: + * + * @param info: * @param src: source of copy transaction * @param addr: where to copy to * @param cnt: number of bytes to copy @@ -372,4 +372,3 @@ int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt) return write_word(info, wp, data); } - |