bus: sunxi-rsb: fix primary PMIC and peripheral IC address mapping
cover bus: sunxi-rsb: fix primary PMIC and peripheral IC address mapping
Hi Arnd, Olof,
Here are 2 fixes for the sunxi-rsb driver. There were some typos in the hardware address mapping table, but as long as the assigned address matched what the bootloader used, it still worked fine. The only indication was "failed to set runtime address" error messages which I mistook for some hardware quirk.
I looked deeper when the AC100 on my A80 boards refused to respond.
Patch 1 fixes the hardware address for primary PMICs (AXP223, AXP809...). This is the part that still worked fine despite the error because the runtime address matches the one set by the bootloader.
Patch 2 fixes the assigned runtime address for the peripheral IC (AC100/AC200). This part does not work due to the runtime address being invalid.
Maxime asked me to send them directly to you. Please pick them up for 4.4.
Regards
ChenYu
P.S. my primary email is down this week, but should be fixed by the end of the week.
Chen-Yu Tsai (2):
bus: sunxi-rsb: Fix primary PMIC mapping hardware address
bus: sunxi-rsb: Fix peripheral IC mapping runtime address
drivers/bus/sunxi-rsb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.6.4
PATCH 1/2 bus: sunxi-rsb: Fix primary PMIC mapping hardware address
The primary PMICs use 0x3a3 as their hardware address, not 0x3e3.
--- drivers/bus/sunxi-rsb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/sunxi-rsb.c +1 -1
@@ -527,7 +527,7 @@ static int sunxi_rsb_init_device_mode(struct sunxi_rsb *rsb)*/ static const struct sunxi_rsb_addr_map sunxi_rsb_addr_maps[] = { - {0x3e3 ,0x2d },/* Primary PMIC: AXP223, AXP809, AXP81X, ... */ + {0x3a3 ,0x2d },/* Primary PMIC: AXP223, AXP809, AXP81X, ... */ {0x745 ,0x3a },/* Secondary PMIC: AXP806, ... */ {0xe89 ,0x45 },/* Peripheral IC: AC100, ... */ };
Signature · 1 line
2.6.4
PATCH 2/2 bus: sunxi-rsb: Fix peripheral IC mapping runtime address
In reply to Chen-Yu Tsai0x4e is the runtime address normally associated with perihperal ICs. 0x45 is not a valid runtime address.
--- drivers/bus/sunxi-rsb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/sunxi-rsb.c +1 -1
@@ -529,7 +529,7 @@ static int sunxi_rsb_init_device_mode(struct sunxi_rsb *rsb)static const struct sunxi_rsb_addr_map sunxi_rsb_addr_maps[] = { {0x3a3 ,0x2d },/* Primary PMIC: AXP223, AXP809, AXP81X, ... */ {0x745 ,0x3a },/* Secondary PMIC: AXP806, ... */ - {0xe89 ,0x45 },/* Peripheral IC: AC100, ... */ + {0xe89 ,0x4e },/* Peripheral IC: AC100, ... */ };static u8 sunxi_rsb_get_rtaddr (u16 hwaddr)
Signature · 1 line
2.6.4
Olof Johansson
Appliedcover bus: sunxi-rsb: fix primary PMIC and peripheral IC address mapping
In reply to Chen-Yu TsaiQuoted 14 lines · Chen-Yu Tsai
Hi Arnd, Olof,
Here are 2 fixes for the sunxi-rsb driver. There were some typos in the hardware address mapping table, but as long as the assigned address matched what the bootloader used, it still worked fine. The only indication was "failed to set runtime address" error messages which I mistook for some hardware quirk.
I looked deeper when the AC100 on my A80 boards refused to respond.
Patch 1 fixes the hardware address for primary PMICs (AXP223, AXP809...). This is the part that still worked fine despite the error because the runtime address matches the one set by the bootloader.
Quoted 5 lines
Patch 2 fixes the assigned runtime address for the peripheral IC (AC100/AC200). This part does not work due to the runtime address being invalid.
Maxime asked me to send them directly to you. Please pick them up for 4.4.
Applied, thanks.
In the future, for fixes late in the cycle like this, please describe in a few words in the commit message just what the error is for someone trying to use kernel without the fix, so someone just reading the changelog can determine if it's a high-priority fix or not.
Thanks!
-Olof