Re: [U-Boot] [PATCH 36/56] board/genietv/flash.c: CodingStyle cleanup

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message <1320458160-23136-37-git-send-email...@denx.de> you wrote:
> Make (mostly) checkpatch clean (don't convert to use I/O accessors yet,
> so there will be "Use of volatile is usually wrong" warnings left.
> 
> Signed-off-by: Wolfgang Denk 
> ---
>  board/genietv/flash.c |  356 
> +
>  1 files changed, 179 insertions(+), 177 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
A witty saying proves nothing, but saying  something  pointless  gets
people's attention.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 36/56] board/genietv/flash.c: CodingStyle cleanup

2011-11-04 Thread Wolfgang Denk
Make (mostly) checkpatch clean (don't convert to use I/O accessors yet,
so there will be "Use of volatile is usually wrong" warnings left.

Signed-off-by: Wolfgang Denk 
---
 board/genietv/flash.c |  356 +
 1 files changed, 179 insertions(+), 177 deletions(-)

diff --git a/board/genietv/flash.c b/board/genietv/flash.c
index 5313ad8..6170120 100644
--- a/board/genietv/flash.c
+++ b/board/genietv/flash.c
@@ -24,32 +24,33 @@
 #include 
 #include 
 
-flash_info_t   flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips 
*/
+flash_info_t   flash_info[CONFIG_SYS_MAX_FLASH_BANKS];
 
 /*---
  * Functions
  */
-static ulong flash_get_size (vu_long *addr, flash_info_t *info);
-static int write_word (flash_info_t *info, ulong dest, ulong data);
-static void flash_get_offsets (ulong base, flash_info_t *info);
+static ulong flash_get_size(vu_long *addr, flash_info_t *info);
+static int write_word(flash_info_t *info, ulong dest, ulong data);
+static void flash_get_offsets(ulong base, flash_info_t *info);
 
 /*---
  */
 
-unsigned long flash_init (void)
+unsigned long flash_init(void)
 {
unsigned long size_b0, size_b1;
int i;
 
/* Init: no FLASHes known */
-   for (i=0; i < CONFIG_SYS_MAX_FLASH_BANKS; ++i)
-   flash_info[i].flash_id = FLASH_UNKNOWN;
+   for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; ++i)
+   flash_info[i].flash_id = FLASH_UNKNOWN;
 
/* Detect size */
-   size_b0 = flash_get_size((vu_long *)CONFIG_SYS_FLASH_BASE, 
&flash_info[0]);
+   size_b0 = flash_get_size((vu_long *)CONFIG_SYS_FLASH_BASE,
+   &flash_info[0]);
 
/* Setup offsets */
-   flash_get_offsets (CONFIG_SYS_FLASH_BASE, &flash_info[0]);
+   flash_get_offsets(CONFIG_SYS_FLASH_BASE, &flash_info[0]);
 
 #if CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH_BASE
/* Monitor protection ON by default */
@@ -67,13 +68,13 @@ unsigned long flash_init (void)
flash_info[0].size = size_b0;
flash_info[1].size = size_b1;
 
-   return (size_b0 + size_b1);
+   return size_b0 + size_b1;
 }
 
 /*---
  * Fix this to support variable sector sizes
 */
-static void flash_get_offsets (ulong base, flash_info_t *info)
+static void flash_get_offsets(ulong base, flash_info_t *info)
 {
int i;
 
@@ -87,73 +88,85 @@ static void flash_get_offsets (ulong base, flash_info_t 
*info)
 
 /*---
  */
-void flash_print_info  (flash_info_t *info)
+void flash_print_info(flash_info_t *info)
 {
int i;
 
-   if (info->flash_id == FLASH_UNKNOWN)
-   {
-   puts ("missing or unknown FLASH type\n");
+   if (info->flash_id == FLASH_UNKNOWN) {
+   puts("missing or unknown FLASH type\n");
return;
}
 
-   switch (info->flash_id & FLASH_VENDMASK)
-   {
-   case FLASH_MAN_AMD: printf ("AMD ");break;
-   case FLASH_MAN_FUJ: printf ("FUJITSU ");break;
-   case FLASH_MAN_BM:  printf ("BRIGHT MICRO ");   break;
-   default:printf ("Unknown Vendor "); break;
+   switch (info->flash_id & FLASH_VENDMASK) {
+   case FLASH_MAN_AMD:
+   printf("AMD ");
+   break;
+   case FLASH_MAN_FUJ:
+   printf("FUJITSU ");
+   break;
+   case FLASH_MAN_BM:
+   printf("BRIGHT MICRO ");
+   break;
+   default:
+   printf("Unknown Vendor ");
+   break;
}
 
-   switch (info->flash_id & FLASH_TYPEMASK)
-   {
-   case FLASH_AM040:   printf ("29F040 or 29LV040 (4 Mbit, 
uniform sectors)\n");
-   break;
-   case FLASH_AM400B:  printf ("AM29LV400B (4 Mbit, bottom 
boot sect)\n");
-   break;
-   case FLASH_AM400T:  printf ("AM29LV400T (4 Mbit, top boot 
sector)\n");
-   break;
-   case FLASH_AM800B:  printf ("AM29LV800B (8 Mbit, bottom 
boot sect)\n");
-   break;
-   case FLASH_AM800T:  printf ("AM29LV800T (8 Mbit, top boot 
sector)\n");
-   break;
-   case FLASH_AM160B:  printf ("AM29LV160B (16 Mbit, bottom 
boot sect)\n");
-   break;
-   case FLASH_AM160T:  printf ("AM29LV160T (16 Mbit, top boot 
sector)\n");
-   break;
-   case FLASH_AM320B:  printf ("AM29LV320B (32 Mbit, bottom 
boot sect)\n");
-