[Skiboot] [PATCH RFC] flash: Rework error paths and messages for multiple flash controllers

Jeremy Kerr jk at ozlabs.org
Wed Jul 6 00:01:15 AEST 2016

Hi Mikey,

> The current flash code was written with only one flash chip, which is
> a system_flash (ie. the PNOR image), in mind.

Kinda. There's scope for more than one flash chip, but only one of them
as the "system" flash.

> We assume everything can be a system flash, so I've removed the
> is_system_flash parameter from flash_register().  We'll use the first
> system flash we find and warn if we find another since discovery order
> is not a guaranteed API.

Being the system flash means that that device is used:

 - for NVRAM
 - for the "resource" API (currently BOOTKERNEL and CAPI uCode)
 - as the mtd device that HBRT will use

so I don't think we really want multiples of those.

Is there a good reason for changing that? Are you just after multiple
flash devices, but not multiple system flash devices?

In that case, I'd say that the platform code should set is_system_flash
appropriately (ie, true for the first discovered one, false otherwise).
This way, the platform defines the flash device configuration, rather
than having the core flash support making assumptions about it.



More information about the Skiboot mailing list