mirror of
https://github.com/qemu/qemu.git
synced 2024-12-23 04:03:43 +08:00
7abc8cabad
Instantiate EHCI and OHCI controllers on Allwinner A10. OHCI ports are modeled as companions of the respective EHCI ports. With this patch applied, USB controllers are discovered and instantiated when booting the cubieboard machine with a recent Linux kernel. ehci-platform 1c14000.usb: EHCI Host Controller ehci-platform 1c14000.usb: new USB bus registered, assigned bus number 1 ehci-platform 1c14000.usb: irq 26, io mem 0x01c14000 ehci-platform 1c14000.usb: USB 2.0 started, EHCI 1.00 ehci-platform 1c1c000.usb: EHCI Host Controller ehci-platform 1c1c000.usb: new USB bus registered, assigned bus number 2 ehci-platform 1c1c000.usb: irq 31, io mem 0x01c1c000 ehci-platform 1c1c000.usb: USB 2.0 started, EHCI 1.00 ohci-platform 1c14400.usb: Generic Platform OHCI controller ohci-platform 1c14400.usb: new USB bus registered, assigned bus number 3 ohci-platform 1c14400.usb: irq 27, io mem 0x01c14400 ohci-platform 1c1c400.usb: Generic Platform OHCI controller ohci-platform 1c1c400.usb: new USB bus registered, assigned bus number 4 ohci-platform 1c1c400.usb: irq 32, io mem 0x01c1c400 usb 2-1: new high-speed USB device number 2 using ehci-platform usb-storage 2-1:1.0: USB Mass Storage device detected scsi host1: usb-storage 2-1:1.0 usb 3-1: new full-speed USB device number 2 using ohci-platform input: QEMU QEMU USB Mouse as /devices/platform/soc/1c14400.usb/usb3/3-1/3-1:1.0/0003:0627:0001.0001/input/input0 Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Niek Linnenbank <nieklinnenbank@gmail.com> Message-id: 20200217204812.9857-4-linux@roeck-us.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
40 lines
899 B
C
40 lines
899 B
C
#ifndef HW_ARM_ALLWINNER_A10_H
|
|
#define HW_ARM_ALLWINNER_A10_H
|
|
|
|
#include "qemu/error-report.h"
|
|
#include "hw/char/serial.h"
|
|
#include "hw/arm/boot.h"
|
|
#include "hw/timer/allwinner-a10-pit.h"
|
|
#include "hw/intc/allwinner-a10-pic.h"
|
|
#include "hw/net/allwinner_emac.h"
|
|
#include "hw/ide/ahci.h"
|
|
#include "hw/usb/hcd-ohci.h"
|
|
#include "hw/usb/hcd-ehci.h"
|
|
|
|
#include "target/arm/cpu.h"
|
|
|
|
|
|
#define AW_A10_SDRAM_BASE 0x40000000
|
|
|
|
#define AW_A10_NUM_USB 2
|
|
|
|
#define TYPE_AW_A10 "allwinner-a10"
|
|
#define AW_A10(obj) OBJECT_CHECK(AwA10State, (obj), TYPE_AW_A10)
|
|
|
|
typedef struct AwA10State {
|
|
/*< private >*/
|
|
DeviceState parent_obj;
|
|
/*< public >*/
|
|
|
|
ARMCPU cpu;
|
|
AwA10PITState timer;
|
|
AwA10PICState intc;
|
|
AwEmacState emac;
|
|
AllwinnerAHCIState sata;
|
|
MemoryRegion sram_a;
|
|
EHCISysBusState ehci[AW_A10_NUM_USB];
|
|
OHCISysBusState ohci[AW_A10_NUM_USB];
|
|
} AwA10State;
|
|
|
|
#endif
|