diff mbox

omap:pm: Fix boot-time errors with debugfs disabled

Message ID 20110512195841.GA13651@google.com (mailing list archive)
State New, archived
Headers show

Commit Message

Todd Poynor May 12, 2011, 7:58 p.m. UTC
On Fri, May 13, 2011 at 12:46:17AM +0530, Premi, Sanjeev wrote:
> > -----Original Message-----
> > From: Menon, Nishanth 
...
> > Last I tried, with Vishwa's dvfs branch on panda without voltage
> > registrations, things could crash :( if I get some time I will try to
> > port Vishwa's series onto kevin's branch as well and test and provide
> > any patches necessary.
> 
> [sp] I can try this on Panda. Will be able to get one tomorrow.

In case it helps, below is what I use for Panda.

---
ARM: OMAP2 voltage: Don't die if board does not register voltage params

This allows the DVFS patches to boot on boards not yet modified to
register voltage params.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
---
 arch/arm/mach-omap2/voltage.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

Comments

Nishanth Menon May 12, 2011, 9:03 p.m. UTC | #1
On 12:58-20110512, Todd Poynor wrote:
> On Fri, May 13, 2011 at 12:46:17AM +0530, Premi, Sanjeev wrote:
> > > -----Original Message-----
> > > From: Menon, Nishanth 
> ...
> > > Last I tried, with Vishwa's dvfs branch on panda without voltage
> > > registrations, things could crash :( if I get some time I will try to
> > > port Vishwa's series onto kevin's branch as well and test and provide
> > > any patches necessary.
> > 
> > [sp] I can try this on Panda. Will be able to get one tomorrow.
> 
> In case it helps, below is what I use for Panda.
> 
> ---
> ARM: OMAP2 voltage: Don't die if board does not register voltage params
> 
> This allows the DVFS patches to boot on boards not yet modified to
> register voltage params.
> 
> Signed-off-by: Todd Poynor <toddpoynor@google.com>
> ---
>  arch/arm/mach-omap2/voltage.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c
> index dbc1cfe..8f23d95 100644
> --- a/arch/arm/mach-omap2/voltage.c
> +++ b/arch/arm/mach-omap2/voltage.c
> @@ -617,6 +617,12 @@ static void __init omap4_vc_init(struct omap_vdd_info *vdd)
>  	struct clk *sys_ck;
>  	u32 sys_clk_speed;
>  
> +	if (!vdd->board_data) {
> +		pr_warning("%s: No voltage board params registered for vdd_%s\n",
> +			   __func__, vdd->voltdm.name);
> +		return;
> +	}
> +
>  	sys_ck = clk_get(NULL, "sys_clkin_ck");
>  	if (IS_ERR(sys_ck)) {
>  		pr_warning("%s: Could not get the sys clk to calculate"
looks around the right place.. but, which branch is this based on?
cant see board_data on linus master..
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c
index dbc1cfe..8f23d95 100644
--- a/arch/arm/mach-omap2/voltage.c
+++ b/arch/arm/mach-omap2/voltage.c
@@ -617,6 +617,12 @@  static void __init omap4_vc_init(struct omap_vdd_info *vdd)
 	struct clk *sys_ck;
 	u32 sys_clk_speed;
 
+	if (!vdd->board_data) {
+		pr_warning("%s: No voltage board params registered for vdd_%s\n",
+			   __func__, vdd->voltdm.name);
+		return;
+	}
+
 	sys_ck = clk_get(NULL, "sys_clkin_ck");
 	if (IS_ERR(sys_ck)) {
 		pr_warning("%s: Could not get the sys clk to calculate"