diff options
author | Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com> | 2019-05-23 12:43:43 +0300 |
---|---|---|
committer | Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com> | 2019-08-22 06:37:35 +0300 |
commit | cf0bbbd1ee7b7c5e40db81c6b61d82e853dd50fb (patch) | |
tree | 22b980b6c204495ecd6a60b278904b5af6ebc8e4 /drivers | |
parent | 1e60ccd94318fb86610e1e28512b2aaac5f4b069 (diff) | |
download | u-boot-cf0bbbd1ee7b7c5e40db81c6b61d82e853dd50fb.tar.xz |
drivers: net: mc: Report extra memory to Linux
MC firmware need to be aligned to 512M, so minimum 512MB DDR is reserved.
But MC support to work with 128MB or 256MB DDR memory also, in this
case, rest of the memory is not usable.
So reporting this extra memory to Linux through dtb memory fixup.
Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/fsl-mc/mc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c index 1d96e4bdc2..c980ba4edb 100644 --- a/drivers/net/fsl-mc/mc.c +++ b/drivers/net/fsl-mc/mc.c @@ -282,6 +282,16 @@ static int mc_fixup_dpl_mac_addr(void *blob, int dpmac_id, MC_FIXUP_DPL); } +void fdt_fixup_mc_ddr(u64 *base, u64 *size) +{ + u64 mc_size = mc_get_dram_block_size(); + + if (mc_size < MC_DRAM_BLOCK_DEFAULT_SIZE) { + *base = mc_get_dram_addr() + mc_size; + *size = MC_DRAM_BLOCK_DEFAULT_SIZE - mc_size; + } +} + void fdt_fsl_mc_fixup_iommu_map_entry(void *blob) { u32 *prop; |