* [PATCH] ARM: OMAP: PM: stop early on systems without twl
@ 2017-06-09 22:32 Sebastian Reichel
2017-06-12 7:39 ` Tony Lindgren
0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Reichel @ 2017-06-09 22:32 UTC (permalink / raw)
To: Sebastian Reichel, Tony Lindgren, Kevin Hilman
Cc: Russell King, linux-omap, linux-arm-kernel, linux-kernel
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(+)
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();
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ARM: OMAP: PM: stop early on systems without twl
2017-06-09 22:32 [PATCH] ARM: OMAP: PM: stop early on systems without twl Sebastian Reichel
@ 2017-06-12 7:39 ` Tony Lindgren
2017-06-12 10:25 ` Tony Lindgren
0 siblings, 1 reply; 5+ messages in thread
From: Tony Lindgren @ 2017-06-12 7:39 UTC (permalink / raw)
To: Sebastian Reichel
Cc: Kevin Hilman, Russell King, linux-omap, linux-arm-kernel,
linux-kernel
* 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ARM: OMAP: PM: stop early on systems without twl
2017-06-12 7:39 ` Tony Lindgren
@ 2017-06-12 10:25 ` Tony Lindgren
2017-06-13 9:46 ` [PATCHv2] " Sebastian Reichel
0 siblings, 1 reply; 5+ messages in thread
From: Tony Lindgren @ 2017-06-12 10:25 UTC (permalink / raw)
To: Sebastian Reichel
Cc: Kevin Hilman, Russell King, linux-omap, linux-arm-kernel,
linux-kernel
* 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCHv2] ARM: OMAP: PM: stop early on systems without twl
2017-06-12 10:25 ` Tony Lindgren
@ 2017-06-13 9:46 ` Sebastian Reichel
2017-06-14 5:47 ` Tony Lindgren
0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Reichel @ 2017-06-13 9:46 UTC (permalink / raw)
To: Sebastian Reichel, Tony Lindgren, Kevin Hilman
Cc: Russell King, linux-omap, linux-arm-kernel, linux-kernel,
Sebastian Reichel
From: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
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 <sebastian.reichel@collabora.co.uk>
---
Changes since PATCHv1:
* actually add the message about missing PM support
* check if TWL is enabled at all
---
arch/arm/mach-omap2/pm.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index 63027e60cc20..92e335decc61 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -240,6 +240,10 @@ omap_postcore_initcall(omap2_common_pm_init);
int __init omap2_common_pm_late_init(void)
{
+#if IS_BUILTIN(CONFIG_TWL6040_CORE) || IS_BUILTIN(CONFIG_TWL4030_CORE)
+ if (!twl_rev())
+ goto no_twl;
+
/* Init the voltage layer */
omap3_twl_init();
omap4_twl_init();
@@ -253,4 +257,9 @@ int __init omap2_common_pm_late_init(void)
omap_devinit_smartreflex();
return 0;
+
+no_twl:
+#endif
+ pr_err("OMAP4 PM not supported!\n");
+ return -ENODEV;
}
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCHv2] ARM: OMAP: PM: stop early on systems without twl
2017-06-13 9:46 ` [PATCHv2] " Sebastian Reichel
@ 2017-06-14 5:47 ` Tony Lindgren
0 siblings, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2017-06-14 5:47 UTC (permalink / raw)
To: Sebastian Reichel
Cc: Kevin Hilman, Russell King, linux-omap, linux-arm-kernel,
linux-kernel, Sebastian Reichel
* Sebastian Reichel <sre@kernel.org> [170613 02:50]:
> From: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
> diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
> index 63027e60cc20..92e335decc61 100644
> --- a/arch/arm/mach-omap2/pm.c
> +++ b/arch/arm/mach-omap2/pm.c
> @@ -240,6 +240,10 @@ omap_postcore_initcall(omap2_common_pm_init);
>
> int __init omap2_common_pm_late_init(void)
> {
> +#if IS_BUILTIN(CONFIG_TWL6040_CORE) || IS_BUILTIN(CONFIG_TWL4030_CORE)
> + if (!twl_rev())
> + goto no_twl;
> +
> /* Init the voltage layer */
> omap3_twl_init();
> omap4_twl_init();
> @@ -253,4 +257,9 @@ int __init omap2_common_pm_late_init(void)
> omap_devinit_smartreflex();
>
> return 0;
> +
> +no_twl:
> +#endif
> + pr_err("OMAP4 PM not supported!\n");
> + return -ENODEV;
This should probably just say "OMAP4 SmartReflex not supported".
We already have omap4 CPUs hit off mode during idle. What's
missing is save and restore of registers for various domains.
SmartReflex is also doable without twl PMICs, at least ti81xx
are doing SmartReflex over a group of GPIO pins without twl.
So maybe just put the twl specific parts into IS_BUILTIN so
we can optionally add other PM init here if needed?
Regards,
Tony
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-06-14 5:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-09 22:32 [PATCH] ARM: OMAP: PM: stop early on systems without twl Sebastian Reichel
2017-06-12 7:39 ` Tony Lindgren
2017-06-12 10:25 ` Tony Lindgren
2017-06-13 9:46 ` [PATCHv2] " Sebastian Reichel
2017-06-14 5:47 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).