diff options
| author | Richard Henderson <richard.henderson@linaro.org> | 2022-06-11 08:18:55 -0700 |
|---|---|---|
| committer | Richard Henderson <richard.henderson@linaro.org> | 2022-06-11 08:18:55 -0700 |
| commit | 8b7f856e9dca75255af5037b68df385928616dab (patch) | |
| tree | 533c6b2a6502535e2e5108d309d94b7d373b4125 /hw/rtc | |
| parent | 30796f556790631c86c733ab06756981be0e1def (diff) | |
| parent | 37da3bcf01ccd19336fd8f43bedcd0841d71bb6a (diff) | |
| download | focaccia-qemu-8b7f856e9dca75255af5037b68df385928616dab.tar.gz focaccia-qemu-8b7f856e9dca75255af5037b68df385928616dab.zip | |
Merge tag 'mips-20220611' of https://github.com/philmd/qemu into staging
MIPS patches queue - Various TCG fixes (Marcin Nowakowski, Ni Hui, Stefan Pejic, Stefan Pejic) - Sysbus floppy controller fix (Peter Maydell) - QOM'ification of PIIX southbridge (Mark Cave-Ayland, Bernhard Beschow) - Various fixes on ISA devices commonly used by x86/mips machines (Bernhard) - Few cleanups in accel/tcg & documentation (Bernhard) # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmKkbtEACgkQ4+MsLN6t # wN7uPg/+K4TawuNb5CFPa67gdP+7QqOQJF7ADJm4jDgJN0qRg8uDDE1/cSvtD1xn # ttWfy/AHCtuCwLWTJ5T3QCIXJBrEmfqu/RkGoljnIDWZBKcnrzsTmBOBylDbO8zC # ZuNiOr0CUzSoCJsQ297U8tYW+2hDMSLvJrwbT97vqoSETsoTbBX/fFqQ7zdOqU5d # e0CDiJNIinjObtylCKWe0JP1pRyWRexWX4jEPeEYR2eCE49EoZi47JJmGFtQJB5j # wtVO48bN1Wn97mqeML6JEGXfgNa672bgh82Gulfyrx+g9fBM1Al8nEy/mmbUkgd6 # Imrt0jxp2Cqtl6ENC6CB8mT5ZjMKPsG5rzvNvaQAoM1jhZbZQXx3l1V/pSU5cnf5 # miVbkjepl9NVvFZ4bJ4oHOCA9l7BaZoUmRa5W0XOZW9y8Ph2H4kUZDI+g4Rif136 # Wgf5EqbFi/tJlC11S3vLwDZJmw2a3LM1esldJom3/EgA0e8t5o2xY/9lGee8WDAe # dn+t8etpK4WMQ/694WAR051BHiH2XP2DvsX6Ioi82aYOqL6NgGJYAI+/CP8Mhteg # Rmqg+p+7jRGqtH1QH3i/77TYJB/J0QqXp8lBHwfdCAyCzt3BkA/e5nXF5Ez0Am3m # i160SjSRejVaLc5bxTXiKLvZHUekea0PNtajWFjv42BxwlbgmEY= # =KtFC # -----END PGP SIGNATURE----- # gpg: Signature made Sat 11 Jun 2022 03:30:41 AM PDT # gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full] * tag 'mips-20220611' of https://github.com/philmd/qemu: (49 commits) docs/devel: Fix link to developer mailing lists accel/tcg: Inline dump_opcount_info() and remove it accel/tcg/cpu-exec: Unexport dump_drift_info() hw/net/fsl_etsec/etsec: Remove obsolete and unused etsec_create() hw/i386/pc: Remove orphan declarations hw/i386/pc: Unexport functions used only internally hw/i386/pc: Unexport PC_CPU_MODEL_IDS macro hw/audio/cs4231a: Const'ify global tables hw: Reuse TYPE_I8042 define hw/rtc/mc146818rtc: QOM'ify io_base offset hw/i386/microvm-dt: Determine mc146818rtc's IRQ number from QOM property hw/i386/microvm-dt: Force explicit failure if retrieving QOM property fails hw/isa/piix3: Inline and remove piix3_create() hw/isa/piix3: Factor out ISABus retrieval from piix3_create() hw/isa/piix3: QOM'ify PCI device creation and wiring hw/isa/piix3: Move pci_map_irq_fn near pci_set_irq_fn hw/isa/piix4: Inline and remove piix4_create() hw/isa/piix4: QOM'ify PIIX4 PM creation hw/isa/piix4: Factor out ISABus retrieval from piix4_create() hw/isa/piix4: QOM'ify PCI device creation and wiring ... Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'hw/rtc')
| -rw-r--r-- | hw/rtc/mc146818rtc.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/rtc/mc146818rtc.c b/hw/rtc/mc146818rtc.c index ef9765bb8f..1ebb412479 100644 --- a/hw/rtc/mc146818rtc.c +++ b/hw/rtc/mc146818rtc.c @@ -74,6 +74,8 @@ #define RTC_CLOCK_RATE 32768 #define UIP_HOLD_LENGTH (8 * NANOSECONDS_PER_SECOND / 32768) +#define RTC_ISA_BASE 0x70 + static void rtc_set_time(RTCState *s); static void rtc_update_time(RTCState *s); static void rtc_set_cmos(RTCState *s, const struct tm *tm); @@ -941,7 +943,7 @@ static void rtc_realizefn(DeviceState *dev, Error **errp) qemu_register_suspend_notifier(&s->suspend_notifier); memory_region_init_io(&s->io, OBJECT(s), &cmos_ops, s, "rtc", 2); - isa_register_ioport(isadev, &s->io, RTC_ISA_BASE); + isa_register_ioport(isadev, &s->io, s->io_base); /* register rtc 0x70 port for coalesced_pio */ memory_region_set_flush_coalesced(&s->io); @@ -950,7 +952,7 @@ static void rtc_realizefn(DeviceState *dev, Error **errp) memory_region_add_subregion(&s->io, 0, &s->coalesced_io); memory_region_add_coalescing(&s->coalesced_io, 0, 1); - qdev_set_legacy_instance_id(dev, RTC_ISA_BASE, 3); + qdev_set_legacy_instance_id(dev, s->io_base, 3); object_property_add_tm(OBJECT(s), "date", rtc_get_date); @@ -983,6 +985,7 @@ ISADevice *mc146818_rtc_init(ISABus *bus, int base_year, qemu_irq intercept_irq) static Property mc146818rtc_properties[] = { DEFINE_PROP_INT32("base_year", RTCState, base_year, 1980), + DEFINE_PROP_UINT16("iobase", RTCState, io_base, RTC_ISA_BASE), DEFINE_PROP_UINT8("irq", RTCState, isairq, RTC_ISA_IRQ), DEFINE_PROP_LOSTTICKPOLICY("lost_tick_policy", RTCState, lost_tick_policy, LOST_TICK_POLICY_DISCARD), @@ -1028,7 +1031,7 @@ static void rtc_build_aml(AcpiDevAmlIf *adev, Aml *scope) * does, even though qemu only responds to the first two ports. */ crs = aml_resource_template(); - aml_append(crs, aml_io(AML_DECODE16, RTC_ISA_BASE, RTC_ISA_BASE, + aml_append(crs, aml_io(AML_DECODE16, s->io_base, s->io_base, 0x01, 0x08)); aml_append(crs, aml_irq_no_flags(s->isairq)); |