qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH target-arm v5 1/5] arm: zynq: Macroify OCM Base and


From: Peter Crosthwaite
Subject: [Qemu-devel] [PATCH target-arm v5 1/5] arm: zynq: Macroify OCM Base and Size
Date: Wed, 15 Jan 2014 01:13:06 -0800

Convert magic numbers for OCM to Macros.

Signed-off-by: Peter Crosthwaite <address@hidden>
---

 hw/arm/xilinx_zynq.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c
index 98e0958..33a47e0 100644
--- a/hw/arm/xilinx_zynq.c
+++ b/hw/arm/xilinx_zynq.c
@@ -36,7 +36,9 @@
 
 #define IRQ_OFFSET 32 /* pic interrupts start from index 32 */
 
-#define MPCORE_PERIPHBASE 0xF8F00000
+#define MPCORE_PERIPHBASE   0xF8F00000
+#define OCM_BASE            0xfffc0000
+#define OCM_SIZE            (256 << 10)
 
 static const int dma_irqs[8] = {
     46, 47, 48, 49, 72, 73, 74, 75
@@ -147,9 +149,9 @@ static void zynq_init(QEMUMachineInitArgs *args)
     memory_region_add_subregion(address_space_mem, 0, ext_ram);
 
     /* 256K of on-chip memory */
-    memory_region_init_ram(ocm_ram, NULL, "zynq.ocm_ram", 256 << 10);
+    memory_region_init_ram(ocm_ram, NULL, "zynq.ocm_ram", OCM_SIZE);
     vmstate_register_ram_global(ocm_ram);
-    memory_region_add_subregion(address_space_mem, 0xFFFC0000, ocm_ram);
+    memory_region_add_subregion(address_space_mem, OCM_BASE, ocm_ram);
 
     DriveInfo *dinfo = drive_get(IF_PFLASH, 0, 0);
 
-- 
1.8.5.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]