h6. [[Hardware Abstraction Layer]] h6(. [[HAL entry points from RISC OS]] h6((. » HAL_USBControllerInfo h2. HAL_USBControllerInfo h5. (HAL entry #108) <pre> size_t HAL_USBControllerInfo(int bus, struct usbinfo *info, size_t len) </pre> |_<. Entry | | |bus |Bus/interface number to query | |info |usbinfo pointer to fill with data | |len |Length of _info_ | |_<. Exit | | |/2. - |Returns sizeof( usbinfo ) for valid bus indices | |Returns 0 for invalid bus indices. | h4. Use This is an internal call for OS use only and should not be used by user software. Reads information about the available USB controllers. The information is stored in a _usbinfo_ struct: <pre> struct usbinfo { enum { OHCI = 0, EHCI = 1, MUSBMHDRC = 2, SynopsysDWC = 3, XHCI = 4 } type; /* Controller type */ int32 flags; /* Extra flags */ void *hw; /* Logical address of controller registers */ int devno; /* Device (interrupt) number of controller */ }; </pre> The available _flags_ are as follows: |_<. Bit |_<. Meaning | |0 |Port power controlled via [[HAL_USBPortPower]] (OHCI) | |1 |Port overcurrent status managed via [[HAL_USBPortDevice]], [[HAL_USBPortIRQStatus]], and [[HAL_USBPortIRQClear]] (OHCI) | |2 |Reserved for future use | |3 |Must use 32bit access for all registers (EHCI) | |31|Controller has embedded transaction translator function (EHCI) | h4. Notes The _info_ structure will only be fully filled in if the supplied _len_ is large enough. If _len_ is too small, only the _type_ field will be filled in. OHCI, EHCI, MUSBMHDRC and XHCI controllers all use the usbinfo struct described above. DWC controllers extend the struct to provide extra information: <pre> struct usbinfo_dwc { struct usbinfo base; /* Base structure */ int dma_offset; /* Offset to apply to ARM physical addresses to obtain DMA addresses */ void *hw_mphi; /* Logical address of msg based parallel host i/f */ int devno_mphi; /* Device (interrupt) number of msg based parallel host i/f */ }; </pre> h4. See also * [[HAL USB API]] h6. Information sources: Kernel.Docs.HAL.USB, HAL.OMAP3.s.USB, HAL.OMAP3.hdr.USB in CVS