Skip to content

Commit ddf536d

Browse files
Paul Walmsleytmlind
Paul Walmsley
authored andcommitted
ARM: OMAP: AM3517/3505: fix crash on boot due to incorrect voltagedomain data
AM3517/3505 chips don't have voltage controller and voltage processor IP blocks. Trying to use OMAP34xx/36xx voltage domain data on these chips causes a crash during boot: omap_vc_init_channel: PMIC info requried to configure vc forvdd_core not populated.Hence cannot initialize vc Unable to handle kernel NULL pointer dereference at virtual address 00000025 pgd = c0004000 [00000025] *pgd=00000000 Internal error: Oops: 5 [raspberrypi#1] SMP Modules linked in: CPU: 0 Tainted: G W (3.2.0-rc5-00006-g402ecf4 raspberrypi#304) PC is at omap_vp_init+0x5c/0x14c LR is at omap_vp_init+0x54/0x14c Fix this by using very minimal voltage domain definitions for AM3517/3505. Signed-off-by: Paul Walmsley <[email protected]> Cc: Igor Grinberg <[email protected]> Cc: Kevin Hilman <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
1 parent 4a4de1d commit ddf536d

File tree

1 file changed

+34
-6
lines changed

1 file changed

+34
-6
lines changed

arch/arm/mach-omap2/voltagedomains3xxx_data.c

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@
3131
* VDD data
3232
*/
3333

34+
/* OMAP3-common voltagedomain data */
35+
36+
static struct voltagedomain omap3_voltdm_wkup = {
37+
.name = "wakeup",
38+
};
39+
40+
/* 34xx/36xx voltagedomain data */
41+
3442
static const struct omap_vfsm_instance omap3_vdd1_vfsm = {
3543
.voltsetup_reg = OMAP3_PRM_VOLTSETUP1_OFFSET,
3644
.voltsetup_mask = OMAP3430_SETUP_TIME1_MASK,
@@ -63,22 +71,37 @@ static struct voltagedomain omap3_voltdm_core = {
6371
.vp = &omap3_vp_core,
6472
};
6573

66-
static struct voltagedomain omap3_voltdm_wkup = {
67-
.name = "wakeup",
68-
};
69-
7074
static struct voltagedomain *voltagedomains_omap3[] __initdata = {
7175
&omap3_voltdm_mpu,
7276
&omap3_voltdm_core,
7377
&omap3_voltdm_wkup,
7478
NULL,
7579
};
7680

81+
/* AM35xx voltagedomain data */
82+
83+
static struct voltagedomain am35xx_voltdm_mpu = {
84+
.name = "mpu_iva",
85+
};
86+
87+
static struct voltagedomain am35xx_voltdm_core = {
88+
.name = "core",
89+
};
90+
91+
static struct voltagedomain *voltagedomains_am35xx[] __initdata = {
92+
&am35xx_voltdm_mpu,
93+
&am35xx_voltdm_core,
94+
&omap3_voltdm_wkup,
95+
NULL,
96+
};
97+
98+
7799
static const char *sys_clk_name __initdata = "sys_ck";
78100

79101
void __init omap3xxx_voltagedomains_init(void)
80102
{
81103
struct voltagedomain *voltdm;
104+
struct voltagedomain **voltdms;
82105
int i;
83106

84107
/*
@@ -93,8 +116,13 @@ void __init omap3xxx_voltagedomains_init(void)
93116
omap3_voltdm_core.volt_data = omap34xx_vddcore_volt_data;
94117
}
95118

96-
for (i = 0; voltdm = voltagedomains_omap3[i], voltdm; i++)
119+
if (cpu_is_omap3517() || cpu_is_omap3505())
120+
voltdms = voltagedomains_am35xx;
121+
else
122+
voltdms = voltagedomains_omap3;
123+
124+
for (i = 0; voltdm = voltdms[i], voltdm; i++)
97125
voltdm->sys_clk.name = sys_clk_name;
98126

99-
voltdm_init(voltagedomains_omap3);
127+
voltdm_init(voltdms);
100128
};

0 commit comments

Comments
 (0)