All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 00/30] dm: Add driver-model support for block drivers
@ 2016-02-15  2:16 Simon Glass
  2016-02-15  2:16 ` [U-Boot] [PATCH 01/30] dm: Drop the block_dev_desc_t typedef Simon Glass
                   ` (31 more replies)
  0 siblings, 32 replies; 69+ messages in thread
From: Simon Glass @ 2016-02-15  2:16 UTC (permalink / raw)
  To: u-boot

Recent additions of the MMC and DISK uclasses have indicated that it is time
to look at adding a uclass for block devices. This series does this and
includes a few clean-ups to the partition code also.

A block device is typically a child device of its storage parent. For
example an MMC device will have a block-device child. A USB storage device
may have multiple block-device children, one for each LUN.

With this series only USB storage and 'host' are converted over to use the
new support. Several more remain, including SCSI, IDE and MMC. Each of these
should get its own uclass.

The uclass implements only a few basic features. A few tests are added to
check that things work as expected.

The code size impact of switching to driver model for block devices is
small. One benefit is that it becomes possible to enumerate all block
devices, regardless of their type.


Simon Glass (30):
  dm: Drop the block_dev_desc_t typedef
  dm: pci: Break out the common region display code
  dm: part: Correct a sandbox build warning
  dm: fdtdec: Correct a sandbox build warning
  dm: part: Drop the common.h header
  dm: Add a new header for block devices
  dm: blk: Convert interface type to an enum
  dm: blk: Add comments to a few functions
  dm: blk: Rename get_dev() to blk_get_dev()
  dm: blk: Rename get_device() to blk_get_device_str()
  dm: blk: Rename get_device_and_partition()
  dm: part: Add a cast to avoid a compiler warning
  dm: sandbox: Enable all partition types
  dm: part: Convert partition API use to linker lists
  dm: part: Rename some partition functions
  dm: cbfs: Fix handling of invalid type
  dm: sandbox: Enable cbfs and cramfs
  dm: block: Rename device number member dev to devnum
  dm: block: Adjust device calls to go through helpers function
  dm: usb: Avoid exceeding available array size for storage devices
  dm: usb: Tidy up storage code ready for driver model conversion
  dm: blk: Add a block-device uclass
  dm: sandbox: Prepare block driver for driver-model conversion
  dm: sandbox: Add driver-model block-device support for sandbox
  dm: usb: Convert USB storage to use driver-model for block devs
  dm: usb: Unbind old block devices when shutting down USB
  dm: sandbox: Switch over to use DM for block devices
  dm: sandbox: Drop the pre-DM host implementation
  dm: usb: Clean up USB after each test
  dm: blk: Add tests for block devices

 api/api.c                     |   2 +-
 api/api_storage.c             |  26 ++--
 board/cm5200/fwupdate.c       |   4 +-
 board/mpl/pip405/README       |   4 +-
 board/sunxi/board.c           |   4 +-
 cmd/cbfs.c                    |   5 +-
 cmd/disk.c                    |  12 +-
 cmd/fat.c                     |  12 +-
 cmd/gpt.c                     |  10 +-
 cmd/host.c                    |  13 +-
 cmd/ide.c                     |  44 +++---
 cmd/mmc.c                     |   4 +-
 cmd/mmc_spi.c                 |   4 +-
 cmd/part.c                    |  24 ++--
 cmd/read.c                    |  10 +-
 cmd/reiser.c                  |  12 +-
 cmd/sata.c                    |  22 +--
 cmd/scsi.c                    |  24 ++--
 cmd/unzip.c                   |   4 +-
 cmd/usb.c                     |  12 +-
 cmd/usb_mass_storage.c        |  10 +-
 cmd/zfs.c                     |  10 +-
 common/env_fat.c              |  12 +-
 common/fb_mmc.c               |  33 ++---
 common/spl/spl_ext.c          |  12 +-
 common/spl/spl_fat.c          |   8 +-
 common/spl/spl_mmc.c          |   2 +-
 common/spl/spl_sata.c         |   2 +-
 common/spl/spl_usb.c          |   2 +-
 common/usb_storage.c          | 276 +++++++++++++++++++++++++++----------
 configs/sandbox_defconfig     |   1 +
 disk/part.c                   | 230 +++++++++++--------------------
 disk/part_amiga.c             |  33 +++--
 disk/part_dos.c               |  66 +++++----
 disk/part_efi.c               |  96 ++++++-------
 disk/part_iso.c               |  72 +++++-----
 disk/part_mac.c               |  58 ++++----
 drivers/block/Kconfig         |  11 ++
 drivers/block/Makefile        |   2 +
 drivers/block/blk-uclass.c    | 175 ++++++++++++++++++++++++
 drivers/block/dwc_ahsata.c    |   4 +-
 drivers/block/pata_bfin.c     |   2 +-
 drivers/block/sandbox.c       | 170 +++++++++++++----------
 drivers/block/systemace.c     |  12 +-
 drivers/dfu/dfu_mmc.c         |   4 +-
 drivers/mmc/arm_pl180_mmci.c  |   2 +-
 drivers/mmc/mmc.c             |  14 +-
 drivers/mmc/mmc_private.h     |   8 +-
 drivers/mmc/mmc_write.c       |   8 +-
 drivers/mmc/mxsmmc.c          |  24 ++--
 drivers/mmc/omap_hsmmc.c      |   4 +-
 drivers/mmc/sdhci.c           |   2 +-
 drivers/pci/pci_auto_common.c |  51 +++----
 drivers/usb/host/usb-uclass.c |   6 +-
 fs/ext4/dev.c                 |  54 ++++----
 fs/ext4/ext4_common.c         |  27 ++--
 fs/ext4/ext4fs.c              |   2 +-
 fs/fat/fat.c                  |  18 +--
 fs/fat/fat_write.c            |   5 +-
 fs/fs.c                       |   8 +-
 fs/reiserfs/dev.c             |  33 ++---
 fs/sandbox/sandboxfs.c        |   4 +-
 fs/ubifs/ubifs.c              |   4 +-
 fs/zfs/dev.c                  |  35 +++--
 fs/zfs/zfs.c                  |   2 +-
 include/blk.h                 | 248 ++++++++++++++++++++++++++++++++++
 include/common.h              |   2 +-
 include/configs/sandbox.h     |   8 +-
 include/dm/uclass-id.h        |   1 +
 include/ext4fs.h              |   6 +-
 include/fat.h                 |   4 +-
 include/ide.h                 |  18 +--
 include/mmc.h                 |   2 +-
 include/part.h                | 306 +++++++++++++++++++++++++-----------------
 include/reiserfs.h            |   2 +-
 include/sandboxblockdev.h     |   4 +-
 include/sandboxfs.h           |   2 +-
 include/sata.h                |   2 +-
 include/spl.h                 |  10 +-
 include/systemace.h           |   2 +-
 include/ubifs_uboot.h         |   2 +-
 include/usb.h                 |   2 +-
 include/usb_mass_storage.h    |   2 +-
 include/zfs_common.h          |   4 +-
 lib/fdtdec.c                  |   5 +-
 lib/gunzip.c                  |   2 +-
 test/dm/Makefile              |   1 +
 test/dm/blk.c                 |  96 +++++++++++++
 test/dm/usb.c                 |   8 +-
 89 files changed, 1655 insertions(+), 950 deletions(-)
 create mode 100644 drivers/block/blk-uclass.c
 create mode 100644 include/blk.h
 create mode 100644 test/dm/blk.c

