summaryrefslogtreecommitdiff
path: root/arch/arm/mach-mx5/mx51_3stack.c
diff options
context:
space:
mode:
authorRanjani Vaidyanathan <ra5478@freescale.com>2011-02-10 15:41:59 -0600
committerRanjani Vaidyanathan <ra5478@freescale.com>2011-02-11 16:28:07 -0600
commitfd8d7287d8103a7c011afb00bb531e0429f152a4 (patch)
treeb480207c212978322c7498c74d19a0704aad6063 /arch/arm/mach-mx5/mx51_3stack.c
parentdfbb74a5b6afb66008f2911a00cf4ebbaa80d8f4 (diff)
ENGR00139053-2: MX50_ARM2:Incorrect num_cpu_wp initialization breaks dvfs_core
Incorrect initialization of num_cpu_wp breaks DVFS-CORE on MX50_ARM2. Fix by removing static initialization of the global variable. Instead initialize it to the size of the cpu_wp array defined in the board file. Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
Diffstat (limited to 'arch/arm/mach-mx5/mx51_3stack.c')
-rw-r--r--arch/arm/mach-mx5/mx51_3stack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-mx5/mx51_3stack.c b/arch/arm/mach-mx5/mx51_3stack.c
index 0cfe5a286343..544333d389a0 100644
--- a/arch/arm/mach-mx5/mx51_3stack.c
+++ b/arch/arm/mach-mx5/mx51_3stack.c
@@ -105,7 +105,7 @@ extern struct cpu_wp *(*get_cpu_wp)(int *wp);
extern void (*set_num_cpu_wp)(int num);
extern struct dvfs_wp *(*get_dvfs_core_wp)(int *wp);
-static int num_cpu_wp = 3;
+static int num_cpu_wp;
static bool debug_board_present;
static struct dvfs_wp dvfs_core_setpoint[] = {
@@ -304,7 +304,6 @@ static struct mxc_dvfs_platform_data dvfs_core_data = {
.upcnt_val = 10,
.dncnt_val = 10,
.delay_time = 30,
- .num_wp = 3,
};
static struct mxc_bus_freq_platform_data bus_freq_data = {
@@ -928,6 +927,7 @@ static void __init fixup_mxc_board(struct machine_desc *desc, struct tag *tags,
get_cpu_wp = mx51_3stack_get_cpu_wp;
set_num_cpu_wp = mx51_3stack_set_num_cpu_wp;
get_dvfs_core_wp = mx51_3stack_get_dvfs_core_table;
+ num_cpu_wp = ARRAY_SIZE(cpu_wp_auto);
}
static struct mxc_gps_platform_data gps_data = {