[PATCH] regulator: s2mps11: Fix dwmmc failure on Gear 2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Invalid buck4 configuration in S2MPS14 regulators caused boot failure on
Gear 2 (dwmmc_exynos):

[    3.569137] EXT4-fs (mmcblk0p15): mounted filesystem with ordered data mode. Opts: (null)
[    3.571716] VFS: Mounted root (ext4 filesystem) readonly on device 179:15.
[    3.580836] devtmpfs: mounted
[    3.582033] Freeing unused kernel memory: 284K (c05b4000 - c05fb000)
[    3.629842] mmcblk0: error -110 sending status command, retrying
[    3.630244] mmcblk0: error -110 sending status command, retrying
[    3.636292] mmcblk0: error -110 sending status command, aborting
[    3.642279] end_request: I/O error, dev mmcblk0, sector 7302680
[    3.648128] end_request: I/O error, dev mmcblk0, sector 7302688
[    3.654025] end_request: I/O error, dev mmcblk0, sector 7302696
[    3.659927] end_request: I/O error, dev mmcblk0, sector 7302704
[    3.665829] end_request: I/O error, dev mmcblk0, sector 7302712
[    3.671731] end_request: I/O error, dev mmcblk0, sector 7302720
[    3.677635] end_request: I/O error, dev mmcblk0, sector 7302728
[    3.683536] end_request: I/O error, dev mmcblk0, sector 7302736
[    3.689438] end_request: I/O error, dev mmcblk0, sector 7302744
[    3.695339] end_request: I/O error, dev mmcblk0, sector 7302752
[    3.701445] mmcblk0: error -110 sending status command, retrying
[    3.707262] mmcblk0: error -110 sending status command, retrying
[    3.713248] mmcblk0: error -110 sending status command, aborting
[    3.727704] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000007
[    3.727704]
[    3.731205] CPU: 0 PID: 1 Comm: init Not tainted 3.17.0-rc1-00003-g5a867cf28893 #1183
[    3.739042] [<c0013b04>] (unwind_backtrace) from [<c0010dcc>] (show_stack+0x10/0x14)
[    3.746750] [<c0010dcc>] (show_stack) from [<c0414aa0>] (dump_stack+0x70/0xbc)
[    3.753952] [<c0414aa0>] (dump_stack) from [<c04122d4>] (panic+0x90/0x1fc)
[    3.760810] [<c04122d4>] (panic) from [<c0022f68>] (do_exit+0x834/0x8b0)
[    3.767492] [<c0022f68>] (do_exit) from [<c00230d0>] (do_group_exit+0x3c/0xb0)
[    3.774698] [<c00230d0>] (do_group_exit) from [<c002b734>] (get_signal+0x1dc/0x57c)
[    3.782333] [<c002b734>] (get_signal) from [<c0411d70>] (do_signal+0x84/0x3a4)
[    3.789537] [<c0411d70>] (do_signal) from [<c001093c>] (do_work_pending+0x84/0xc4)
[    3.797089] [<c001093c>] (do_work_pending) from [<c000e660>] (work_pending+0xc/0x20)
[    3.804812] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000007

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@xxxxxxxxxxx>
Fixes: 5a867cf28893 ("regulator: s2mps11: Optimize the regulator description macro")
Cc: <stable@xxxxxxxxxxxxxxx>
---
 drivers/regulator/s2mps11.c | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index c1444c3d84c2..9051ce6629d3 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -570,7 +570,7 @@ static struct regulator_ops s2mps14_reg_ops = {
 	.enable_mask	= S2MPS14_ENABLE_MASK		\
 }
 
-#define regulator_desc_s2mps14_buck(num, min, step) {		\
+#define regulator_desc_s2mps14_buck(num, min, step, min_sel) {	\
 	.name		= "BUCK"#num,				\
 	.id		= S2MPS14_BUCK##num,			\
 	.ops		= &s2mps14_reg_ops,			\
@@ -579,7 +579,7 @@ static struct regulator_ops s2mps14_reg_ops = {
 	.min_uV		= min,					\
 	.uV_step	= step,					\
 	.n_voltages	= S2MPS14_BUCK_N_VOLTAGES,		\
-	.linear_min_sel = S2MPS14_BUCK1235_START_SEL,		\
+	.linear_min_sel = min_sel,				\
 	.ramp_delay	= S2MPS14_BUCK_RAMP_DELAY,		\
 	.vsel_reg	= S2MPS14_REG_B1CTRL2 + (num - 1) * 2,	\
 	.vsel_mask	= S2MPS14_BUCK_VSEL_MASK,		\
@@ -613,11 +613,16 @@ static const struct regulator_desc s2mps14_regulators[] = {
 	regulator_desc_s2mps14_ldo(23, MIN_800_MV, STEP_25_MV),
 	regulator_desc_s2mps14_ldo(24, MIN_1800_MV, STEP_25_MV),
 	regulator_desc_s2mps14_ldo(25, MIN_1800_MV, STEP_25_MV),
-	regulator_desc_s2mps14_buck(1, MIN_600_MV, STEP_6_25_MV),
-	regulator_desc_s2mps14_buck(2, MIN_600_MV, STEP_6_25_MV),
-	regulator_desc_s2mps14_buck(3, MIN_600_MV, STEP_6_25_MV),
-	regulator_desc_s2mps14_buck(4, MIN_1400_MV, STEP_12_5_MV),
-	regulator_desc_s2mps14_buck(5, MIN_600_MV, STEP_6_25_MV),
+	regulator_desc_s2mps14_buck(1, MIN_600_MV, STEP_6_25_MV,
+			S2MPS14_BUCK1235_START_SEL),
+	regulator_desc_s2mps14_buck(2, MIN_600_MV, STEP_6_25_MV,
+			S2MPS14_BUCK1235_START_SEL),
+	regulator_desc_s2mps14_buck(3, MIN_600_MV, STEP_6_25_MV,
+			S2MPS14_BUCK1235_START_SEL),
+	regulator_desc_s2mps14_buck(4, MIN_1400_MV, STEP_12_5_MV,
+			S2MPS14_BUCK4_START_SEL),
+	regulator_desc_s2mps14_buck(5, MIN_600_MV, STEP_6_25_MV,
+			S2MPS14_BUCK1235_START_SEL),
 };
 
 static int s2mps14_pmic_enable_ext_control(struct s2mps11_info *s2mps11,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]