[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 18/21] hw/arm/fsl-imx8mp: Add on-chip RAM
From: |
Bernhard Beschow |
Subject: |
[PATCH 18/21] hw/arm/fsl-imx8mp: Add on-chip RAM |
Date: |
Mon, 20 Jan 2025 21:37:45 +0100 |
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
include/hw/arm/fsl-imx8mp.h | 1 +
hw/arm/fsl-imx8mp.c | 11 +++++++++++
2 files changed, 12 insertions(+)
diff --git a/include/hw/arm/fsl-imx8mp.h b/include/hw/arm/fsl-imx8mp.h
index 326c4ddf69..e0442665fc 100644
--- a/include/hw/arm/fsl-imx8mp.h
+++ b/include/hw/arm/fsl-imx8mp.h
@@ -68,6 +68,7 @@ struct FslImx8mpState {
FslImx8mPciePhyState pcie_phy;
OrIRQState gpt5_gpt6_irq;
MemoryRegion boot_rom;
+ MemoryRegion ocram;
uint32_t phy_num;
bool phy_connected;
diff --git a/hw/arm/fsl-imx8mp.c b/hw/arm/fsl-imx8mp.c
index 9688e2e962..cb4b0ae5bb 100644
--- a/hw/arm/fsl-imx8mp.c
+++ b/hw/arm/fsl-imx8mp.c
@@ -665,6 +665,16 @@ static void fsl_imx8mp_realize(DeviceState *dev, Error
**errp)
fsl_imx8mp_memmap[FSL_IMX8MP_BOOT_ROM].addr,
&s->boot_rom);
+ /* On-Chip RAM */
+ if (!memory_region_init_ram(&s->ocram, NULL, "imx8mp.ocram",
+ fsl_imx8mp_memmap[FSL_IMX8MP_OCRAM].size,
+ errp)) {
+ return;
+ }
+ memory_region_add_subregion(get_system_memory(),
+ fsl_imx8mp_memmap[FSL_IMX8MP_OCRAM].addr,
+ &s->ocram);
+
/* Unimplemented devices */
for (i = 0; i < ARRAY_SIZE(fsl_imx8mp_memmap); i++) {
switch (i) {
@@ -677,6 +687,7 @@ static void fsl_imx8mp_realize(DeviceState *dev, Error
**errp)
case FSL_IMX8MP_ECSPI1 ... FSL_IMX8MP_ECSPI3:
case FSL_IMX8MP_ENET1:
case FSL_IMX8MP_I2C1 ... FSL_IMX8MP_I2C6:
+ case FSL_IMX8MP_OCRAM:
case FSL_IMX8MP_PCIE1:
case FSL_IMX8MP_PCIE_PHY1:
case FSL_IMX8MP_RAM:
--
2.48.1
- [PATCH 15/21] hw/arm/fsl-imx8mp: Add Ethernet controller, (continued)
- [PATCH 15/21] hw/arm/fsl-imx8mp: Add Ethernet controller, Bernhard Beschow, 2025/01/20
- [PATCH 13/21] hw/arm/fsl-imx8mp: Add watchdog support, Bernhard Beschow, 2025/01/20
- [PATCH 11/21] hw/arm/fsl-imx8mp: Add I2C controllers, Bernhard Beschow, 2025/01/20
- [PATCH 16/21] hw/arm/fsl-imx8mp: Add USB support, Bernhard Beschow, 2025/01/20
- [PATCH 17/21] hw/arm/fsl-imx8mp: Add boot ROM, Bernhard Beschow, 2025/01/20
- [PATCH 10/21] hw/arm/fsl-imx8mp: Add GPIO controllers, Bernhard Beschow, 2025/01/20
- [PATCH 14/21] hw/arm/fsl-imx8mp: Implement gneral purpose timers, Bernhard Beschow, 2025/01/20
- [PATCH 12/21] hw/arm/fsl-imx8mp: Add SPI controllers, Bernhard Beschow, 2025/01/20
- [PATCH 18/21] hw/arm/fsl-imx8mp: Add on-chip RAM,
Bernhard Beschow <=
- [PATCH 19/21] hw/rtc: Add Ricoh RS5C372 RTC emulation, Bernhard Beschow, 2025/01/20
- [PATCH 21/21] hw/gpio/imx_gpio: Don't clear input GPIO values upon reset, Bernhard Beschow, 2025/01/20
- [PATCH 20/21] hw/i2c: Import TCA6416 emulation from Xilinx, Bernhard Beschow, 2025/01/20