soc/qualcomm: Move common region macros to soc/memlayout.h
The `SSRAM_START/END`, `BSRAM_START/END`, and `AOPSRAM_START/END` macros were redefined across multiple Qualcomm SoC `memlayout.ld` files. To reduce code duplication and improve maintainability, this commit moves these common macros into the shared `<soc/memlayout.h>` header part of the Qualcomm common code. The SoC-specific linker scripts are updated to remove the local definitions. TEST=Built for all affected SoCs (qcs405, sc7180, sc7280, x1p42100) Change-Id: I8638b8e03e1e51f57b7e91a072f3d9cdb4ec6200 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/88782 Reviewed-by: Kapil Porwal <kapilporwal@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
d220b65b8f
commit
6925fd69f8
5 changed files with 21 additions and 46 deletions
17
src/soc/qualcomm/common/include/soc/memlayout.h
Normal file
17
src/soc/qualcomm/common/include/soc/memlayout.h
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
/* This file contains macro definitions for Qualcomm SoC memlayout.ld linker scripts. */
|
||||
|
||||
#ifndef _SOC_QUALCOMM_MEMLAYOUT_H_
|
||||
#define _SOC_QUALCOMM_MEMLAYOUT_H_
|
||||
|
||||
#define SSRAM_START(addr) REGION_START(ssram, addr)
|
||||
#define SSRAM_END(addr) REGION_END(ssram, addr)
|
||||
|
||||
#define BSRAM_START(addr) REGION_START(bsram, addr)
|
||||
#define BSRAM_END(addr) REGION_END(bsram, addr)
|
||||
|
||||
#define AOPSRAM_START(addr) REGION_START(aopsram, addr)
|
||||
#define AOPSRAM_END(addr) REGION_END(aopsram, addr)
|
||||
|
||||
#endif /* _SOC_QUALCOMM_MEMLAYOUT_H_ */
|
||||
|
|
@ -2,14 +2,7 @@
|
|||
|
||||
#include <memlayout.h>
|
||||
#include <arch/header.ld>
|
||||
|
||||
/* SYSTEM_IMEM : 0x8600000 - 0x8607FFF */
|
||||
#define SSRAM_START(addr) REGION_START(ssram, addr)
|
||||
#define SSRAM_END(addr) REGION_END(ssram, addr)
|
||||
|
||||
/* BOOT_IMEM : 0x8C00000 - 0x8D80000 */
|
||||
#define BSRAM_START(addr) REGION_START(bsram, addr)
|
||||
#define BSRAM_END(addr) REGION_END(bsram, addr)
|
||||
#include <soc/memlayout.h>
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,18 +2,7 @@
|
|||
|
||||
#include <memlayout.h>
|
||||
#include <arch/header.ld>
|
||||
|
||||
/* SYSTEM_IMEM : 0x14680000 - 0x146AE000 */
|
||||
#define SSRAM_START(addr) REGION_START(ssram, addr)
|
||||
#define SSRAM_END(addr) REGION_END(ssram, addr)
|
||||
|
||||
/* BOOT_IMEM : 0x14800000 - 0x14980000 */
|
||||
#define BSRAM_START(addr) REGION_START(bsram, addr)
|
||||
#define BSRAM_END(addr) REGION_END(bsram, addr)
|
||||
|
||||
/* AOP : 0x0B000000 - 0x0B100000 */
|
||||
#define AOPSRAM_START(addr) REGION_START(aopsram, addr)
|
||||
#define AOPSRAM_END(addr) REGION_END(aopsram, addr)
|
||||
#include <soc/memlayout.h>
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,18 +2,7 @@
|
|||
|
||||
#include <memlayout.h>
|
||||
#include <arch/header.ld>
|
||||
|
||||
/* SYSTEM_IMEM : 0x14680000 - 0x146AB000 */
|
||||
#define SSRAM_START(addr) REGION_START(ssram, addr)
|
||||
#define SSRAM_END(addr) REGION_END(ssram, addr)
|
||||
|
||||
/* BOOT_IMEM : 0x14800000 - 0x14980000 */
|
||||
#define BSRAM_START(addr) REGION_START(bsram, addr)
|
||||
#define BSRAM_END(addr) REGION_END(bsram, addr)
|
||||
|
||||
/* AOP : 0x0B000000 - 0x0B100000 */
|
||||
#define AOPSRAM_START(addr) REGION_START(aopsram, addr)
|
||||
#define AOPSRAM_END(addr) REGION_END(aopsram, addr)
|
||||
#include <soc/memlayout.h>
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,20 +2,7 @@
|
|||
|
||||
#include <memlayout.h>
|
||||
#include <arch/header.ld>
|
||||
|
||||
/* Copied from Qualcomm previous generation SoC SC7280 and need cleanup */
|
||||
|
||||
/* SYSTEM_IMEM : 0x14680000 - 0x146AB000 */
|
||||
#define SSRAM_START(addr) REGION_START(ssram, addr)
|
||||
#define SSRAM_END(addr) REGION_END(ssram, addr)
|
||||
|
||||
/* BOOT_IMEM : 0x14800000 - 0x14980000 */
|
||||
#define BSRAM_START(addr) REGION_START(bsram, addr)
|
||||
#define BSRAM_END(addr) REGION_END(bsram, addr)
|
||||
|
||||
/* AOP : 0x0B000000 - 0x0B100000 */
|
||||
#define AOPSRAM_START(addr) REGION_START(aopsram, addr)
|
||||
#define AOPSRAM_END(addr) REGION_END(aopsram, addr)
|
||||
#include <soc/memlayout.h>
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue