From 4edc083c208dc48da5469566548b02862ca6ccad Mon Sep 17 00:00:00 2001 From: Mauro Salvini <48357805+msalvinik@users.noreply.github.com> Date: Thu, 22 Oct 2020 15:52:37 +0200 Subject: [PATCH] cpufreq: dt-platdev: Add stm32mp151 and stm32mp153 SOCs in the blacklist CubeMX code generates dts with compatible string set to "st,stm32mp151" and "st,stm32mp153" for stm32mp151 and stm32mp153 SOCs. Blacklisting these platforms avoids the following dump at boot when stm32-cpufreq is loaded. [ 1.640541] sysfs: cannot create duplicate filename '/devices/platform/cpufreq-dt' [ 1.640564] CPU: 0 PID: 16 Comm: kworker/0:1 Not tainted 5.4.31-g33ca1c71a-dirty #8 [ 1.640575] Hardware name: STM32 (Device Tree Support) [ 1.640602] Workqueue: events deferred_probe_work_func [ 1.640645] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 1.640669] [] (show_stack) from [] (dump_stack+0xb0/0xc4) [ 1.640694] [] (dump_stack) from [] (sysfs_warn_dup+0x58/0x64) [ 1.640716] [] (sysfs_warn_dup) from [] (sysfs_create_dir_ns+0xec/0xfc) [ 1.640737] [] (sysfs_create_dir_ns) from [] (kobject_add_internal+0xb4/0x354) [ 1.640758] [] (kobject_add_internal) from [] (kobject_add+0x5c/0xc8) [ 1.640781] [] (kobject_add) from [] (device_add+0x110/0x644) [ 1.640807] [] (device_add) from [] (platform_device_add+0x108/0x248) [ 1.640830] [] (platform_device_add) from [] (platform_device_register_full+0xd0/0x110) [ 1.640854] [] (platform_device_register_full) from [] (stm32_cpufreq_probe+0x1ac/0x1b8) [ 1.640876] [] (stm32_cpufreq_probe) from [] (platform_drv_probe+0x48/0x98) [ 1.640898] [] (platform_drv_probe) from [] (really_probe+0x24c/0x488) [ 1.640918] [] (really_probe) from [] (driver_probe_device+0x78/0x154) [ 1.640938] [] (driver_probe_device) from [] (bus_for_each_drv+0x84/0xd0) [ 1.640958] [] (bus_for_each_drv) from [] (__device_attach+0xe0/0x178) [ 1.640978] [] (__device_attach) from [] (bus_probe_device+0x84/0x8c) [ 1.640998] [] (bus_probe_device) from [] (deferred_probe_work_func+0x84/0xc4) [ 1.641019] [] (deferred_probe_work_func) from [] (process_one_work+0x1dc/0x58c) [ 1.641038] [] (process_one_work) from [] (worker_thread+0x248/0x528) [ 1.641059] [] (worker_thread) from [] (kthread+0x11c/0x144) [ 1.641081] [] (kthread) from [] (ret_from_fork+0x14/0x2c) [ 1.641093] Exception stack(0xd7175fb0 to 0xd7175ff8) [ 1.641109] 5fa0: 00000000 00000000 00000000 00000000 [ 1.641127] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 1.641143] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 1.641161] kobject_add_internal failed for cpufreq-dt with -EEXIST, don't try to register things with the same name in the same directory. --- drivers/cpufreq/cpufreq-dt-platdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c index 7ac5715e435973..d10ebc5c7a5899 100644 --- a/drivers/cpufreq/cpufreq-dt-platdev.c +++ b/drivers/cpufreq/cpufreq-dt-platdev.c @@ -131,6 +131,8 @@ static const struct of_device_id blacklist[] __initconst = { { .compatible = "st,stih407", }, { .compatible = "st,stih410", }, + { .compatible = "st,stm32mp151", }, + { .compatible = "st,stm32mp153", }, { .compatible = "st,stm32mp157", }, { .compatible = "sigma,tango4", },