All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] PATCH: MPC8220 update in flash.c
@ 2007-05-11  1:59 TsiChung Liew
  0 siblings, 0 replies; only message in thread
From: TsiChung Liew @ 2007-05-11  1:59 UTC (permalink / raw)
  To: u-boot

- Print out KB or MB in flash

Regards,
TsiChung Liew

Signed-off by: TsiChung Liew<Tsi-Chung.Liew@freescale.com>

diff -rupN u-boot-all.git/board/alaska/flash.c u-boot-all-8220-
flash/board/alaska/flash.c
--- u-boot-all.git/board/alaska/flash.c 2007-04-03 19:18:56.000000000
-0500
+++ u-boot-all-8220-flash/board/alaska/flash.c 2007-05-10
15:40:56.000000000 -0500
@@ -27,7 +27,6 @@
#include <common.h>
#include <linux/byteorder/swab.h>

-
flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips
*/

/* Board support for 1 or 2 flash devices */
@@ -213,8 +212,12 @@ void flash_print_info (flash_info_t * in
break;
}

+ if (info->size > 0x100000)
printf ("  Size: %ld MB in %d Sectors\n",
info->size >> 20, info->sector_count);
+ else
+ printf("  Size: %ld KB in %d Sectors\n",
+        info->size >> 10, info->sector_count);

printf ("  Sector Start Addresses:");
for (i = 0; i < info->sector_count; ++i) {
@@ -308,7 +311,6 @@ static ulong flash_get_size (FPW * addr,
return (info->size);
}

-
/*
  * This function gets the u-boot flash sector protection status
  * (flash_info_t.protect[]) in sync with the sector protection
@@ -331,7 +333,6 @@ static void flash_sync_real_protect (fla
}
}

-
/*
  * checks if "sector" in bank "info" is protected. Should work on intel
  * strata flash chips 28FxxxJ3x in 8-bit mode.
@@ -384,7 +385,6 @@ static unsigned char intel_sector_protec
return ret;
}

-
/*
  * Checks if "bank1" and "bank2" are on the same chip.  Returns 1 if
they
  * are and 0 otherwise.
@@ -400,7 +400,6 @@ static unsigned char same_chip_banks (in
return same_chip[bank1][bank2];
}

-
/*-----------------------------------------------------------------------
  */
int flash_erase (flash_info_t * info, int s_first, int s_last)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-05-11  1:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-11  1:59 [U-Boot-Users] PATCH: MPC8220 update in flash.c TsiChung Liew

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.