diff mbox

ARM: OMAP: PM: stop early on systems without twl

Message ID 20170609223223.19079-1-sre@kernel.org (mailing list archive)
State New, archived
Headers show

Commit Message

Sebastian Reichel June 9, 2017, 10:32 p.m. UTC
Motorola Droid 4 has an OMAP4, but no TWL6030. It currently
complains verbosely about this during boot:

twl: not initialized
twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1410000 Vs max 1316660
omap2_set_init_voltage: unable to find boot up OPP for vdd_core
omap2_set_init_voltage: unable to set vdd_core
omap2_set_init_voltage: unable to find boot up OPP for vdd_iva
omap2_set_init_voltage: unable to set vdd_iva

While proper support for CPCAP should be added at some point,
let's exit early in omap2_common_pm_late_init() until that
has been implemented to avoid the above errors. There is still
a reminder about missing PM in dmesg:

Missing OMAP4 PM for this platform!

Signed-off-by: Sebastian Reichel <sre@kernel.org>
---
 arch/arm/mach-omap2/pm.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Tony Lindgren June 12, 2017, 7:39 a.m. UTC | #1
* Sebastian Reichel <sre@kernel.org> [170609 15:36]:
> Motorola Droid 4 has an OMAP4, but no TWL6030. It currently
> complains verbosely about this during boot:
> 
> twl: not initialized
> twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
> twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
> twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
> twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
> twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
> twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
> twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1410000 Vs max 1316660
> omap2_set_init_voltage: unable to find boot up OPP for vdd_core
> omap2_set_init_voltage: unable to set vdd_core
> omap2_set_init_voltage: unable to find boot up OPP for vdd_iva
> omap2_set_init_voltage: unable to set vdd_iva
> 
> While proper support for CPCAP should be added at some point,
> let's exit early in omap2_common_pm_late_init() until that
> has been implemented to avoid the above errors. There is still
> a reminder about missing PM in dmesg:
> 
> Missing OMAP4 PM for this platform!

Great good to see this dmesg spam go away. Applying into
omap-for-v4.13/soc-v3 thanks.

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tony Lindgren June 12, 2017, 10:25 a.m. UTC | #2
* Tony Lindgren <tony@atomide.com> [170612 00:43]:
> * Sebastian Reichel <sre@kernel.org> [170609 15:36]:
> > Motorola Droid 4 has an OMAP4, but no TWL6030. It currently
> > complains verbosely about this during boot:
> > 
> > twl: not initialized
> > twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
> > twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
> > twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
> > twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
> > twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
> > twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1375000 Vs max 1316660
> > twl6030_uv_to_vsel:OUT OF RANGE! non mapped vsel for 1410000 Vs max 1316660
> > omap2_set_init_voltage: unable to find boot up OPP for vdd_core
> > omap2_set_init_voltage: unable to set vdd_core
> > omap2_set_init_voltage: unable to find boot up OPP for vdd_iva
> > omap2_set_init_voltage: unable to set vdd_iva
> > 
> > While proper support for CPCAP should be added at some point,
> > let's exit early in omap2_common_pm_late_init() until that
> > has been implemented to avoid the above errors. There is still
> > a reminder about missing PM in dmesg:
> > 
> > Missing OMAP4 PM for this platform!
> 
> Great good to see this dmesg spam go away. Applying into
> omap-for-v4.13/soc-v3 thanks.

After running make randconfig builds over lunch I noticed
we can now get "undefined reference to `twl_rev'" so we
need something more here if CONFIG_TWL4030_CORE or
CONFIG_TWL6040_CORE is not selected or is a loadable module.

Maybe making the whole function depend on the following
might work:

#if IS_BUILTIN(CONFIG_TWL6040_CORE) || \
	IS_BUILTIN(CONFIG_TWL4030_CORE)
...
#endif

Anyways dropping for now.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index 63027e60cc20..4e4313cecc26 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -240,6 +240,9 @@  omap_postcore_initcall(omap2_common_pm_init);
 
 int __init omap2_common_pm_late_init(void)
 {
+	if (!twl_rev())
+		return -ENODEV;
+
 	/* Init the voltage layer */
 	omap3_twl_init();
 	omap4_twl_init();