[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 1/8] usb/ehci: parameterise the register regi
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [PATCH v1 1/8] usb/ehci: parameterise the register region offsets |
Date: |
Thu, 25 Oct 2012 14:04:40 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.8) Gecko/20121012 Thunderbird/10.0.8 |
On 10/25/12 11:47, Peter Crosthwaite wrote:
> The capabilities register and operational register offsets can vary from one
> EHCI implementation to the next. Parameterise accordingly.
> static Property ehci_properties[] = {
> DEFINE_PROP_UINT32("maxframes", EHCIState, maxframes, 128),
> + DEFINE_PROP_UINT16("capabase", EHCIState, capabase, 0),
> + DEFINE_PROP_UINT16("opregbase", EHCIState, opregbase, 0x20),
> DEFINE_PROP_END_OF_LIST(),
> };
I don't think we want have this as properties. Just set them in initfn().
> @@ -2718,8 +2719,10 @@ static int usb_ehci_initfn(PCIDevice *dev)
> pci_conf[0x6e] = 0x00;
> pci_conf[0x6f] = 0xc0; // USBLEFCTLSTS
>
> + s->caps = g_malloc0(s->opregbase);
I don't think we need to make that dynamic.
opregbase just happened equal caps_size for pci-ehci due to packing
these regions without space inbetween.
> memory_region_init_io(&s->mem_caps, &ehci_mmio_caps_ops, s,
> - "capabilities", OPREGBASE);
> + "capabilities", s->opregbase);
caps_size
cheers,
Gerd
[Qemu-devel] [PATCH v1 4/8] usb/ehci: Add usb-ehci-sysbus, Peter Crosthwaite, 2012/10/25