clk: of: fix clk_of_table generation
We used to collect all sections beginning with __clk_of_table_ in a single section in the linker using KEEP(*(.__clk_of_table_*)). That the sentinel entry ended up as the last entry was pure luck, but not always the case. Instead of putting all entries in different sections we now put all entries in the same section. Only the sentinel entry gets its own section and is collected by the linker separately. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reported-by: Andreas Willig <andreas.willig@rafi.de> Tested-by: Andreas Willig <andreas.willig@rafi.de>
This commit is contained in:
parent
e349701487
commit
dae7498d2c
|
@ -47,7 +47,8 @@
|
|||
#define BAREBOX_CLK_TABLE() \
|
||||
. = ALIGN(8); \
|
||||
__clk_of_table_start = .; \
|
||||
KEEP(*(.__clk_of_table_*)); \
|
||||
KEEP(*(.__clk_of_table)); \
|
||||
KEEP(*(.__clk_of_table_end)); \
|
||||
__clk_of_table_end = .;
|
||||
|
||||
#define BAREBOX_DTB() \
|
||||
|
|
|
@ -321,7 +321,7 @@ struct of_phandle_args;
|
|||
|
||||
#define CLK_OF_DECLARE(name, compat, fn) \
|
||||
const struct of_device_id __clk_of_table_##name \
|
||||
__attribute__ ((unused,section (".__clk_of_table_" __stringify(name)))) \
|
||||
__attribute__ ((unused,section (".__clk_of_table"))) \
|
||||
= { .compatible = compat, .data = fn }
|
||||
|
||||
#if defined(CONFIG_OFTREE) && defined(CONFIG_COMMON_CLK_OF_PROVIDER)
|
||||
|
|
Loading…
Reference in New Issue