From 5bd1f1a5ecc7ce6d812215a474869fcf2e10c1e4 Mon Sep 17 00:00:00 2001
From: Vincent Guittot <vincent.guittot@stericsson.com>
Date: Mon, 11 Oct 2010 09:23:18 +0200
Subject: [PATCH] cpufreq_getspeed can't return negative value

---
 arch/arm/mach-ux500/cpufreq.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-ux500/cpufreq.c b/arch/arm/mach-ux500/cpufreq.c
index 4454a08..ea01240 100755
--- a/arch/arm/mach-ux500/cpufreq.c
+++ b/arch/arm/mach-ux500/cpufreq.c
@@ -100,7 +100,9 @@ unsigned int u8500_getspeed(unsigned int cpu)
 	case ARM_50_OPP: return freq_table[1].frequency;
 	case ARM_100_OPP: return freq_table[2].frequency;
 	default:
-			  return -EINVAL;
+		/* During boot, the returned value is undefined */
+		/* In this case, we set the max frequency */
+		return freq_table[2].frequency;
 	}
 	return 0;
 }
-- 
1.7.0.4

