qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 07/43] hw/input/pckbd: Convert away from old_mmio
Date: Fri, 15 Jun 2018 15:24:45 +0100	[thread overview]
Message-ID: <20180615142521.19143-8-peter.maydell@linaro.org> (raw)
In-Reply-To: <20180615142521.19143-1-peter.maydell@linaro.org>

Convert the pckbd device away from using the old_mmio field
of MemoryRegionOps. This change only affects the memory-mapped
variant of the i8042, which is used by the Unicore32 'puv3'
board and the MIPS Jazz boards 'magnum' and 'pica61'.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180601141223.26630-6-peter.maydell@linaro.org
---
 hw/input/pckbd.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c
index f17f18e51b3..f33e3fc63d6 100644
--- a/hw/input/pckbd.c
+++ b/hw/input/pckbd.c
@@ -434,7 +434,7 @@ static const VMStateDescription vmstate_kbd = {
 };
 
 /* Memory mapped interface */
-static uint32_t kbd_mm_readb (void *opaque, hwaddr addr)
+static uint64_t kbd_mm_readfn(void *opaque, hwaddr addr, unsigned size)
 {
     KBDState *s = opaque;
 
@@ -444,7 +444,8 @@ static uint32_t kbd_mm_readb (void *opaque, hwaddr addr)
         return kbd_read_data(s, 0, 1) & 0xff;
 }
 
-static void kbd_mm_writeb (void *opaque, hwaddr addr, uint32_t value)
+static void kbd_mm_writefn(void *opaque, hwaddr addr,
+                           uint64_t value, unsigned size)
 {
     KBDState *s = opaque;
 
@@ -454,12 +455,13 @@ static void kbd_mm_writeb (void *opaque, hwaddr addr, uint32_t value)
         kbd_write_data(s, 0, value & 0xff, 1);
 }
 
