clocksource: add common of_clksrc_init() function
It is desirable to move all clocksource drivers to drivers/clocksource, yet each requires its own initialization function. We'd rather not pollute <linux/> with a header for each function. Instead, create a single of_clksrc_init() function which will determine which clocksource driver to initialize based on device tree. Based on a similar patch for drivers/irqchip by Thomas Petazzoni. Signed-off-by: Stephen Warren <swarren@nvidia.com>
This commit is contained in:
parent
6bb27d7349
commit
ae278a935f
5 changed files with 57 additions and 0 deletions
|
@ -149,6 +149,14 @@
|
|||
#define TRACE_SYSCALLS()
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CLKSRC_OF
|
||||
#define CLKSRC_OF_TABLES() . = ALIGN(8); \
|
||||
VMLINUX_SYMBOL(__clksrc_of_table) = .; \
|
||||
*(__clksrc_of_table) \
|
||||
*(__clksrc_of_table_end)
|
||||
#else
|
||||
#define CLKSRC_OF_TABLES()
|
||||
#endif
|
||||
|
||||
#define KERNEL_DTB() \
|
||||
STRUCT_ALIGN(); \
|
||||
|
@ -493,6 +501,7 @@
|
|||
DEV_DISCARD(init.rodata) \
|
||||
CPU_DISCARD(init.rodata) \
|
||||
MEM_DISCARD(init.rodata) \
|
||||
CLKSRC_OF_TABLES() \
|
||||
KERNEL_DTB()
|
||||
|
||||
#define INIT_TEXT \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue