• Robert Sprowson's avatar
    Update to use rationalised power and overcurrent API · 24cbac6b
    Robert Sprowson authored
    OHCIDriver (only) had sketchy support for a HAL based scheme for controlling the port power and monitor overcurrent. However the implementation was limited to supporting the single port required for an embedded product (aka Rhenium in the CVS history). The change makes it follow a model much more akin to the HAL_TimerDevice/HAL_TimerIRQStatus/HAL_TimerIRQClear set of functions.
    Version:
      Bumped OHCIDriver and USBDriver version numbers.
    ohcimodule.c:
      Use some defines from OsBytes.h.
      Group the debug variables within the OHCI_DEBUG define so they go away in the release case.
      Allow for up to 15 ports to be controlled via the revised HAL API, and pass something other than a hardwired controller of 0 when controlling/monitoring power.
      Enumerate the device numbers for overcurrent monitoring on startup.
      Deal with the possibility of one (or more) of the device numbers being shared interrupts.
      Squash a few trivial compiler warnings.
    ohcimodhead.cmhg:
      rename the handler/entry to reflect their use for overcurrent
    ohci.c:
      Allow for up to 15 ports to be controlled by passing in the port index where needed.
    usb_subr.c/usbdivar.h:
      Remove a RISC OS-ism in datatoggle, to converge with NetBSD a bit.
    ehcivar.h/usb_port.h:
      Relocate the overrides for mutex_ functions here since this is the only controller using them. Previously when in "usb_port.h" they would indirectly get dragged in ia the nested include in "usb.h". The could in fact now be implemented using SyncLib, an exercise left to the reader.
    usb.h
      Merge some of the device classes and other allocations from NetBSD.
    
    While it's not been possible to test the revised API, due to not having sight of the original platform on which it was implemented, none of the actively maintained HALs currently use the HAL based power and overcurrent scheme anyway, so the new code never gets called. In that respect, it's no more broken then the previous single port-single controller version.
    
    Version 0.89. Tagged as 'NetBSD-0_89'
    24cbac6b
ehcivar 7.89 KB