[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v1 2/5] petalogix_s2adsp1800: moved rst logic to rst
From: |
Peter A. G. Crosthwaite |
Subject: |
[Qemu-devel] [PATCH v1 2/5] petalogix_s2adsp1800: moved rst logic to rst fn |
Date: |
Sun, 4 Mar 2012 21:03:52 +1000 |
From: "Peter A. G. Crosthwaite" <address@hidden>
This belongs in the machine specific reset function
Signed-off-by: Peter A. G. Crosthwaite <address@hidden>
---
hw/petalogix_s3adsp1800_mmu.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/hw/petalogix_s3adsp1800_mmu.c b/hw/petalogix_s3adsp1800_mmu.c
index 7c6e9b8..99c3590 100644
--- a/hw/petalogix_s3adsp1800_mmu.c
+++ b/hw/petalogix_s3adsp1800_mmu.c
@@ -42,6 +42,12 @@
#define BINARY_DEVICE_TREE_FILE "petalogix-s3adsp1800.dtb"
+static void machine_cpu_reset(CPUState *env)
+{
+ /* FIXME: move to machine specfic cpu reset */
+ env->pvr.regs[10] = 0x0c000000; /* spartan 3a dsp family. */
+}
+
static void
petalogix_s3adsp1800_init(ram_addr_t ram_size,
const char *boot_device,
@@ -53,6 +59,7 @@ petalogix_s3adsp1800_init(ram_addr_t ram_size,
CPUState *env;
DriveInfo *dinfo;
int i;
+ /* FIXME: remove harcoded magic numbers */
target_phys_addr_t ddr_base = 0x90000000;
MemoryRegion *phys_lmb_bram = g_new(MemoryRegion, 1);
MemoryRegion *phys_ram = g_new(MemoryRegion, 1);
@@ -65,9 +72,6 @@ petalogix_s3adsp1800_init(ram_addr_t ram_size,
}
env = cpu_init(cpu_model);
- /* FIXME: move to machine specfic cpu reset */
- env->pvr.regs[10] = 0x0c000000; /* spartan 3a dsp family. */
-
/* Attach emulated BRAM through the LMB. */
memory_region_init_ram(phys_lmb_bram,
"petalogix_s3adsp1800.lmb_bram", LMB_BRAM_SIZE);
@@ -97,7 +101,7 @@ petalogix_s3adsp1800_init(ram_addr_t ram_size,
xilinx_ethlite_create(&nd_table[0], 0x81000000, irq[1], 0, 0);
microblaze_load_kernel(env, ddr_base, ram_size,
- BINARY_DEVICE_TREE_FILE, NULL);
+ BINARY_DEVICE_TREE_FILE, machine_cpu_reset);
}
static QEMUMachine petalogix_s3adsp1800_machine = {
--
1.7.5.4
- [Qemu-devel] [PATCH v1 0/5] Microblaze machine models and bootloader refactoring, Peter A. G. Crosthwaite, 2012/03/04
- [Qemu-devel] [PATCH v1 1/5] microblaze: factored out common boot code, Peter A. G. Crosthwaite, 2012/03/04
- [Qemu-devel] [PATCH v1 2/5] petalogix_s2adsp1800: moved rst logic to rst fn,
Peter A. G. Crosthwaite <=
- [Qemu-devel] [PATCH v1 3/5] petalogix_s2adsp1800: macro'd magic numbers, Peter A. G. Crosthwaite, 2012/03/04
- [Qemu-devel] [PATCH v1 4/5] qemu-options.hx: allow -dtb argument for all archs, Peter A. G. Crosthwaite, 2012/03/04
- [Qemu-devel] [PATCH v1 5/5] microblaze_boot: enabled -dtb argument, Peter A. G. Crosthwaite, 2012/03/04
- Re: [Qemu-devel] [PATCH v1 0/5] Microblaze machine models and bootloader refactoring, Edgar E. Iglesias, 2012/03/05