-- 
2.7.0.rc3.207.g0ac5344

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

end of thread, other threads:[~2016-02-29  4:48 UTC | newest]

Thread overview: 69+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-15  2:16 [U-Boot] [PATCH 00/30] dm: Add driver-model support for block drivers Simon Glass
2016-02-15  2:16 ` [U-Boot] [PATCH 01/30] dm: Drop the block_dev_desc_t typedef Simon Glass
2016-02-16 10:09   ` Bin Meng
2016-02-15  2:16 ` [U-Boot] [PATCH 02/30] dm: pci: Break out the common region display code Simon Glass
2016-02-16 10:09   ` Bin Meng
2016-02-29  4:18     ` Simon Glass
2016-02-17  0:19   ` Stephen Warren
2016-02-15  2:16 ` [U-Boot] [PATCH 03/30] dm: part: Correct a sandbox build warning Simon Glass
2016-02-16 10:09   ` Bin Meng
2016-02-29  4:18     ` Simon Glass
2016-02-15  2:16 ` [U-Boot] [PATCH 04/30] dm: fdtdec: " Simon Glass
2016-02-15  2:16 ` [U-Boot] [PATCH 05/30] dm: part: Drop the common.h header Simon Glass
2016-02-16 10:09   ` Bin Meng
2016-02-15  2:16 ` [U-Boot] [PATCH 06/30] dm: Add a new header for block devices Simon Glass
2016-02-16 10:10   ` Bin Meng
2016-02-15  2:16 ` [U-Boot] [PATCH 07/30] dm: blk: Convert interface type to an enum Simon Glass
2016-02-16 10:10   ` Bin Meng
2016-02-15  2:16 ` [U-Boot] [PATCH 08/30] dm: blk: Add comments to a few functions Simon Glass
2016-02-16 10:10   ` Bin Meng
2016-02-15  2:16 ` [U-Boot] [PATCH 09/30] dm: blk: Rename get_dev() to blk_get_dev() Simon Glass
2016-02-16 10:10   ` Bin Meng
2016-02-15  2:16 ` [U-Boot] [PATCH 10/30] dm: blk: Rename get_device() to blk_get_device_str() Simon Glass
2016-02-16 14:02   ` Bin Meng
2016-02-16 23:14   ` Stephen Warren
2016-02-15  2:16 ` [U-Boot] [PATCH 11/30] dm: blk: Rename get_device_and_partition() Simon Glass
2016-02-16 14:02   ` Bin Meng
2016-02-15  2:16 ` [U-Boot] [PATCH 12/30] dm: part: Add a cast to avoid a compiler warning Simon Glass
2016-02-16 14:02   ` Bin Meng
2016-02-15  2:16 ` [U-Boot] [PATCH 13/30] dm: sandbox: Enable all partition types Simon Glass
2016-02-15 22:37   ` Tom Rini
2016-02-16 14:02   ` Bin Meng
2016-02-15  2:16 ` [U-Boot] [PATCH 14/30] dm: part: Convert partition API use to linker lists Simon Glass
2016-02-15 22:37   ` Tom Rini
2016-02-16 14:25   ` Bin Meng
2016-02-29  4:18     ` Simon Glass
2016-02-17  6:41   ` Stephen Warren
2016-02-29  4:48     ` Simon Glass
2016-02-15  2:16 ` [U-Boot] [PATCH 15/30] dm: part: Rename some partition functions Simon Glass
2016-02-16 14:25   ` Bin Meng
2016-02-29  4:19     ` Simon Glass
2016-02-15  2:16 ` [U-Boot] [PATCH 16/30] dm: cbfs: Fix handling of invalid type Simon Glass
2016-02-16 14:51   ` Bin Meng
2016-02-29  4:19     ` Simon Glass
2016-02-15  2:16 ` [U-Boot] [PATCH 17/30] dm: sandbox: Enable cbfs and cramfs Simon Glass
2016-02-16 14:51   ` Bin Meng
2016-02-15  2:16 ` [U-Boot] [PATCH 18/30] dm: block: Rename device number member dev to devnum Simon Glass
2016-02-16 14:51   ` Bin Meng
2016-02-16 23:23   ` Stephen Warren
2016-02-29  4:19     ` Simon Glass
2016-02-15  2:16 ` [U-Boot] [PATCH 19/30] dm: block: Adjust device calls to go through helpers function Simon Glass
2016-02-16 14:51   ` Bin Meng
2016-02-15  2:16 ` [U-Boot] [PATCH 20/30] dm: usb: Avoid exceeding available array size for storage devices Simon Glass
2016-02-15  2:16 ` [U-Boot] [PATCH 21/30] dm: usb: Tidy up storage code ready for driver model conversion Simon Glass
2016-02-15  2:16 ` [U-Boot] [PATCH 22/30] dm: blk: Add a block-device uclass Simon Glass
2016-02-17  4:49   ` Bin Meng
2016-02-15  2:16 ` [U-Boot] [PATCH 23/30] dm: sandbox: Prepare block driver for driver-model conversion Simon Glass
2016-02-15  2:16 ` [U-Boot] [PATCH 24/30] dm: sandbox: Add driver-model block-device support for sandbox Simon Glass
2016-02-16 23:34   ` Stephen Warren
2016-02-29  4:19     ` Simon Glass
2016-02-15  2:16 ` [U-Boot] [PATCH 25/30] dm: usb: Convert USB storage to use driver-model for block devs Simon Glass
2016-02-15  2:16 ` [U-Boot] [PATCH 26/30] dm: usb: Unbind old block devices when shutting down USB Simon Glass
2016-02-15  2:16 ` [U-Boot] [PATCH 27/30] dm: sandbox: Switch over to use DM for block devices Simon Glass
2016-02-15  2:16 ` [U-Boot] [PATCH 28/30] dm: sandbox: Drop the pre-DM host implementation Simon Glass
2016-02-15  2:16 ` [U-Boot] [PATCH 29/30] dm: usb: Clean up USB after each test Simon Glass
2016-02-15  2:16 ` [U-Boot] [PATCH 30/30] dm: blk: Add tests for block devices Simon Glass
2016-02-15 22:37 ` [U-Boot] [PATCH 00/30] dm: Add driver-model support for block drivers Tom Rini
2016-02-29  4:19   ` Simon Glass
2016-02-16 23:43 ` Stephen Warren
2016-02-29  4:19   ` Simon Glass

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.