Commit aa9ceea2 authored by Rafael David Tinoco's avatar Rafael David Tinoco Committed by Greg Kroah-Hartman

mfd: hi655x: Fix regmap area declared size for hi655x

commit 6afebb70 upstream.


LTP Functional tests have caused a bad paging request when triggering
the regmap_read_debugfs() logic of the device PMIC Hi6553 (reading
regmap/f8000000.pmic/registers file during read_all test):

Unable to handle kernel paging request at virtual address ffff0
[ffff00000984e000] pgd=0000000077ffe803, pud=0000000077ffd803,0
Internal error: Oops: 96000007 [#1] SMP
Hardware name: HiKey Development Board (DT)
Call trace:
Code: aa1e03e0 d503201f f9400280 8b334000 (39400000)

Investigations have showed that, when triggered by debugfs read()
handler, the mmio regmap logic was reading a bigger (16k) register area
than the one mapped by devm_ioremap_resource() during hi655x-pmic probe
time (4k).

This commit changes hi655x's max register, according to HW specs, to be
the same as the one declared in the pmic device in hi6220's dts, fixing
the issue.

Cc: <> #v4.9 #v4.14 #v4.16 #v4.17
Signed-off-by: default avatarRafael David Tinoco <>
Signed-off-by: default avatarLee Jones <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent 4f6789ca
......@@ -49,7 +49,7 @@ static struct regmap_config hi655x_regmap_config = {
.reg_bits = 32,
.reg_stride = HI655X_STRIDE,
.val_bits = 8,
.max_register = HI655X_BUS_ADDR(0xFFF),
.max_register = HI655X_BUS_ADDR(0x400) - HI655X_STRIDE,
static struct resource pwrkey_resources[] = {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment