mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* Introduce mtd-peb API
@ 2016-03-15 11:15 Sascha Hauer
  2016-03-15 11:15 ` [PATCH 01/16] mtd: Add support for marking blocks as good Sascha Hauer
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: Sascha Hauer @ 2016-03-15 11:15 UTC (permalink / raw)
  To: Barebox List

The following series introduces and makes use of the mtd-peb API.

Raw Nand devices are best handled in a eraseblock oriented way. Also
these devices need a proper bad block handling. The regular mtd API
is stream oriented (at least for read/write). Using these functions
includes unhandy use of 64bit arithmetics and handling erasing blocks
and bad blocks requires us to align the offset back to block boundaries.

The UBI IO layer already has a nice API to handle Nand blockwise. This
series strips the API out of the UBI code and makes it available for other
users. It's names the mtd-peb API (peb for Physical Erase Block). UBI
and ubiformat are converted to this API in this series. Another user
will be the i.MX internal nand update code which is converted in another
series.

Since UBI and ubiformat now share more code this series makes the image
a little smaller. Hurray, it's been some time since this last happened.

Sascha

----------------------------------------------------------------
Sascha Hauer (16):
      mtd: Add support for marking blocks as good
      mtd: nand: Add option to print bbt in nand command
      mtd: mtdpart: Add oob_read function
      mtd: Introduce function to get mtd type string
      mtd: rename mtd_all_ff -> mtd_buf_all_ff
      mtd: Introduce mtd_check_pattern
      mtd: Introduce mtd-peb API
      ubiformat: Use mtd-peb API
      remove now unused libmtd
      mtd: ubi: Use mtd_all_ff/mtd_check_pattern
      mtd: ubi: Use mtd_peb_check_all_ff
      mtd: ubi: Use mtd_peb_torture
      mtd: ubi: Use mtd_peb_read
      mtd: ubi: Use mtd_peb_write
      mtd: ubi: Use mtd_peb_erase
      mtd: ubi: Make debug options configurable

 commands/Kconfig             |   1 -
 commands/nand.c              |  79 +++++--
 commands/ubiformat.c         | 191 +++++++--------
 drivers/mtd/Kconfig          |   9 +
 drivers/mtd/Makefile         |   2 +-
 drivers/mtd/core.c           |  67 +++++-
 drivers/mtd/mtdconcat.c      |  24 ++
 drivers/mtd/nand/nand_base.c |  61 ++++-
 drivers/mtd/partition.c      |  38 +++
 drivers/mtd/peb.c            | 537 +++++++++++++++++++++++++++++++++++++++++++
 drivers/mtd/ubi/Kconfig      |  13 ++
 drivers/mtd/ubi/attach.c     |   2 +-
 drivers/mtd/ubi/debug.h      |  51 +---
 drivers/mtd/ubi/io.c         | 415 ++-------------------------------
 drivers/mtd/ubi/misc.c       |  19 --
 drivers/mtd/ubi/ubi.h        |   2 -
 drivers/mtd/ubi/wl.c         |   5 -
 fs/devfs-core.c              |   1 +
 include/linux/mtd/mtd-abi.h  |   1 +
 include/linux/mtd/mtd.h      |   6 +-
 include/linux/mtd/nand.h     |   2 +
 include/mtd/libmtd.h         | 149 ------------
 include/mtd/libscan.h        |   3 +-
 include/mtd/libubigen.h      |   4 +-
 include/mtd/mtd-peb.h        |  21 ++
 lib/Kconfig                  |   3 -
 lib/Makefile                 |   1 -
 lib/libmtd.c                 | 368 -----------------------------
 lib/libscan.c                |  30 +--
 lib/libubigen.c              |  23 +-
 30 files changed, 994 insertions(+), 1134 deletions(-)
 create mode 100644 drivers/mtd/peb.c
 delete mode 100644 include/mtd/libmtd.h
 create mode 100644 include/mtd/mtd-peb.h
 delete mode 100644 lib/libmtd.c

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2016-03-15 11:16 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-15 11:15 Introduce mtd-peb API Sascha Hauer
2016-03-15 11:15 ` [PATCH 01/16] mtd: Add support for marking blocks as good Sascha Hauer
2016-03-15 11:15 ` [PATCH 02/16] mtd: nand: Add option to print bbt in nand command Sascha Hauer
2016-03-15 11:15 ` [PATCH 03/16] mtd: mtdpart: Add oob_read function Sascha Hauer
2016-03-15 11:15 ` [PATCH 04/16] mtd: Introduce function to get mtd type string Sascha Hauer
2016-03-15 11:15 ` [PATCH 05/16] mtd: rename mtd_all_ff -> mtd_buf_all_ff Sascha Hauer
2016-03-15 11:15 ` [PATCH 06/16] mtd: Introduce mtd_check_pattern Sascha Hauer
2016-03-15 11:15 ` [PATCH 07/16] mtd: Introduce mtd-peb API Sascha Hauer
2016-03-15 11:15 ` [PATCH 08/16] ubiformat: Use " Sascha Hauer
2016-03-15 11:15 ` [PATCH 09/16] remove now unused libmtd Sascha Hauer
2016-03-15 11:15 ` [PATCH 10/16] mtd: ubi: Use mtd_all_ff/mtd_check_pattern Sascha Hauer
2016-03-15 11:15 ` [PATCH 11/16] mtd: ubi: Use mtd_peb_check_all_ff Sascha Hauer
2016-03-15 11:15 ` [PATCH 12/16] mtd: ubi: Use mtd_peb_torture Sascha Hauer
2016-03-15 11:15 ` [PATCH 13/16] mtd: ubi: Use mtd_peb_read Sascha Hauer
2016-03-15 11:15 ` [PATCH 14/16] mtd: ubi: Use mtd_peb_write Sascha Hauer
2016-03-15 11:15 ` [PATCH 15/16] mtd: ubi: Use mtd_peb_erase Sascha Hauer
2016-03-15 11:15 ` [PATCH 16/16] mtd: ubi: Make debug options configurable Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox