Commit edecb42f3408f1f95bfa7ed96f6a69859ba12f4c
Committed by
Greg Kroah-Hartman
1 parent
e3143069ec
Exists in
smarc-ti-linux-3.14.y
and in
1 other branch
bus: mvebu-mbus: fix support of MBus window 13
commit 38bdf45f4aa5cb6186d50a29e6cbbd9d486a1519 upstream. On Armada XP, 375 and 38x the MBus window 13 has the remap capability, like windows 0 to 7. However, the mvebu-mbus driver isn't currently taking into account this special case, which means that when window 13 is actually used, the remap registers are left to 0, making the device using this MBus window unavailable. As a minimal fix for stable, don't use window 13. A full fix will follow later. Fixes: fddddb52a6c ("bus: introduce an Marvell EBU MBus driver") Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing 1 changed file with 13 additions and 0 deletions Side-by-side Diff
drivers/bus/mvebu-mbus.c
... | ... | @@ -181,12 +181,25 @@ |
181 | 181 | } |
182 | 182 | |
183 | 183 | /* Checks whether the given window number is available */ |
184 | + | |
185 | +/* On Armada XP, 375 and 38x the MBus window 13 has the remap | |
186 | + * capability, like windows 0 to 7. However, the mvebu-mbus driver | |
187 | + * isn't currently taking into account this special case, which means | |
188 | + * that when window 13 is actually used, the remap registers are left | |
189 | + * to 0, making the device using this MBus window unavailable. The | |
190 | + * quick fix for stable is to not use window 13. A follow up patch | |
191 | + * will correctly handle this window. | |
192 | +*/ | |
184 | 193 | static int mvebu_mbus_window_is_free(struct mvebu_mbus_state *mbus, |
185 | 194 | const int win) |
186 | 195 | { |
187 | 196 | void __iomem *addr = mbus->mbuswins_base + |
188 | 197 | mbus->soc->win_cfg_offset(win); |
189 | 198 | u32 ctrl = readl(addr + WIN_CTRL_OFF); |
199 | + | |
200 | + if (win == 13) | |
201 | + return false; | |
202 | + | |
190 | 203 | return !(ctrl & WIN_CTRL_ENABLE); |
191 | 204 | } |
192 | 205 |