diff options
author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2023-10-04 09:37:48 +0100 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2023-10-06 10:33:43 +0200 |
commit | e2fd695e9daf4d31386e26695dcc61fef5363fed (patch) | |
tree | cef26306decacb0168e9c3c85aae1ee14174d80e /hw/m68k | |
parent | d43e967f692ab5389da9a8fa3064ffc6586a3d13 (diff) | |
download | qemu-e2fd695e9daf4d31386e26695dcc61fef5363fed.zip qemu-e2fd695e9daf4d31386e26695dcc61fef5363fed.tar.gz qemu-e2fd695e9daf4d31386e26695dcc61fef5363fed.tar.bz2 |
q800: add djMEMC memory controller
The djMEMC controller is used to store information related to the physical memory
configuration.
Co-developed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20231004083806.757242-3-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'hw/m68k')
-rw-r--r-- | hw/m68k/Kconfig | 1 | ||||
-rw-r--r-- | hw/m68k/q800.c | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/hw/m68k/Kconfig b/hw/m68k/Kconfig index f839f8a..330cfdf 100644 --- a/hw/m68k/Kconfig +++ b/hw/m68k/Kconfig @@ -23,6 +23,7 @@ config Q800 select ESP select DP8393X select OR_IRQ + select DJMEMC config M68K_VIRT bool diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c index b770b71..f9ecc1f 100644 --- a/hw/m68k/q800.c +++ b/hw/m68k/q800.c @@ -40,6 +40,7 @@ #include "hw/m68k/q800.h" #include "hw/m68k/q800-glue.h" #include "hw/misc/mac_via.h" +#include "hw/misc/djmemc.h" #include "hw/input/adb.h" #include "hw/nubus/mac-nubus-bridge.h" #include "hw/display/macfb.h" @@ -66,6 +67,7 @@ #define SONIC_PROM_BASE (IO_BASE + 0x08000) #define SONIC_BASE (IO_BASE + 0x0a000) #define SCC_BASE (IO_BASE + 0x0c020) +#define DJMEMC_BASE (IO_BASE + 0x0e000) #define ESP_BASE (IO_BASE + 0x10000) #define ESP_PDMA (IO_BASE + 0x10100) #define ASC_BASE (IO_BASE + 0x14000) @@ -257,6 +259,14 @@ static void q800_machine_init(MachineState *machine) &error_abort); sysbus_realize(SYS_BUS_DEVICE(&m->glue), &error_fatal); + /* djMEMC memory controller */ + object_initialize_child(OBJECT(machine), "djmemc", &m->djmemc, + TYPE_DJMEMC); + sysbus = SYS_BUS_DEVICE(&m->djmemc); + sysbus_realize_and_unref(sysbus, &error_fatal); + memory_region_add_subregion(&m->macio, DJMEMC_BASE - IO_BASE, + sysbus_mmio_get_region(sysbus, 0)); + /* VIA 1 */ object_initialize_child(OBJECT(machine), "via1", &m->via1, TYPE_MOS6522_Q800_VIA1); |