soc/qc/common: Remove ddr_base from qc_mmu_dram_config_post_dram_init
This commit refactors the qc_mmu_dram_config_post_dram_init function to remove the ddr_base parameter. The function can now retrieve the base address of the DRAM from the ddr_region global variable, which is already available. TEST=Able to build and boot google/quenbi. Change-Id: I97159dee6a035ed3e38cbfca1e44b8e671d15fc1 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/88765 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Kapil Porwal <kapilporwal@google.com>
This commit is contained in:
parent
73de3f95ac
commit
11c8d423d1
3 changed files with 6 additions and 7 deletions
|
|
@ -13,7 +13,7 @@
|
|||
static struct region * const ddr_region = (struct region *)_ddr_information;
|
||||
|
||||
void soc_mmu_dram_config_post_dram_init(void);
|
||||
void qc_mmu_dram_config_post_dram_init(void *ddr_base, size_t ddr_size);
|
||||
void qc_mmu_dram_config_post_dram_init(size_t ddr_size);
|
||||
bool soc_modem_carve_out(void **start, void **end);
|
||||
|
||||
#endif /* _SOC_QUALCOMM_MMU_COMMON_H_ */
|
||||
|
|
|
|||
|
|
@ -7,16 +7,16 @@
|
|||
|
||||
__weak bool soc_modem_carve_out(void **start, void **end) { return false; }
|
||||
|
||||
void qc_mmu_dram_config_post_dram_init(void *ddr_base, size_t ddr_size)
|
||||
void qc_mmu_dram_config_post_dram_init(size_t ddr_size)
|
||||
{
|
||||
void *start = NULL;
|
||||
void *end = NULL;
|
||||
|
||||
if (!soc_modem_carve_out(&start, &end)) {
|
||||
mmu_config_range((void *)ddr_base, ddr_size, CACHED_RAM);
|
||||
mmu_config_range((void *)_dram, ddr_size, CACHED_RAM);
|
||||
} else {
|
||||
mmu_config_range(ddr_base, start - ddr_base, CACHED_RAM);
|
||||
mmu_config_range(end, ddr_base + ddr_size - end, CACHED_RAM);
|
||||
mmu_config_range((void *)_dram, start - (void *)_dram, CACHED_RAM);
|
||||
mmu_config_range(end, (void *)_dram + ddr_size - end, CACHED_RAM);
|
||||
}
|
||||
|
||||
mmu_config_range((void *)_aop_code_ram, REGION_SIZE(aop_code_ram),
|
||||
|
|
|
|||
|
|
@ -117,8 +117,7 @@ static void write_ddr_information(struct qclib_cb_if_table_entry *te)
|
|||
*ddr_region = region_create(te->blob_address, ddr_size * MiB);
|
||||
|
||||
/* Use DDR info to configure MMU */
|
||||
qc_mmu_dram_config_post_dram_init(
|
||||
(void *)(uintptr_t)region_offset(ddr_region), region_sz(ddr_region));
|
||||
qc_mmu_dram_config_post_dram_init(region_sz(ddr_region));
|
||||
}
|
||||
|
||||
static void write_qclib_log_to_cbmemc(struct qclib_cb_if_table_entry *te)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue