Skip to content

Commit caab13b

Browse files
sudeep-hollaarndb
authored andcommitted
drivers: soc: atmel: Avoid calling at91_soc_init on non AT91 SoCs
Since at91_soc_init is called unconditionally from atmel_soc_device_init, we get the following warning on all non AT91 SoCs: " AT91: Could not find identification node" Fix the same by filtering with allowed AT91 SoC list. Cc: Nicolas Ferre <[email protected]> Cc: Alexandre Belloni <[email protected]> Cc: Ludovic Desroches <[email protected]> Cc: [email protected] #4.12+ Signed-off-by: Sudeep Holla <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
1 parent 156d029 commit caab13b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

drivers/soc/atmel/soc.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,20 @@ struct soc_device * __init at91_soc_init(const struct at91_soc *socs)
271271
return soc_dev;
272272
}
273273

274+
static const struct of_device_id at91_soc_allowed_list[] __initconst = {
275+
{ .compatible = "atmel,at91rm9200", },
276+
{ .compatible = "atmel,at91sam9", },
277+
{ .compatible = "atmel,sama5", },
278+
{ .compatible = "atmel,samv7", }
279+
};
280+
274281
static int __init atmel_soc_device_init(void)
275282
{
283+
struct device_node *np = of_find_node_by_path("/");
284+
285+
if (!of_match_node(at91_soc_allowed_list, np))
286+
return 0;
287+
276288
at91_soc_init(socs);
277289

278290
return 0;

0 commit comments

Comments
 (0)