public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] PATCH: MPC8220 update in flash.c
Date: Thu, 10 May 2007 20:59:30 -0500	[thread overview]
Message-ID: <1178848771.17110.7.camel@Goku> (raw)

- 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)

                 reply	other threads:[~2007-05-11  1:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1178848771.17110.7.camel@Goku \
    --to=tsi-chung.liew@freescale.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox