USB DMA memory Allocation
Hans Petter Selasky
hps at bitfrost.no
Mon Aug 12 06:10:28 UTC 2013
Hi,
On 08/12/13 03:19, aseem.jolly wrote:
> if (EHCI_HCC_64BIT(cparams)) {
> DPRINTF("HCC uses 64-bit structures\n");
>
> /* MUST clear segment register if 64 bit capable */
> EWRITE4(sc, EHCI_CTRLDSSEGMENT, 0);
> }
> sc->sc_bus.usbrev = USB_REV_2_0;
>
> /* Reset the controller */
> DPRINTF("%s: resetting\n", device_get_nameunit(sc->sc_bus.bdev));
>
> err = ehci_hcreset(sc);
>
> Doubt 1) Whats the need to clear 'CTRLDSSEGMENT' register when host
> controller reset is going to set it to
> default value(0x00000000) anyways. I think we should move this code to after
> reset or before we turn on the controller.
You cannot assume this, unless it is written somewhere.
>
> Doubt 2) We should be using EOWRITE4(sc, EHCI_CTRLDSSEGMENT, 0); instead of
> EWRITE4(sc, EHCI_CTRLDSSEGMENT, 0);
You are right!
http://svnweb.freebsd.org/changeset/base/254238
>
>
> #define EOWRITE4(sc, a, x) \
> bus_space_write_4((sc)->sc_io_tag, (sc)->sc_io_hdl,
> (sc)->sc_offs+(a), (x))
> #define EWRITE4(sc, a, x) \
> bus_space_write_4((sc)->sc_io_tag, (sc)->sc_io_hdl, (a), (x))
>
--HPS
More information about the freebsd-usb
mailing list