* This is useful in data structures and code for referencing a uclass_driver at * build time. Before this is used, an extern UCLASS_DRIVER() must have been * declared. * * For example: * * extern UCLASS_DRIVER(clk); * * struct uclass_driver *drvs[] = { * DM_UCLASS_DRIVER_REF(...
看来这个ll_entry_declare不仅可以用于定义struct uclass_driver,还可以用于定义其他的存放到 section 中的全局变量,为的就是方便集中遍历管理,比如一起初始化、遍历查询,这种全局变量,一般没有【删除】的操作 uclass 的操作 UCLASS_DRIVER定义后,使用uclass_get可以获取或者添加一个新的 class 到 uclass 的全局链表头:...
return 0; } UCLASS_DRIVER(ethernet) = { .name = "ethernet", UCLASS_DRIVER(eth) = { .name = "eth", .id = UCLASS_ETH, .post_bind = eth_post_bind, .pre_unbind = eth_pre_unbind, 0 comments on commit 26e85bf Please sign in to comment. Footer...
uboot uclass和uclass_driver,structuclass{ void*priv; structuclass_driver*uc_drv; structlist_headdev_head; structlist_headsibling_node;};structuclass_driver{ constchar*name;
static int virtio_uclass_child_pre_probe(struct udevice *vdev) { struct virtio_dev_priv *uc_priv = dev_get_uclass_priv(vdev->parent); u64 device_features; u64 driver_features; u64 driver_features_legacy; int i; int ret; /* * Save the real virtio device (eg: virtio-net, virtio...
This series adds support for a serial uclass, enabling serial drivers to be converted to use driver model. With v4, exynos boards all build and a second attempt has been made to add Tegra support via the ns16550 driver, tested on beaver, Jetson-TK1 and ...
UCLASS_DRIVER(key) = { .id = UCLASS_RC, .name = "rc", }; 1 change: 1 addition & 0 deletions 1 include/dm/uclass-id.h Original file line numberDiff line numberDiff line change @@ -93,6 +93,7 @@ enum uclass_id { UCLASS_WDT, /* Watchdot Timer driver */ UCLASS_FG, UCLASS...
(struct uclass *class) { printf("EFI: Initializing UCLASS_EFI\n"); return 0; } static int efi_uc_destroy(struct uclass *class) { printf("Destroying UCLASS_EFI\n"); return 0; } UCLASS_DRIVER(efi) = { .name = "efi", .id = UCLASS_EFI, .init = efi_uc_init, .destr...