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>
This commit is contained in:
committed by
Prabhakar Kushwaha
parent
1e60ccd943
commit
cf0bbbd1ee
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user