summaryrefslogtreecommitdiff
path: root/drivers/net/fsl-mc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/fsl-mc')
-rw-r--r--drivers/net/fsl-mc/mc.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index bdb6792c72..12dbcd8cc5 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -800,12 +800,19 @@ int get_dpl_apply_status(void)
return mc_dpl_applied;
}
-/**
+/*
* Return the MC address of private DRAM block.
+ * As per MC design document, MC initial base address
+ * should be least significant 512MB address of MC private
+ * memory, i.e. address should point to end address masked
+ * with 512MB offset in private DRAM block.
*/
u64 mc_get_dram_addr(void)
{
- return gd->arch.resv_ram;
+ size_t mc_ram_size = mc_get_dram_block_size();
+
+ return (gd->arch.resv_ram + mc_ram_size - 1) &
+ MC_RAM_BASE_ADDR_ALIGNMENT_MASK;
}
/**