X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=lib%2Fefi_driver%2Fefi_uclass.c;h=7cdf81f40c1255439ca2164be4d0db6735d0be38;hb=c9222a08b3f7d1b0f7a72301db99dc54e09a3d10;hp=46b69b479cb6beb4e6bf5ebe8888cfa933f594e9;hpb=038782a27ad24260a4bc536772e10c351cf6522d;p=oweals%2Fu-boot.git diff --git a/lib/efi_driver/efi_uclass.c b/lib/efi_driver/efi_uclass.c index 46b69b479c..7cdf81f40c 100644 --- a/lib/efi_driver/efi_uclass.c +++ b/lib/efi_driver/efi_uclass.c @@ -1,10 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Uclass for EFI drivers * * Copyright (c) 2017 Heinrich Schuchardt * - * SPDX-License-Identifier: GPL-2.0+ - * * For each EFI driver the uclass * - creates a handle * - installs the driver binding protocol @@ -20,11 +19,13 @@ #include -/* - * Check node type. We do not support partitions as controller handles. +/** + * check_node_type() - check node type * - * @handle handle to be checked - * @return status code + * We do not support partitions as controller handles. + * + * @handle: handle to be checked + * Return: status code */ static efi_status_t check_node_type(efi_handle_t handle) { @@ -45,13 +46,13 @@ static efi_status_t check_node_type(efi_handle_t handle) return ret; } -/* - * Check if the driver supports the controller. +/** + * efi_uc_supported() - check if the driver supports the controller * - * @this driver binding protocol - * @controller_handle handle of the controller - * @remaining_device_path path specifying the child controller - * @return status code + * @this: driver binding protocol + * @controller_handle: handle of the controller + * @remaining_device_path: path specifying the child controller + * Return: status code */ static efi_status_t EFIAPI efi_uc_supported( struct efi_driver_binding_protocol *this, @@ -93,13 +94,13 @@ out: return EFI_EXIT(ret); } -/* - * Create child controllers and attach driver. +/** + * efi_uc_start() - create child controllers and attach driver * - * @this driver binding protocol - * @controller_handle handle of the controller - * @remaining_device_path path specifying the child controller - * @return status code + * @this: driver binding protocol + * @controller_handle: handle of the controller + * @remaining_device_path: path specifying the child controller + * Return: status code */ static efi_status_t EFIAPI efi_uc_start( struct efi_driver_binding_protocol *this, @@ -147,12 +148,13 @@ out: return EFI_EXIT(ret); } -/* - * Remove a single child controller from the parent controller. +/** + * disconnect_child() - remove a single child controller from the parent + * controller * - * @controller_handle parent controller - * @child_handle child controller - * @return status code + * @controller_handle: parent controller + * @child_handle: child controller + * Return: status code */ static efi_status_t disconnect_child(efi_handle_t controller_handle, efi_handle_t child_handle) @@ -177,14 +179,14 @@ static efi_status_t disconnect_child(efi_handle_t controller_handle, return ret; } -/* - * Remove child controllers and disconnect the controller. +/** + * efi_uc_stop() - Remove child controllers and disconnect the controller * - * @this driver binding protocol - * @controller_handle handle of the controller - * @number_of_children number of child controllers to remove - * @child_handle_buffer handles of the child controllers to remove - * @return status code + * @this: driver binding protocol + * @controller_handle: handle of the controller + * @number_of_children: number of child controllers to remove + * @child_handle_buffer: handles of the child controllers to remove + * Return: status code */ static efi_status_t EFIAPI efi_uc_stop( struct efi_driver_binding_protocol *this, @@ -231,8 +233,7 @@ static efi_status_t EFIAPI efi_uc_stop( } ret = EFI_CALL(systab.boottime->free_pool(entry_buffer)); if (ret != EFI_SUCCESS) - printf("%s(%u) %s: ERROR: Cannot free pool\n", - __FILE__, __LINE__, __func__); + printf("%s: ERROR: Cannot free pool\n", __func__); /* Detach driver from controller */ ret = EFI_CALL(systab.boottime->close_protocol( @@ -242,6 +243,12 @@ out: return EFI_EXIT(ret); } +/** + * efi_add_driver() - add driver + * + * @drv: driver to add + * Return: status code + */ static efi_status_t efi_add_driver(struct driver *drv) { efi_status_t ret; @@ -281,11 +288,12 @@ out: return ret; } -/* - * Initialize the EFI drivers. - * Called by board_init_r(). +/** + * efi_driver_init() - initialize the EFI drivers * - * @return 0 = success, any other value will stop further execution + * Called by efi_init_obj_list(). + * + * Return: 0 = success, any other value will stop further execution */ efi_status_t efi_driver_init(void) { @@ -310,12 +318,24 @@ efi_status_t efi_driver_init(void) return ret; } +/** + * efi_uc_init() - initialize the EFI uclass + * + * @class: the EFI uclass + * Return: 0 = success + */ static int efi_uc_init(struct uclass *class) { printf("EFI: Initializing UCLASS_EFI\n"); return 0; } +/** + * efi_uc_destroy() - destroy the EFI uclass + * + * @class: the EFI uclass + * Return: 0 = success + */ static int efi_uc_destroy(struct uclass *class) { printf("Destroying UCLASS_EFI\n");