问题
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