Using a 'cpu' command to print CPU information

Ivan Kapaev loginyang at yandex.ru
Wed May 13 14:55:53 CEST 2020


Hi All,
 
I am trying to use 'cpu' command, so I modified config file and compiled
u-boot with a 'cpu' command enabled. But when I try to use it properly
it's completely silent.
 
It appeared that this behaviour is caused by list at 'dev_head' always
being empty in the corresponding uclass.
 
But driver from cpu-uclass.c initializes and binds successfuly.
Then what is missig yet?
 
This code executes successfully:
u-boot/drivers/core/uclass.c ->
static int uclass_add(enum uclass_id id, struct uclass **ucp)
    ...
    uc->uc_drv = uc_drv;
    INIT_LIST_HEAD(&uc->sibling_node);
    INIT_LIST_HEAD(&uc->dev_head);
    list_add(&uc->sibling_node, &DM_UCLASS_ROOT_NON_CONST);
    
    if (uc_drv->init) {
        ret = uc_drv->init(uc); /* this code is also executed */
        if (ret)
            goto fail;
    }
    
    *ucp = uc;
    
    return 0;
    ...
 
But list at 'dev_head' is empty and command is silent.
What could be done to make this command display useful info?
 
Best Regards,
Ivan


More information about the U-Boot mailing list