All of lore.kernel.org
 help / color / mirror / Atom feed
* Supporting new flash in pflash
@ 2015-11-18  6:53 Joel Stanley
  2015-11-18 16:32 ` Norman James
  2015-11-18 20:09 ` Benjamin Herrenschmidt
  0 siblings, 2 replies; 4+ messages in thread
From: Joel Stanley @ 2015-11-18  6:53 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: OpenBMC Maillist

Hi Ben,

On the barreleye BMC we have a 32MB flash. I can pflash -i the system
pnor, but when I attempt to look at the BMC flash, It errors out.

u-boot indicated that it's a 0x20ba19, so I added this to the flash_info table.

+       { 0x20ba19, 0x02000000, FL_ERASE_4K  | FL_ERASE_64K | FL_CAN_4B |
+                                FL_ERASE_BULK | FL_MICRON_BUGS,
+                                                          "Micron
N25Q256A"    },

However this fails:

root@barreleye:~# ./pflash -i -b
LIBFLASH: Failed to set controller 4b mode
LIBFLASH: Flash configuration failed
Failed to open flash chip

Do you have any ideas?

Cheers,

Joel

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

* Re: Supporting new flash in pflash
  2015-11-18  6:53 Supporting new flash in pflash Joel Stanley
@ 2015-11-18 16:32 ` Norman James
  2015-11-18 20:09 ` Benjamin Herrenschmidt
  1 sibling, 0 replies; 4+ messages in thread
From: Norman James @ 2015-11-18 16:32 UTC (permalink / raw)
  To: Joel Stanley; +Cc: Benjamin Herrenschmidt, OpenBMC Maillist


[-- Attachment #1.1: Type: text/plain, Size: 1503 bytes --]


I used a flash chip that pflash does recognize and it fails with this:

root@barreleye:~# pflash -b -i
LIBFLASH: Failed to set controller 4b mode
LIBFLASH: Flash configuration failed
Failed to open flash chip

It is like the BMC is holding it hostage?



Regards,
Norman James
IBM - POWER Systems Architect
Phone: 1-512-286-6807 (T/L: 363-6807)
Internet: njames@us.ibm.com




From:	Joel Stanley <joel@jms.id.au>
To:	Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc:	OpenBMC Maillist <openbmc@lists.ozlabs.org>
Date:	11/18/2015 12:54 AM
Subject:	Supporting new flash in pflash
Sent by:	"openbmc" <openbmc-bounces+njames=us.ibm.com@lists.ozlabs.org>



Hi Ben,

On the barreleye BMC we have a 32MB flash. I can pflash -i the system
pnor, but when I attempt to look at the BMC flash, It errors out.

u-boot indicated that it's a 0x20ba19, so I added this to the flash_info
table.

+       { 0x20ba19, 0x02000000, FL_ERASE_4K  | FL_ERASE_64K | FL_CAN_4B |
+                                FL_ERASE_BULK | FL_MICRON_BUGS,
+                                                          "Micron
N25Q256A"    },

However this fails:

root@barreleye:~# ./pflash -i -b
LIBFLASH: Failed to set controller 4b mode
LIBFLASH: Flash configuration failed
Failed to open flash chip

Do you have any ideas?

Cheers,

Joel
_______________________________________________
openbmc mailing list
openbmc@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/openbmc


[-- Attachment #1.2: Type: text/html, Size: 2883 bytes --]

[-- Attachment #2: graycol.gif --]
[-- Type: image/gif, Size: 105 bytes --]

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

* Re: Supporting new flash in pflash
  2015-11-18  6:53 Supporting new flash in pflash Joel Stanley
  2015-11-18 16:32 ` Norman James
@ 2015-11-18 20:09 ` Benjamin Herrenschmidt
  2015-11-19 12:01   ` Joel Stanley
  1 sibling, 1 reply; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2015-11-18 20:09 UTC (permalink / raw)
  To: Joel Stanley; +Cc: OpenBMC Maillist

On Wed, 2015-11-18 at 17:23 +1030, Joel Stanley wrote:
> Hi Ben,
> 
> On the barreleye BMC we have a 32MB flash. I can pflash -i the system
> pnor, but when I attempt to look at the BMC flash, It errors out.
> 
> u-boot indicated that it's a 0x20ba19, so I added this to the
> flash_info table.
> 
> +       { 0x20ba19, 0x02000000, FL_ERASE_4K  | FL_ERASE_64K |
> FL_CAN_4B |
> +                                FL_ERASE_BULK | FL_MICRON_BUGS,
> +                                                          "Micron
> N25Q256A"    },
> 
> However this fails:
> 
> root@barreleye:~# ./pflash -i -b
> LIBFLASH: Failed to set controller 4b mode
> LIBFLASH: Flash configuration failed
> Failed to open flash chip
> 
> Do you have any ideas?

Not off the top of my mind. I think Norm is shipping us a couple of
these chips. Otherwise, catch me later today or tomorrow and I'll have
a look.

> Cheers,
> 
> Joel

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

* Re: Supporting new flash in pflash
  2015-11-18 20:09 ` Benjamin Herrenschmidt
@ 2015-11-19 12:01   ` Joel Stanley
  0 siblings, 0 replies; 4+ messages in thread
From: Joel Stanley @ 2015-11-19 12:01 UTC (permalink / raw)
  To: OpenBMC Maillist; +Cc: Benjamin Herrenschmidt, Norman James

> On Wed, 2015-11-18 at 17:23 +1030, Joel Stanley wrote:
>> root@barreleye:~# ./pflash -i -b
>> LIBFLASH: Failed to set controller 4b mode
>> LIBFLASH: Flash configuration failed
>> Failed to open flash chip

The error message was due to libflash/pflash not supporting 4b mode
when talking to the BMC flash. It wasn't actually failing, the code
was intentionally not entering 4b mode as it thought it was
unsupported.

With Ben's help we discovered the BMC bus needed the SPI Address Cycle
Selection bit in FMC04 set in order to enter 4b mode. I have fixed
this in my branch on Github:

 https://github.com/shenki/skiboot/commits/barreleye-pflash

I will finish these patches off tomorrow and submit them to the
skiboot tree. From there we can pull in a new pflash build into
OpenBMC, and be able to flash our BMC from under Linux.

I tested it on both a Palmetto and a Barreleye tonight, and didn't
create any bricks, so feel free to give it a spin if you need it
before it hits the official builds.

Cheers,

Joel

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

end of thread, other threads:[~2015-11-19 12:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-18  6:53 Supporting new flash in pflash Joel Stanley
2015-11-18 16:32 ` Norman James
2015-11-18 20:09 ` Benjamin Herrenschmidt
2015-11-19 12:01   ` Joel Stanley

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.