sdm845: Add DRAM resources

TEST=build

Change-Id: Icf934caf8b4584ef2633054a5cc7f5be7cc734ee
Signed-off-by: T Michael Turney <mturney@codeaurora.org>
Reviewed-on: https://review.coreboot.org/25212
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
T Michael Turney 2018-04-24 10:36:12 -07:00 committed by Patrick Georgi
parent 621e4d8b48
commit 5b66288d51
4 changed files with 17 additions and 4 deletions

View File

@ -46,7 +46,9 @@ SECTIONS
REGION(pmic, 0x14976000, 0xA000, 4096)
BSRAM_END(0x14980000)
DRAM_START(0x90000000)
POSTRAM_CBFS_CACHE(0x90000000, 384K)
RAMSTAGE(0x90800000, 128K)
DRAM_START(0x80000000)
/* Various hardware/software subsystems make use of this area */
REGION(dram_reserved, 0x85000000, 0x1A800000, 4096)
POSTRAM_CBFS_CACHE(0x9F800000, 384K)
RAMSTAGE(0x9F860000, 128K)
}

View File

@ -16,6 +16,8 @@
#ifndef _SOC_QUALCOMM_SDM845_MMU_H__
#define _SOC_QUALCOMM_SDM845_MMU_H__
#define DRAMSIZE4GB 0x100000000
void sdm845_mmu_init(void);
#endif // _SOC_QUALCOMM_SDM845_MMU_H_

View File

@ -26,4 +26,8 @@ extern u8 _bsram[];
extern u8 _ebsram[];
#define _bsram_size (_ebsram - _bsram)
extern u8 _dram_reserved[];
extern u8 _edram_reserved[];
#define _dram_reserved_size (_edram_reserved - _dram_reserved)
#endif // _SOC_QUALCOMM_SDM845_SYMBOLS_H_

View File

@ -13,12 +13,17 @@
* GNU General Public License for more details.
*/
#include <symbols.h>
#include <device/device.h>
#include <timestamp.h>
#include <soc/mmu.h>
#include <soc/symbols.h>
static void soc_read_resources(device_t dev)
{
ram_resource(dev, 0, (uintptr_t)_dram / KiB, DRAMSIZE4GB / KiB);
reserved_ram_resource(dev, 1, (uintptr_t)_dram_reserved / KiB,
_dram_reserved_size / KiB);
}
static void soc_init(device_t dev)