[Skiboot] [PATCH 0/2] libflash/libffs: decouple libflash and libffs.

Cyril Bur cyril.bur at au1.ibm.com
Thu May 14 17:06:37 AEST 2015


Currently libffs uses libflash to read data. This does works well if the
data is directly on flash hardware that libflash is designed to read from.
Problems arise when the data is not on an actual flash hardware but libffs
is needed to parse ffs partition data.

This patch begins the work to decouple libffs and libflash as well as
starting the work to provide an abstraction so that libffs may eventually
be able to read its data from essentially any source.

V2: Added Alistairs feedback.
    Modified core/flash.c to use the new 'highlevel' interface
    Modified pflash to use the new 'highlevel' interface
V3: Changed everything to add the container_of stuff. Looks good!
V4: Very minor modifications. Made the tests work.
Sent to the list as RFC.
V5: Incorporated Alistair's feedback on the list
	-Renamed the interface to 'blocklevel'
	-Split into two patches
	-Reordered params to read/write
	-Few other minor cleanups.
	Boots with functioning nvram on a palmetto.
Sent to the list as PATCH.

Cyril Bur (2):
  libflash: introduce blocklevel interface
  libflash: start using the blocklevel interface.

 core/flash.c               | 35 ++++++++++---------
 external/pflash/Makefile   |  2 +-
 external/pflash/pflash.c   | 33 +++++++++---------
 include/skiboot.h          |  4 ++-
 libflash/Makefile.inc      |  2 +-
 libflash/blocklevel.c      | 51 ++++++++++++++++++++++++++++
 libflash/blocklevel.h      | 40 ++++++++++++++++++++++
 libflash/libffs.c          | 52 ++++++++++++++---------------
 libflash/libffs.h          |  7 ++--
 libflash/libflash.c        | 83 ++++++++++++++++++++++++++++------------------
 libflash/libflash.h        | 25 +++++---------
 libflash/test/test-flash.c | 20 +++++------
 platforms/astbmc/pnor.c    | 12 ++++---
 platforms/rhesus/rhesus.c  | 11 +++---
 14 files changed, 245 insertions(+), 132 deletions(-)
 create mode 100644 libflash/blocklevel.c
 create mode 100644 libflash/blocklevel.h

-- 
1.9.1



More information about the Skiboot mailing list