Lines Matching +full:protocol +full:- +full:node

1 // SPDX-License-Identifier: GPL-2.0+
8 * - creates a handle
9 * - installs the driver binding protocol
12 * binding protocol.
14 * In bind() and stop() it checks if the controller implements the protocol
23 * check_node_type() - check node type
35 /* Open the device path protocol */ in check_node_type()
36 r = EFI_CALL(systab.boottime->open_protocol( in check_node_type()
40 /* Get the last node */ in check_node_type()
41 const struct efi_device_path *node = efi_dp_last_node(dp); in check_node_type() local
43 if (!node || node->type == DEVICE_PATH_TYPE_MEDIA_DEVICE) in check_node_type()
50 * efi_uc_supported() - check if the driver supports the controller
52 * @this: driver binding protocol
70 ret = EFI_CALL(systab.boottime->open_protocol( in efi_uc_supported()
71 controller_handle, bp->ops->protocol, in efi_uc_supported()
72 &interface, this->driver_binding_handle, in efi_uc_supported()
87 r = EFI_CALL(systab.boottime->close_protocol( in efi_uc_supported()
88 controller_handle, bp->ops->protocol, in efi_uc_supported()
89 this->driver_binding_handle, in efi_uc_supported()
98 * efi_uc_start() - create child controllers and attach driver
100 * @this: driver binding protocol
119 ret = EFI_CALL(systab.boottime->open_protocol( in efi_uc_start()
120 controller_handle, bp->ops->protocol, in efi_uc_start()
121 &interface, this->driver_binding_handle, in efi_uc_start()
135 r = EFI_CALL(systab.boottime->close_protocol( in efi_uc_start()
136 controller_handle, bp->ops->protocol, in efi_uc_start()
137 this->driver_binding_handle, in efi_uc_start()
145 bp->ops->bind(controller_handle, interface); in efi_uc_start()
152 * disconnect_child() - remove a single child controller from the parent
166 ret = EFI_CALL(systab.boottime->close_protocol( in disconnect_child()
170 EFI_PRINT("Cannot close protocol\n"); in disconnect_child()
173 ret = EFI_CALL(systab.boottime->uninstall_protocol_interface( in disconnect_child()
176 EFI_PRINT("Cannot uninstall protocol interface\n"); in disconnect_child()
183 * efi_uc_stop() - Remove child controllers and disconnect the controller
185 * @this: driver binding protocol
219 ret = EFI_CALL(systab.boottime->open_protocol_information( in efi_uc_stop()
225 if (entry_buffer[--count].attributes & in efi_uc_stop()
234 ret = EFI_CALL(systab.boottime->free_pool(entry_buffer)); in efi_uc_stop()
239 ret = EFI_CALL(systab.boottime->close_protocol( in efi_uc_stop()
241 this->driver_binding_handle, controller_handle)); in efi_uc_stop()
247 * efi_add_driver() - add driver
255 const struct efi_driver_ops *ops = drv->ops; in efi_add_driver()
258 debug("EFI: Adding driver '%s'\n", drv->name); in efi_add_driver()
259 if (!ops->protocol) { in efi_add_driver()
260 printf("EFI: ERROR: protocol GUID missing for driver '%s'\n", in efi_add_driver()
261 drv->name); in efi_add_driver()
268 bp->bp.supported = efi_uc_supported; in efi_add_driver()
269 bp->bp.start = efi_uc_start; in efi_add_driver()
270 bp->bp.stop = efi_uc_stop; in efi_add_driver()
271 bp->bp.version = 0xffffffff; in efi_add_driver()
272 bp->ops = drv->ops; in efi_add_driver()
274 ret = efi_create_handle(&bp->bp.driver_binding_handle); in efi_add_driver()
279 bp->bp.image_handle = bp->bp.driver_binding_handle; in efi_add_driver()
280 ret = efi_add_protocol(bp->bp.driver_binding_handle, in efi_add_driver()
283 efi_delete_handle(bp->bp.driver_binding_handle); in efi_add_driver()
292 * efi_driver_init() - initialize the EFI drivers
309 if (drv->id == UCLASS_EFI) { in efi_driver_init()
313 drv->name); in efi_driver_init()
322 * efi_uc_init() - initialize the EFI uclass
334 * efi_uc_destroy() - destroy the EFI uclass