Skip to content

Commit

Permalink
bus: mvebu-mbus: fix support of MBus window 13
Browse files Browse the repository at this point in the history
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: fddddb5 ("bus: introduce an Marvell EBU MBus driver")
Cc: <[email protected]> # v3.10+
Reviewed-by: Thomas Petazzoni <[email protected]>
Signed-off-by: Andrew Lunn <[email protected]>
  • Loading branch information
lunn committed Jan 19, 2015
1 parent 8f1e8ee commit 38bdf45
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions drivers/bus/mvebu-mbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,25 @@ static void mvebu_mbus_disable_window(struct mvebu_mbus_state *mbus,
}

/* Checks whether the given window number is available */

/* 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. The
* quick fix for stable is to not use window 13. A follow up patch
* will correctly handle this window.
*/
static int mvebu_mbus_window_is_free(struct mvebu_mbus_state *mbus,
const int win)
{
void __iomem *addr = mbus->mbuswins_base +
mbus->soc->win_cfg_offset(win);
u32 ctrl = readl(addr + WIN_CTRL_OFF);

if (win == 13)
return false;

return !(ctrl & WIN_CTRL_ENABLE);
}

Expand Down

0 comments on commit 38bdf45

Please sign in to comment.