diff options
author | Tom Rini <trini@konsulko.com> | 2018-11-16 08:37:50 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-11-16 08:37:50 -0500 |
commit | 1d6edcbfed2af33c748f2beb399810a0441888da (patch) | |
tree | fe88d63e5ef1dbe1915f90e02429e8b6934859da /lib | |
parent | f6206f8587fc7ec82a57dbbeb5de0f94b3c2ef49 (diff) | |
parent | 4c6e27f63c88d065a98f438085dfc36af47d3a23 (diff) |
Merge tag 'pull-14nov18' of git://git.denx.de/u-boot-dm
- virtio implementation and supporting patches
- DM_FLAG_PRE_RELOC fixes
- regmap improvements
- minor buildman and sandbox things
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig | 6 | ||||
-rw-r--r-- | lib/efi/efi_app.c | 1 | ||||
-rw-r--r-- | lib/efi_driver/efi_block_device.c | 26 |
3 files changed, 18 insertions, 15 deletions
diff --git a/lib/Kconfig b/lib/Kconfig index ccab426e12..847e797a3a 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -21,6 +21,12 @@ config DYNAMIC_CRC_TABLE Enable this option to calculate entries for CRC tables at runtime. This can be helpful when reducing the size of the build image +config HAVE_ARCH_IOMAP + bool + help + Enable this option if architecture provides io{read,write}{8,16,32} + I/O accessor functions. + config HAVE_PRIVATE_LIBGCC bool diff --git a/lib/efi/efi_app.c b/lib/efi/efi_app.c index 5879d40386..0047998ee0 100644 --- a/lib/efi/efi_app.c +++ b/lib/efi/efi_app.c @@ -161,5 +161,4 @@ U_BOOT_DRIVER(efi_sysreset) = { .id = UCLASS_SYSRESET, .of_match = efi_sysreset_ids, .ops = &efi_sysreset_ops, - .flags = DM_FLAG_PRE_RELOC, }; diff --git a/lib/efi_driver/efi_block_device.c b/lib/efi_driver/efi_block_device.c index 5b9c139f38..3f147cf608 100644 --- a/lib/efi_driver/efi_block_device.c +++ b/lib/efi_driver/efi_block_device.c @@ -38,7 +38,7 @@ * handle handle of the controller on which this driver is installed * io block io protocol proxied by this driver */ -struct efi_blk_priv { +struct efi_blk_platdata { efi_handle_t handle; struct efi_block_io *io; }; @@ -55,8 +55,8 @@ struct efi_blk_priv { static ulong efi_bl_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, void *buffer) { - struct efi_blk_priv *priv = dev->priv; - struct efi_block_io *io = priv->io; + struct efi_blk_platdata *platdata = dev_get_platdata(dev); + struct efi_block_io *io = platdata->io; efi_status_t ret; EFI_PRINT("%s: read '%s', from block " LBAFU ", " LBAFU " blocks\n", @@ -84,8 +84,8 @@ static ulong efi_bl_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, static ulong efi_bl_write(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, const void *buffer) { - struct efi_blk_priv *priv = dev->priv; - struct efi_block_io *io = priv->io; + struct efi_blk_platdata *platdata = dev_get_platdata(dev); + struct efi_block_io *io = platdata->io; efi_status_t ret; EFI_PRINT("%s: write '%s', from block " LBAFU ", " LBAFU " blocks\n", @@ -135,7 +135,7 @@ static int efi_bl_bind(efi_handle_t handle, void *interface) struct efi_object *obj = efi_search_obj(handle); struct efi_block_io *io = interface; int disks; - struct efi_blk_priv *priv; + struct efi_blk_platdata *platdata; EFI_PRINT("%s: handle %p, interface %p\n", __func__, handle, io); @@ -163,18 +163,16 @@ static int efi_bl_bind(efi_handle_t handle, void *interface) return -ENOENT; /* Set the DM_FLAG_NAME_ALLOCED flag to avoid a memory leak */ device_set_name_alloced(bdev); - /* Allocate priv */ + + platdata = dev_get_platdata(bdev); + platdata->handle = handle; + platdata->io = interface; + ret = device_probe(bdev); if (ret) return ret; EFI_PRINT("%s: block device '%s' created\n", __func__, bdev->name); - priv = bdev->priv; - priv->handle = handle; - priv->io = interface; - - ret = blk_prepare_device(bdev); - /* Create handles for the partions of the block device */ disks = efi_bl_bind_partitions(handle, bdev); EFI_PRINT("Found %d partitions\n", disks); @@ -193,7 +191,7 @@ U_BOOT_DRIVER(efi_blk) = { .name = "efi_blk", .id = UCLASS_BLK, .ops = &efi_blk_ops, - .priv_auto_alloc_size = sizeof(struct efi_blk_priv), + .platdata_auto_alloc_size = sizeof(struct efi_blk_platdata), }; /* EFI driver operators */ |