diff --git a/drivers/bus/mvebu-mbus.c b/drivers/bus/mvebu-mbus.c index b1e407a..b7f7836 100644 --- a/drivers/bus/mvebu-mbus.c +++ b/drivers/bus/mvebu-mbus.c @@ -788,6 +788,21 @@ ranges = xzalloc(lenp); of_property_read_u32_array(np, "ranges", ranges, lenp/4); + /* + * Iterate through each ranges tuple and fixup the custom + * window ranges low base address. Because Armada XP supports + * LPAE, it has 2 cells for the parent address: + * + * + * whereas for Armada 370, there's just one: + * + * + * For instance, the following tuple: + * + * + * would be fixed-up like: + * + */ for (n = 0; n < lenp/4; n += size) { struct mbus_range *r; u32 mbusid = ranges[n]; @@ -797,7 +812,7 @@ list_for_each_entry(r, &mbus_ranges, list) { if (r->mbusid == mbusid) - ranges[n + na] = r->remap; + ranges[n + na + pa - 1] = r->remap; } }