[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 35/42] hw/arm/mps2: Map the FPGA I/O block
From: |
Peter Maydell |
Subject: |
[PULL 35/42] hw/arm/mps2: Map the FPGA I/O block |
Date: |
Tue, 23 Jun 2020 12:38:57 +0100 |
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20200617072539.32686-11-f4bug@amsat.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/arm/mps2.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/hw/arm/mps2.c b/hw/arm/mps2.c
index c66c595d4a0..e1061232254 100644
--- a/hw/arm/mps2.c
+++ b/hw/arm/mps2.c
@@ -38,8 +38,10 @@
#include "hw/timer/cmsdk-apb-timer.h"
#include "hw/timer/cmsdk-apb-dualtimer.h"
#include "hw/misc/mps2-scc.h"
+#include "hw/misc/mps2-fpgaio.h"
#include "hw/net/lan9118.h"
#include "net/net.h"
+#include "hw/watchdog/cmsdk-apb-watchdog.h"
typedef enum MPS2FPGAType {
FPGA_AN385,
@@ -67,8 +69,10 @@ typedef struct {
MemoryRegion sram;
/* FPGA APB subsystem */
MPS2SCC scc;
+ MPS2FPGAIO fpgaio;
/* CMSDK APB subsystem */
CMSDKAPBDualTimer dualtimer;
+ CMSDKAPBWatchdog watchdog;
} MPS2MachineState;
#define TYPE_MPS2_MACHINE "mps2"
@@ -332,6 +336,11 @@ static void mps2_common_init(MachineState *machine)
qdev_prop_set_uint32(sccdev, "scc-id", mmc->scc_id);
sysbus_realize(SYS_BUS_DEVICE(&mms->scc), &error_fatal);
sysbus_mmio_map(SYS_BUS_DEVICE(sccdev), 0, 0x4002f000);
+ object_initialize_child(OBJECT(mms), "fpgaio",
+ &mms->fpgaio, TYPE_MPS2_FPGAIO);
+ qdev_prop_set_uint32(DEVICE(&mms->fpgaio), "prescale-clk", 25000000);
+ sysbus_realize(SYS_BUS_DEVICE(&mms->fpgaio), &error_fatal);
+ sysbus_mmio_map(SYS_BUS_DEVICE(&mms->fpgaio), 0, 0x40028000);
/* In hardware this is a LAN9220; the LAN9118 is software compatible
* except that it doesn't support the checksum-offload feature.
--
2.20.1
- [PULL 29/42] hw/i2c: Add header for ARM SBCon two-wire serial bus interface, (continued)
- [PULL 29/42] hw/i2c: Add header for ARM SBCon two-wire serial bus interface, Peter Maydell, 2020/06/23
- [PULL 31/42] hw/arm/mps2: Document CMSDK/FPGA APB subsystem sections, Peter Maydell, 2020/06/23
- [PULL 34/42] hw/arm/mps2: Add CMSDK AHB GPIO peripherals as unimplemented devices, Peter Maydell, 2020/06/23
- [PULL 36/42] hw/arm/mps2: Add SPI devices, Peter Maydell, 2020/06/23
- [PULL 37/42] hw/arm/mps2: Add I2C devices, Peter Maydell, 2020/06/23
- [PULL 32/42] hw/arm/mps2: Rename CMSDK AHB peripheral region, Peter Maydell, 2020/06/23
- [PULL 38/42] hw/arm/mps2: Add audio I2S interface as unimplemented device, Peter Maydell, 2020/06/23
- [PULL 39/42] hw/arm/mps2-tz: Use the ARM SBCon two-wire serial bus interface, Peter Maydell, 2020/06/23
- [PULL 41/42] tests/qtest/arm-cpu-features: Add feature setting tests, Peter Maydell, 2020/06/23
- [PULL 40/42] target/arm: Check supported KVM features globally (not per vCPU), Peter Maydell, 2020/06/23
- [PULL 35/42] hw/arm/mps2: Map the FPGA I/O block,
Peter Maydell <=
- [PULL 42/42] arm/virt: Add memory hot remove support, Peter Maydell, 2020/06/23
- [PULL 33/42] hw/arm/mps2: Add CMSDK APB watchdog device, Peter Maydell, 2020/06/23
- Re: [PULL 00/42] target-arm queue, no-reply, 2020/06/23
- Re: [PULL 00/42] target-arm queue, Peter Maydell, 2020/06/24