Ignore:
Timestamp:
2011-09-16T14:50:20Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
432a269, d1e18573
Parents:
47fecbb (diff), 82a31261 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge USB changes from bzr://krabicka.net/orome/helenos/usb/

  • Move common HC code from uhci/ohci drivers to libusbhost
  • Rewrite USB HC interface to have common read/write functions for all transfer types.
  • Restructure hc drivers to avoid some hooks and void* casts
  • Cleanup the code and remove unnecessary mallocs.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/uhci/utils/malloc32.h

    r47fecbb rfd07e526  
    5050 * @return Physical address if exists, NULL otherwise.
    5151 */
    52 static inline uintptr_t addr_to_phys(void *addr)
     52static inline uintptr_t addr_to_phys(const void *addr)
    5353{
    5454        if (addr == NULL)
     
    102102        if (free_address == 0)
    103103                return NULL;
    104         void *ret = as_area_create(free_address, UHCI_REQUIRED_PAGE_SIZE,
     104        void *address = as_area_create(free_address, UHCI_REQUIRED_PAGE_SIZE,
    105105                  AS_AREA_READ | AS_AREA_WRITE);
    106         if (ret != free_address)
     106        if (address != free_address)
    107107                return NULL;
    108         return ret;
     108        return address;
     109}
     110/*----------------------------------------------------------------------------*/
     111static inline void return_page(void *page)
     112{
     113        if (page)
     114                as_area_destroy(page);
    109115}
    110116
Note: See TracChangeset for help on using the changeset viewer.