aboutsummaryrefslogtreecommitdiff
path: root/lib/efi_driver
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-01-11 13:55:03 -0500
committerTom Rini <trini@konsulko.com>2021-01-11 13:55:03 -0500
commitd71be1990218957b9f05dbf13a72859a2abe06d7 (patch)
tree99858dc9988f7f7b4c0ab1d8d45738e3abdf38c8 /lib/efi_driver
parentc4fddedc48f336eabc4ce3f74940e6aa372de18c (diff)
parentbc0b99bd8b19599f670f42401de655fa9b44cd94 (diff)
Merge branch 'next'
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'lib/efi_driver')
-rw-r--r--lib/efi_driver/efi_block_device.c22
-rw-r--r--lib/efi_driver/efi_uclass.c18
2 files changed, 20 insertions, 20 deletions
diff --git a/lib/efi_driver/efi_block_device.c b/lib/efi_driver/efi_block_device.c
index 0e72a68bce..0937e3595a 100644
--- a/lib/efi_driver/efi_block_device.c
+++ b/lib/efi_driver/efi_block_device.c
@@ -42,7 +42,7 @@
* handle handle of the controller on which this driver is installed
* io block io protocol proxied by this driver
*/
-struct efi_blk_platdata {
+struct efi_blk_plat {
efi_handle_t handle;
struct efi_block_io *io;
};
@@ -59,8 +59,8 @@ struct efi_blk_platdata {
static ulong efi_bl_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt,
void *buffer)
{
- struct efi_blk_platdata *platdata = dev_get_platdata(dev);
- struct efi_block_io *io = platdata->io;
+ struct efi_blk_plat *plat = dev_get_plat(dev);
+ struct efi_block_io *io = plat->io;
efi_status_t ret;
EFI_PRINT("%s: read '%s', from block " LBAFU ", " LBAFU " blocks\n",
@@ -88,8 +88,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_platdata *platdata = dev_get_platdata(dev);
- struct efi_block_io *io = platdata->io;
+ struct efi_blk_plat *plat = dev_get_plat(dev);
+ struct efi_block_io *io = plat->io;
efi_status_t ret;
EFI_PRINT("%s: write '%s', from block " LBAFU ", " LBAFU " blocks\n",
@@ -118,7 +118,7 @@ static int efi_bl_bind_partitions(efi_handle_t handle, struct udevice *dev)
struct blk_desc *desc;
const char *if_typename;
- desc = dev_get_uclass_platdata(dev);
+ desc = dev_get_uclass_plat(dev);
if_typename = blk_get_if_type_name(desc->if_type);
return efi_disk_create_partitions(handle, desc, if_typename,
@@ -140,7 +140,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_platdata *platdata;
+ struct efi_blk_plat *plat;
EFI_PRINT("%s: handle %p, interface %p\n", __func__, handle, io);
@@ -169,9 +169,9 @@ static int efi_bl_bind(efi_handle_t handle, void *interface)
/* Set the DM_FLAG_NAME_ALLOCED flag to avoid a memory leak */
device_set_name_alloced(bdev);
- platdata = dev_get_platdata(bdev);
- platdata->handle = handle;
- platdata->io = interface;
+ plat = dev_get_plat(bdev);
+ plat->handle = handle;
+ plat->io = interface;
ret = device_probe(bdev);
if (ret)
@@ -196,7 +196,7 @@ U_BOOT_DRIVER(efi_blk) = {
.name = "efi_blk",
.id = UCLASS_BLK,
.ops = &efi_blk_ops,
- .platdata_auto_alloc_size = sizeof(struct efi_blk_platdata),
+ .plat_auto = sizeof(struct efi_blk_plat),
};
/* EFI driver operators */
diff --git a/lib/efi_driver/efi_uclass.c b/lib/efi_driver/efi_uclass.c
index 0cf74b0361..382c2b477f 100644
--- a/lib/efi_driver/efi_uclass.c
+++ b/lib/efi_driver/efi_uclass.c
@@ -238,7 +238,7 @@ static efi_status_t EFIAPI efi_uc_stop(
}
ret = EFI_CALL(systab.boottime->free_pool(entry_buffer));
if (ret != EFI_SUCCESS)
- printf("%s: ERROR: Cannot free pool\n", __func__);
+ log_err("Cannot free EFI memory pool\n");
/* Detach driver from controller */
ret = EFI_CALL(systab.boottime->close_protocol(
@@ -260,10 +260,10 @@ static efi_status_t efi_add_driver(struct driver *drv)
const struct efi_driver_ops *ops = drv->ops;
struct efi_driver_binding_extended_protocol *bp;
- debug("EFI: Adding driver '%s'\n", drv->name);
+ log_debug("Adding EFI driver '%s'\n", drv->name);
if (!ops->protocol) {
- printf("EFI: ERROR: protocol GUID missing for driver '%s'\n",
- drv->name);
+ log_err("EFI protocol GUID missing for driver '%s'\n",
+ drv->name);
return EFI_INVALID_PARAMETER;
}
bp = calloc(1, sizeof(struct efi_driver_binding_extended_protocol));
@@ -305,14 +305,14 @@ efi_status_t efi_driver_init(void)
struct driver *drv;
efi_status_t ret = EFI_SUCCESS;
- debug("EFI: Initializing EFI driver framework\n");
+ log_debug("Initializing EFI driver framework\n");
for (drv = ll_entry_start(struct driver, driver);
drv < ll_entry_end(struct driver, driver); ++drv) {
if (drv->id == UCLASS_EFI) {
ret = efi_add_driver(drv);
if (ret != EFI_SUCCESS) {
- printf("EFI: ERROR: failed to add driver %s\n",
- drv->name);
+ log_err("Failed to add EFI driver %s\n",
+ drv->name);
break;
}
}
@@ -328,7 +328,7 @@ efi_status_t efi_driver_init(void)
*/
static int efi_uc_init(struct uclass *class)
{
- printf("EFI: Initializing UCLASS_EFI\n");
+ log_debug("Initializing UCLASS_EFI\n");
return 0;
}
@@ -340,7 +340,7 @@ static int efi_uc_init(struct uclass *class)
*/
static int efi_uc_destroy(struct uclass *class)
{
- printf("Destroying UCLASS_EFI\n");
+ log_debug("Destroying UCLASS_EFI\n");
return 0;
}