Skip to content

Commit 21852e7

Browse files
committed
Beagle C4: ONDEMAND reboot lockup fix: http://www.spinics.net/lists/linux-omap/msg82445.html
Signed-off-by: Robert Nelson <[email protected]>
1 parent 705f569 commit 21852e7

6 files changed

+142
-44
lines changed

patch.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ arm () {
5555
}
5656

5757
omap () {
58+
echo "dir: omap"
59+
${git} "${DIR}/patches/omap/0001-mach-omap2-board-igep0020.c-Fix-reboot-problem.patch"
60+
5861
echo "dir: omap/sakoman"
5962
${git} "${DIR}/patches/omap/sakoman/0001-OMAP-DSS2-add-bootarg-for-selecting-svideo.patch"
6063
${git} "${DIR}/patches/omap/sakoman/0002-video-add-timings-for-hd720.patch"
@@ -83,9 +86,7 @@ omap () {
8386
#cpufreq: only 800Mhz seems to cause hard lock... disable for now..
8487
${git} "${DIR}/patches/omap/beagle/0005-TEMP-Beagle-xM-cpufreq-disable-800Mhz-opp.patch"
8588

86-
#With this hack, ondemand no longer, locks up the Beagle C4 on software reset...
87-
#CONFIG_CPU_FREQ_GOV_ONDEMAND=m
88-
#${git} "${DIR}/patches/omap/beagle/0006-HACK-arm-omap-beagle-c4-fix-hardlock-on-software-res.patch"
89+
${git} "${DIR}/patches/omap/beagle/0006-ARM-OMAP-Beagle-C4-fix-reboot-problem.patch"
8990

9091
echo "dir: omap/panda"
9192
#Status: not for upstream: push device tree version upstream...

patches/defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
561561
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
562562
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
563563
CONFIG_CPU_FREQ_GOV_USERSPACE=m
564-
# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
564+
CONFIG_CPU_FREQ_GOV_ONDEMAND=m
565565
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
566566
CONFIG_GENERIC_CPUFREQ_CPU0=y
567567

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
From d88d9403d677ea0613413642dc4bd5d1ad93d536 Mon Sep 17 00:00:00 2001
2+
From: Matthias Brugger <[email protected]>
3+
Date: Thu, 15 Nov 2012 17:06:53 +0100
4+
Subject: [PATCH] mach-omap2/board-igep0020.c: Fix reboot problem
5+
6+
When rebooting an OMAP3530 at 125 MHz, the reboot hangs.
7+
This patch adds a generic power save script, which resets the TWL4030 when a
8+
warm reset occures. This way the OMAP3530 does not hang on reboot.
9+
10+
Signed-off-by: Matthias Brugger <[email protected]>
11+
---
12+
arch/arm/mach-omap2/board-igep0020.c | 36 ++++++++++++++++++++++++++++++++++
13+
1 file changed, 36 insertions(+)
14+
15+
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
16+
index 48d5e41..9ba1c4b 100644
17+
--- a/arch/arm/mach-omap2/board-igep0020.c
18+
+++ b/arch/arm/mach-omap2/board-igep0020.c
19+
@@ -487,11 +487,47 @@ static struct twl4030_keypad_data igep2_keypad_pdata = {
20+
.rep = 1,
21+
};
22+
23+
+static struct twl4030_ins wrst_seq[] __initdata = {
24+
+ {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_OFF), 2},
25+
+ {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_WRST), 15},
26+
+ {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_WRST), 15},
27+
+ {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_WRST), 0x60},
28+
+ {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2},
29+
+ {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_ACTIVE), 2},
30+
+};
31+
+
32+
+static struct twl4030_script wrst_script __initdata = {
33+
+ .script = wrst_seq,
34+
+ .size = ARRAY_SIZE(wrst_seq),
35+
+ .flags = TWL4030_WRST_SCRIPT,
36+
+};
37+
+
38+
+static struct twl4030_script *twl4030_scripts[] __initdata = {
39+
+ &wrst_script,
40+
+};
41+
+
42+
+static struct twl4030_resconfig twl4030_rconfig[] = {
43+
+ { .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P3, .type = -1,
44+
+ .type2 = -1 },
45+
+ { .resource = RES_VDD1, .devgroup = DEV_GRP_P1, .type = -1,
46+
+ .type2 = -1 },
47+
+ { .resource = RES_VDD2, .devgroup = DEV_GRP_P1, .type = -1,
48+
+ .type2 = -1 },
49+
+ { 0, 0},
50+
+};
51+
+
52+
+static struct twl4030_power_data igep_twl4030_power_data = {
53+
+ .scripts = twl4030_scripts,
54+
+ .num = ARRAY_SIZE(twl4030_scripts),
55+
+ .resource_config = twl4030_rconfig,
56+
+};
57+
+
58+
static struct twl4030_platform_data igep_twldata = {
59+
/* platform_data for children goes here */
60+
.gpio = &igep_twl4030_gpio_pdata,
61+
.vmmc1 = &igep_vmmc1,
62+
.vio = &igep_vio,
63+
+ .power = &igep_twl4030_power_data,
64+
};
65+
66+
static struct i2c_board_info __initdata igep2_i2c3_boardinfo[] = {
67+
--
68+
1.7.10.4
69+
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
From 1abd0711f76a5176d7584338bec51af11dad0fc5 Mon Sep 17 00:00:00 2001
2+
From: Robert Nelson <[email protected]>
3+
Date: Thu, 15 Nov 2012 13:06:40 -0600
4+
Subject: [PATCH 6/6] ARM: OMAP: Beagle C4: fix reboot problem
5+
6+
Signed-off-by: Robert Nelson <[email protected]>
7+
---
8+
arch/arm/mach-omap2/board-omap3beagle.c | 36 +++++++++++++++++++++++++++++++
9+
1 file changed, 36 insertions(+)
10+
11+
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
12+
index abef28a..6f8a7dc 100644
13+
--- a/arch/arm/mach-omap2/board-omap3beagle.c
14+
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
15+
@@ -667,6 +667,41 @@ static struct regulator_init_data beagle_vaux4 = {
16+
.consumer_supplies = &beagle_vaux4_supply,
17+
};
18+
19+
+static struct twl4030_ins wrst_seq[] __initdata = {
20+
+ {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_OFF), 2},
21+
+ {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_WRST), 15},
22+
+ {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_WRST), 15},
23+
+ {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_WRST), 0x60},
24+
+ {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2},
25+
+ {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_ACTIVE), 2},
26+
+};
27+
+
28+
+static struct twl4030_script wrst_script __initdata = {
29+
+ .script = wrst_seq,
30+
+ .size = ARRAY_SIZE(wrst_seq),
31+
+ .flags = TWL4030_WRST_SCRIPT,
32+
+};
33+
+
34+
+static struct twl4030_script *twl4030_scripts[] __initdata = {
35+
+ &wrst_script,
36+
+};
37+
+
38+
+static struct twl4030_resconfig twl4030_rconfig[] = {
39+
+ { .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P3, .type = -1,
40+
+ .type2 = -1 },
41+
+ { .resource = RES_VDD1, .devgroup = DEV_GRP_P1, .type = -1,
42+
+ .type2 = -1 },
43+
+ { .resource = RES_VDD2, .devgroup = DEV_GRP_P1, .type = -1,
44+
+ .type2 = -1 },
45+
+ { 0, 0},
46+
+};
47+
+
48+
+static struct twl4030_power_data beagle_twl4030_power_data = {
49+
+ .scripts = twl4030_scripts,
50+
+ .num = ARRAY_SIZE(twl4030_scripts),
51+
+ .resource_config = twl4030_rconfig,
52+
+};
53+
+
54+
static struct twl4030_platform_data beagle_twldata = {
55+
/* platform_data for children goes here */
56+
.gpio = &beagle_gpio_data,
57+
@@ -674,6 +709,7 @@ static struct twl4030_platform_data beagle_twldata = {
58+
.vsim = &beagle_vsim,
59+
.vaux3 = &beagle_vaux3,
60+
.vaux4 = &beagle_vaux4,
61+
+ .power = &beagle_twl4030_power_data,
62+
};
63+
64+
static struct i2c_board_info __initdata beagle_i2c_eeprom[] = {
65+
--
66+
1.7.10.4
67+

patches/omap/beagle/0006-HACK-arm-omap-beagle-c4-fix-hardlock-on-software-res.patch

Lines changed: 0 additions & 39 deletions
This file was deleted.

version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ config="omap2plus_defconfig"
2323
#Kernel/Build
2424
KERNEL_REL=3.7
2525
KERNEL_TAG=${KERNEL_REL}-rc5
26-
BUILD=d1.2
26+
BUILD=d1.3
2727

2828
#git branch
2929
#BRANCH="v3.7.x"

0 commit comments

Comments
 (0)