+
 static const MemoryRegionOps i8042_mmio_ops = {
+    .read = kbd_mm_readfn,
+    .write = kbd_mm_writefn,
+    .valid.min_access_size = 1,
+    .valid.max_access_size = 4,
     .endianness = DEVICE_NATIVE_ENDIAN,
-    .old_mmio = {
-        .read = { kbd_mm_readb, kbd_mm_readb, kbd_mm_readb },
-        .write = { kbd_mm_writeb, kbd_mm_writeb, kbd_mm_writeb },
-    },
 };
 
 void i8042_mm_init(qemu_irq kbd_irq, qemu_irq mouse_irq,
-- 
2.17.1

  parent reply	other threads:[~2018-06-15 14:25 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-15 14:24 [Qemu-devel] [PULL 00/43] target-arm queue Peter Maydell
2018-06-15 14:24 ` [Qemu-devel] [PULL 01/43] arm_gicv3_kvm: kvm_dist_get/put_priority: skip the registers banked by GICR_IPRIORITYR Peter Maydell
2018-06-15 14:24 ` [Qemu-devel] [PULL 02/43] hw/arm/mps2-tz: Put ethernet controller behind PPC Peter Maydell
2018-06-15 14:24 ` [Qemu-devel] [PULL 03/43] hw/sh/sh7750: Convert away from old_mmio Peter Maydell
2018-06-15 14:24 ` [Qemu-devel] [PULL 04/43] hw/m68k/mcf5206: " Peter Maydell
2018-06-15 14:24 ` [Qemu-devel] [PULL 05/43] hw/block/pflash_cfi02: " Peter Maydell
2018-06-15 14:24 ` [Qemu-devel] [PULL 06/43] hw/watchdog/wdt_i6300esb: " Peter Maydell
2018-06-15 14:24 ` Peter Maydell [this message]
2018-06-15 14:24 ` [Qemu-devel] [PULL 08/43] hw/char/parallel: " Peter Maydell
2018-06-15 14:24 ` [Qemu-devel] [PULL 09/43] stellaris: Stop using armv7m_init() Peter Maydell
2018-06-15 14:24 ` [Qemu-devel] [PULL 10/43] hw/arm/armv7m: Remove unused armv7m_init() function Peter Maydell
2018-06-15 14:24 ` [Qemu-devel] [PULL 11/43] arm: Don't crash if user tries to use a Cortex-M CPU without an NVIC Peter Maydell
2018-06-15 14:24 ` [Qemu-devel] [PULL 12/43] hw/core/or-irq: Support more than 16 inputs to an OR gate Peter Maydell
2018-06-15 14:24 ` [Qemu-devel] [PULL 13/43] cpu-defs.h: Document CPUIOTLBEntry 'addr' field Peter Maydell
2018-06-15 14:24 ` [Qemu-devel] [PULL 14/43] cputlb: Pass cpu_transaction_failed() the correct physaddr Peter Maydell
2018-06-15 14:24 ` [Qemu-devel] [PULL 15/43] CODING_STYLE: Define our preferred form for multiline comments Peter Maydell
2018-06-15 14:24 ` [Qemu-devel] [PULL 16/43] bswap: Add new stn_*_p() and ldn_*_p() memory access functions Peter Maydell
2018-06-15 14:24 ` [Qemu-devel] [PULL 17/43] exec.c: Don't accidentally sign-extend 4-byte loads in subpage_read() Peter Maydell
2018-06-15 14:24 ` [Qemu-devel] [PULL 18/43] exec.c: Use stn_p() and ldn_p() instead of explicit switches Peter Maydell
2018-06-15 14:24 ` [Qemu-devel] [PULL 19/43] target/arm: Extend vec_reg_offset to larger sizes Peter Maydell
2018-06-15 14:24 ` [Qemu-devel] [PULL 20/43] target/arm: Implement SVE Permute - Unpredicated Group Peter Maydell
2018-06-15 14:24 ` [Qemu-devel] [PULL 21/43] target/arm: Implement SVE Permute - Predicates Group Peter Maydell
2018-06-15 14:25 ` [Qemu-devel] [PULL 22/43] target/arm: Implement SVE Permute - Interleaving Group Peter Maydell
2018-06-15 14:25 ` [Qemu-devel] [PULL 23/43] target/arm: Implement SVE compress active elements Peter Maydell
2018-06-15 14:25 ` [Qemu-devel] [PULL 24/43] target/arm: Implement SVE conditionally broadcast/extract element Peter Maydell
2018-06-15 14:25 ` [Qemu-devel] [PULL 25/43] target/arm: Implement SVE copy to vector (predicated) Peter Maydell
2018-06-15 14:25 ` [Qemu-devel] [PULL 26/43] target/arm: Implement SVE reverse within elements Peter Maydell
2018-06-15 14:25 ` [Qemu-devel] [PULL 27/43] target/arm: Implement SVE vector splice (predicated) Peter Maydell
2018-06-15 14:25 ` [Qemu-devel] [PULL 28/43] target/arm: Implement SVE Select Vectors Group Peter Maydell
2018-06-15 14:25 ` [Qemu-devel] [PULL 29/43] target/arm: Implement SVE Integer Compare - " Peter Maydell
2018-06-15 14:25 ` [Qemu-devel] [PULL 30/43] target/arm: Implement SVE Integer Compare - Immediate Group Peter Maydell
2018-06-15 14:25 ` [Qemu-devel] [PULL 31/43] target/arm: Implement SVE Partition Break Group Peter Maydell
2018-06-15 14:25 ` [Qemu-devel] [PULL 32/43] target/arm: Implement SVE Predicate Count Group Peter Maydell
2018-06-15 14:25 ` [Qemu-devel] [PULL 33/43] target/arm: Implement SVE Integer Compare - Scalars Group Peter Maydell
2018-06-15 14:25 ` [Qemu-devel] [PULL 34/43] target/arm: Implement FDUP/DUP Peter Maydell
2018-06-15 14:25 ` [Qemu-devel] [PULL 35/43] target/arm: Implement SVE Integer Wide Immediate - Unpredicated Group Peter Maydell
2018-06-15 14:25 ` [Qemu-devel] [PULL 36/43] target/arm: Implement SVE Floating Point Arithmetic " Peter Maydell
2018-06-15 14:25 ` [Qemu-devel] [PULL 37/43] aspeed_scu: Implement RNG register Peter Maydell
2018-06-15 14:25 ` [Qemu-devel] [PULL 38/43] m25p80: add support for two bytes WRSR for Macronix chips Peter Maydell
2018-06-15 14:25 ` [Qemu-devel] [PULL 39/43] iommu: Add IOMMU index concept to IOMMU API Peter Maydell
2018-06-15 14:25 ` [Qemu-devel] [PULL 40/43] iommu: Add IOMMU index argument to notifier APIs Peter Maydell
2018-06-15 14:25 ` [Qemu-devel] [PULL 41/43] iommu: Add IOMMU index argument to translate method Peter Maydell
2018-06-15 14:25 ` [Qemu-devel] [PULL 42/43] exec.c: Handle IOMMUs in address_space_translate_for_iotlb() Peter Maydell
2018-06-15 14:25 ` [Qemu-devel] [PULL 43/43] target/arm: Allow ARMv6-M Thumb2 instructions Peter Maydell
2018-06-15 15:30 ` [Qemu-devel] [PULL 00/43] target-arm queue Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180615142521.19143-8-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).