[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 112/115] exec/cpu-common: Move MUSB specific typedefs to 'hw/usb/h
From: |
Paolo Bonzini |
Subject: |
[PULL 112/115] exec/cpu-common: Move MUSB specific typedefs to 'hw/usb/hcd-musb.h' |
Date: |
Thu, 11 Jun 2020 15:44:46 -0400 |
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
The CPUReadMemoryFunc/CPUWriteMemoryFunc typedefs are legacy
remnant from before the conversion to MemoryRegions.
Since they are now only used in tusb6010.c and hcd-musb.c,
move them to "hw/usb/musb.h" and rename them appropriately.
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200601141536.15192-4-f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/usb/hcd-musb.c | 4 ++--
include/exec/cpu-common.h | 3 ---
include/hw/usb/hcd-musb.h | 9 +++++----
3 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/hw/usb/hcd-musb.c b/hw/usb/hcd-musb.c
index 5ab13feb3a..85f5ff5bd4 100644
--- a/hw/usb/hcd-musb.c
+++ b/hw/usb/hcd-musb.c
@@ -1540,13 +1540,13 @@ static void musb_writew(void *opaque, hwaddr addr,
uint32_t value)
};
}
-CPUReadMemoryFunc * const musb_read[] = {
+MUSBReadFunc * const musb_read[] = {
musb_readb,
musb_readh,
musb_readw,
};
-CPUWriteMemoryFunc * const musb_write[] = {
+MUSBWriteFunc * const musb_write[] = {
musb_writeb,
musb_writeh,
musb_writew,
diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h
index b47e5630e7..d5e285d2b5 100644
--- a/include/exec/cpu-common.h
+++ b/include/exec/cpu-common.h
@@ -43,9 +43,6 @@ extern ram_addr_t ram_size;
/* memory API */
-typedef void CPUWriteMemoryFunc(void *opaque, hwaddr addr, uint32_t value);
-typedef uint32_t CPUReadMemoryFunc(void *opaque, hwaddr addr);
-
void qemu_ram_remap(ram_addr_t addr, ram_addr_t length);
/* This should not be used by devices. */
ram_addr_t qemu_ram_addr_from_host(void *ptr);
diff --git a/include/hw/usb/hcd-musb.h b/include/hw/usb/hcd-musb.h
index 26b50132ff..c874b9f292 100644
--- a/include/hw/usb/hcd-musb.h
+++ b/include/hw/usb/hcd-musb.h
@@ -13,8 +13,6 @@
#ifndef HW_USB_MUSB_H
#define HW_USB_MUSB_H
-#include "exec/cpu-common.h"
-
enum musb_irq_source_e {
musb_irq_suspend = 0,
musb_irq_resume,
@@ -32,8 +30,11 @@ enum musb_irq_source_e {
musb_irq_max /* total number of interrupts defined */
};
-extern CPUReadMemoryFunc * const musb_read[];
-extern CPUWriteMemoryFunc * const musb_write[];
+/* TODO convert hcd-musb to QOM/qdev and remove MUSBReadFunc/MUSBWriteFunc */
+typedef void MUSBWriteFunc(void *opaque, hwaddr addr, uint32_t value);
+typedef uint32_t MUSBReadFunc(void *opaque, hwaddr addr);
+extern MUSBReadFunc * const musb_read[];
+extern MUSBWriteFunc * const musb_write[];
typedef struct MUSBState MUSBState;
--
2.26.2
- [PULL 073/115] replay: implement fair mutex, (continued)
- [PULL 073/115] replay: implement fair mutex, Paolo Bonzini, 2020/06/11
- [PULL 103/115] target/i386: sev: Embed SEVState in SevGuestState, Paolo Bonzini, 2020/06/11
- [PULL 107/115] target/i386: sev: Remove redundant handle field, Paolo Bonzini, 2020/06/11
- [PULL 108/115] target/i386: sev: Unify SEVState and SevGuestState, Paolo Bonzini, 2020/06/11
- [PULL 109/115] checkpatch: reversed logic with acpi test checks, Paolo Bonzini, 2020/06/11
- [PULL 099/115] xen: fix build without pci passthrough, Paolo Bonzini, 2020/06/11
- [PULL 110/115] exec/memory: Remove unused MemoryRegionMmio type, Paolo Bonzini, 2020/06/11
- [PULL 114/115] stubs: move Xen stubs to accel/, Paolo Bonzini, 2020/06/11
- [PULL 111/115] hw/usb: Move device-specific declarations to new 'hcd-musb.h' header, Paolo Bonzini, 2020/06/11
- [PULL 113/115] replay: fix replay shutdown for console mode, Paolo Bonzini, 2020/06/11
- [PULL 112/115] exec/cpu-common: Move MUSB specific typedefs to 'hw/usb/hcd-musb.h',
Paolo Bonzini <=
- [PULL 115/115] target/i386: Remove obsolete TODO file, Paolo Bonzini, 2020/06/11
- [PULL 086/115] target/ppc: Restrict PPCVirtualHypervisorClass to system-mode, Paolo Bonzini, 2020/06/11
- [PULL 106/115] target/i386: sev: Remove redundant policy field, Paolo Bonzini, 2020/06/11
- Re: [PULL 000/115] Huge miscellaneous pull request for 2020-06-11, no-reply, 2020/06/11
- Re: [PULL 000/115] Huge miscellaneous pull request for 2020-06-11, Peter Maydell, 2020/06/12