All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/1] cfi fix for Spansion and MB->MiB
@ 2011-01-26  1:56 Aaron Williams
  2011-01-26  5:09 ` Andrew Dyer
  2011-01-26  7:45 ` Wolfgang Denk
  0 siblings, 2 replies; 3+ messages in thread
From: Aaron Williams @ 2011-01-26  1:56 UTC (permalink / raw)
  To: u-boot

I ran into a problem with the Spansion S29GL064N flash chip in that it returns 
a manufacturer ID of 0 and it also requires the AMD geometry fixup.

Additionally, I modified a few print statements to use KiB/MiB instead of 
kB/MB.

-Aaron Williams

diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index dd394a8..105eb3f 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -1162,10 +1162,10 @@ void flash_print_info (flash_info_t * info)
                info->name,
                (info->portwidth << 3), (info->chipwidth << 3));
        if (info->size < 1024*1024)
-               printf ("  Size: %ld kB in %d Sectors\n",
+               printf ("  Size: %ld KiB in %d Sectors\n",
                        info->size >> 10, info->sector_count);
        else
-               printf ("  Size: %ld MB in %d Sectors\n",
+               printf ("  Size: %ld MiB in %d Sectors\n",
                        info->size >> 20, info->sector_count);
        printf ("  ");
        switch (info->vendor) {
@@ -1924,6 +1924,7 @@ ulong flash_get_size (phys_addr_t base, int banknum)
 
                /* Do manufacturer-specific fixups */
                switch (info->manufacturer_id) {
+               case 0x0000:
                case 0x0001:
                        flash_fixup_amd(info, &qry);
                        break;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH 1/1] cfi fix for Spansion and MB->MiB
  2011-01-26  1:56 [U-Boot] [PATCH 1/1] cfi fix for Spansion and MB->MiB Aaron Williams
@ 2011-01-26  5:09 ` Andrew Dyer
  2011-01-26  7:45 ` Wolfgang Denk
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Dyer @ 2011-01-26  5:09 UTC (permalink / raw)
  To: u-boot

On Tue, Jan 25, 2011 at 19:56, Aaron Williams
<Aaron.Williams@caviumnetworks.com> wrote:
> I ran into a problem with the Spansion S29GL064N flash chip in that it returns
> a manufacturer ID of 0 and it also requires the AMD geometry fixup.
>
> Additionally, I modified a few print statements to use KiB/MiB instead of
> kB/MB.
>
> -Aaron Williams
>
> diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
> index dd394a8..105eb3f 100644
> --- a/drivers/mtd/cfi_flash.c
> +++ b/drivers/mtd/cfi_flash.c
> @@ -1162,10 +1162,10 @@ void flash_print_info (flash_info_t * info)
> ? ? ? ? ? ? ? ?info->name,
> ? ? ? ? ? ? ? ?(info->portwidth << 3), (info->chipwidth << 3));
> ? ? ? ?if (info->size < 1024*1024)
> - ? ? ? ? ? ? ? printf (" ?Size: %ld kB in %d Sectors\n",
> + ? ? ? ? ? ? ? printf (" ?Size: %ld KiB in %d Sectors\n",
> ? ? ? ? ? ? ? ? ? ? ? ?info->size >> 10, info->sector_count);
> ? ? ? ?else
> - ? ? ? ? ? ? ? printf (" ?Size: %ld MB in %d Sectors\n",
> + ? ? ? ? ? ? ? printf (" ?Size: %ld MiB in %d Sectors\n",
> ? ? ? ? ? ? ? ? ? ? ? ?info->size >> 20, info->sector_count);
> ? ? ? ?printf (" ?");
> ? ? ? ?switch (info->vendor) {
> @@ -1924,6 +1924,7 @@ ulong flash_get_size (phys_addr_t base, int banknum)
>
> ? ? ? ? ? ? ? ?/* Do manufacturer-specific fixups */
> ? ? ? ? ? ? ? ?switch (info->manufacturer_id) {
> + ? ? ? ? ? ? ? case 0x0000:
> ? ? ? ? ? ? ? ?case 0x0001:
> ? ? ? ? ? ? ? ? ? ? ? ?flash_fixup_amd(info, &qry);
> ? ? ? ? ? ? ? ? ? ? ? ?break;

I think something is wrong here.  You shouldn't get a manufacturer ID
of 0000 from a Spansion part.  cmdset_amd_read_jedec_ids() should be
where it's coming from, reading the datasheet is pretty clear that
these parts return an 0001 or 01 depending on the BYTE# pin.  I've
used other parts in the series GL128N, GL256N, GL256P that have the
same command set and not seen this.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH 1/1] cfi fix for Spansion and MB->MiB
  2011-01-26  1:56 [U-Boot] [PATCH 1/1] cfi fix for Spansion and MB->MiB Aaron Williams
  2011-01-26  5:09 ` Andrew Dyer
@ 2011-01-26  7:45 ` Wolfgang Denk
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Denk @ 2011-01-26  7:45 UTC (permalink / raw)
  To: u-boot

Dear Aaron Williams,

In message <201101251756.30586.Aaron.Williams@caviumnetworks.com> you wrote:
> I ran into a problem with the Spansion S29GL064N flash chip in that it returns 
> a manufacturer ID of 0 and it also requires the AMD geometry fixup.
> 
> Additionally, I modified a few print statements to use KiB/MiB instead of 
> kB/MB.

Please split into two separate, independent patches.

And don't forget to add your signed-off-by line.

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: wd at denx.de
>  Is there a way to determine Yesterday's date using Unix utilities?
         echo "what is yesterday's date?" | /bin/mail root
         -- Randal L. Schwartz in <ukbuh2y982.fsf@julie.teleport.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-01-26  7:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-26  1:56 [U-Boot] [PATCH 1/1] cfi fix for Spansion and MB->MiB Aaron Williams
2011-01-26  5:09 ` Andrew Dyer
2011-01-26  7:45 ` Wolfgang Denk

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.