USB DMA memory Allocation
aseem.jolly
aseem.jolly at gmail.com
Mon Aug 12 01:19:40 UTC 2013
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.
Doubt 2) We should be using EOWRITE4(sc, EHCI_CTRLDSSEGMENT, 0); instead of
EWRITE4(sc, EHCI_CTRLDSSEGMENT, 0);
#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))
--
View this message in context: http://freebsd.1045724.n5.nabble.com/USB-DMA-memory-Allocation-tp5833506p5835590.html
Sent from the freebsd-usb mailing list archive at Nabble.com.
More information about the freebsd-usb
mailing list