what is __clk_of_table symbol in of_clk_init of linux kernel

戏子无情 提交于 2020-07-22 21:36:50

问题


I was going through linux kernel 3.10, which has a function of_clk_init which is as below

void __init of_clk_init(const struct of_device_id *matches)
{
    struct device_node *np;

    if (!matches)
        matches = __clk_of_table;

    for_each_matching_node(np, matches) {
        const struct of_device_id *match = of_match_node(matches, np);
        of_clk_init_cb_t clk_init_cb = match->data;
        clk_init_cb(np);
    }
}

when i look for the symbol __clk_of_table i did not find any reference but i am very sure that __clk_of_table has got something to do with the linux device tree model is that ??


回答1:


Yes, __clk_of_table reflects the special section in the blob that provides struct of_device_id for clocks.

Defined in the include/linux/clk-provider.h

extern struct of_device_id __clk_of_table;

#define CLK_OF_DECLARE(name, compat, fn) OF_DECLARE_1(clk, name, compat, fn)


来源:https://stackoverflow.com/questions/28063335/what-is-clk-of-table-symbol-in-of-clk-init-of-linux-kernel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!