[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] msf2-soc, stellaris: Don't wire up SYSRESETREQ
From: |
Peter Maydell |
Subject: |
[PATCH] msf2-soc, stellaris: Don't wire up SYSRESETREQ |
Date: |
Mon, 12 Oct 2020 16:33:47 +0100 |
The MSF2 SoC model and the Stellaris board code both wire
SYSRESETREQ up to a function that just invokes
qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);
This is now the default action that the NVIC does if the line is
not connected, so we can delete the handling code.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/arm/msf2-soc.c | 11 -----------
hw/arm/stellaris.c | 12 ------------
2 files changed, 23 deletions(-)
diff --git a/hw/arm/msf2-soc.c b/hw/arm/msf2-soc.c
index 33ea7df342c..d2c29e82d13 100644
--- a/hw/arm/msf2-soc.c
+++ b/hw/arm/msf2-soc.c
@@ -30,7 +30,6 @@
#include "hw/irq.h"
#include "hw/arm/msf2-soc.h"
#include "hw/misc/unimp.h"
-#include "sysemu/runstate.h"
#include "sysemu/sysemu.h"
#define MSF2_TIMER_BASE 0x40004000
@@ -59,13 +58,6 @@ static const int spi_irq[MSF2_NUM_SPIS] = { 2, 3 };
static const int uart_irq[MSF2_NUM_UARTS] = { 10, 11 };
static const int timer_irq[MSF2_NUM_TIMERS] = { 14, 15 };
-static void do_sys_reset(void *opaque, int n, int level)
-{
- if (level) {
- qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);
- }
-}
-
static void m2sxxx_soc_initfn(Object *obj)
{
MSF2State *s = MSF2_SOC(obj);
@@ -130,9 +122,6 @@ static void m2sxxx_soc_realize(DeviceState *dev_soc, Error
**errp)
return;
}
- qdev_connect_gpio_out_named(DEVICE(&s->armv7m.nvic), "SYSRESETREQ", 0,
- qemu_allocate_irq(&do_sys_reset, NULL, 0));
-
system_clock_scale = NANOSECONDS_PER_SECOND / s->m3clk;
for (i = 0; i < MSF2_NUM_UARTS; i++) {
diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c
index 28eb15c76ca..5f9d0801807 100644
--- a/hw/arm/stellaris.c
+++ b/hw/arm/stellaris.c
@@ -18,7 +18,6 @@
#include "hw/boards.h"
#include "qemu/log.h"
#include "exec/address-spaces.h"
-#include "sysemu/runstate.h"
#include "sysemu/sysemu.h"
#include "hw/arm/armv7m.h"
#include "hw/char/pl011.h"
@@ -1206,14 +1205,6 @@ static void stellaris_adc_init(Object *obj)
qdev_init_gpio_in(dev, stellaris_adc_trigger, 1);
}
-static
-void do_sys_reset(void *opaque, int n, int level)
-{
- if (level) {
- qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);
- }
-}
-
/* Board init. */
static stellaris_board_info stellaris_boards[] = {
{ "LM3S811EVB",
@@ -1317,9 +1308,6 @@ static void stellaris_init(MachineState *ms,
stellaris_board_info *board)
/* This will exit with an error if the user passed us a bad cpu_type */
sysbus_realize_and_unref(SYS_BUS_DEVICE(nvic), &error_fatal);
- qdev_connect_gpio_out_named(nvic, "SYSRESETREQ", 0,
- qemu_allocate_irq(&do_sys_reset, NULL, 0));
-
if (board->dc1 & (1 << 16)) {
dev = sysbus_create_varargs(TYPE_STELLARIS_ADC, 0x40038000,
qdev_get_gpio_in(nvic, 14),
--
2.20.1
- [PATCH for-5.1] hw/arm/netduino2, netduinoplus2: Set system_clock_scale, (continued)
- [PATCH for-5.1] hw/arm/netduino2, netduinoplus2: Set system_clock_scale, Peter Maydell, 2020/10/12
- [PATCH] hw/input/virtio-input-hid.c: Don't undef CONFIG_CURSES, Peter Maydell, 2020/10/12
- [PATCH] hw/display/bcm2835_fb.c: Initialize all fields of struct, Peter Maydell, 2020/10/12
- [PATCH] hw/timer/armv7m_systick: assert that board code set system_clock_scale, Peter Maydell, 2020/10/12
- [PATCH] hw/virtio/virtio-iommu-pci.c: Fix typo in error message, Peter Maydell, 2020/10/12
- [PATCH] hw/intc/arm_gicv3_cpuif: Don't copy CPU's maintenance interrupt, Peter Maydell, 2020/10/12
- [PATCH for-5.1] hw/timer/imx_epit: Avoid assertion when CR.SWR is written, Peter Maydell, 2020/10/12
- [PATCH] hw/intc/arm_gicv3_cpuif: Make GIC maintenance interrupts work, Peter Maydell, 2020/10/12
- [RFC PATCH v2] linux-user: Use FD_32BIT_MODE fd flag for 32-bit guests, Peter Maydell, 2020/10/12
- [PATCH] linux-user/arm/signal.c: Drop TARGET_CONFIG_CPU_32, Peter Maydell, 2020/10/12
- [PATCH] msf2-soc, stellaris: Don't wire up SYSRESETREQ,
Peter Maydell <=
- [PATCH] meson.build: Don't look for libudev for static builds, Peter Maydell, 2020/10/12
- [PATCH] target/arm: Delete unused ARM_FEATURE_CRC, Peter Maydell, 2020/10/12
- [PATCH] net/tap-solaris.c: Include qemu-common.h for TFR macro, Peter Maydell, 2020/10/12
- [PATCH] target/arm: Delete unused VFP_DREG macros, Peter Maydell, 2020/10/12
- [PATCH] osdep.h: Add doc comment for qemu_get_thread_id(), Peter Maydell, 2020/10/12
- [PATCH v2] target/arm: Allow user-mode code to write CPSR.E via MSR, Peter Maydell, 2020/10/12
- [PATCH for-5.1] qapi/machine.json: Fix missing newline in doc comment, Peter Maydell, 2020/10/12
- [PATCH 00/10] target/arm: Various v8.1M minor features, Peter Maydell, 2020/10/12