Changeset f8dfb40 in mainline
- Timestamp:
- 2011-10-16T17:24:02Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 98fb010
- Parents:
- 19746a96
- Location:
- uspace/drv/bus/usb/ohci
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/hc.c
r19746a96 rf8dfb40 565 565 566 566 /*Init HCCA */ 567 instance->hcca = malloc32(sizeof(hcca_t));567 instance->hcca = hcca_get(); 568 568 if (instance->hcca == NULL) 569 569 return ENOMEM; -
uspace/drv/bus/usb/ohci/hw_struct/hcca.h
r19746a96 rf8dfb40 36 36 37 37 #include <stdint.h> 38 #include <malloc.h> 38 39 39 40 /** Host controller communication area. … … 48 49 } __attribute__((packed, aligned)) hcca_t; 49 50 51 static inline void * hcca_get(void) 52 { 53 assert(sizeof(hcca_t) == 256); 54 return memalign(256, sizeof(hcca_t)); 55 } 50 56 #endif 51 57 /** -
uspace/drv/bus/usb/ohci/utils/malloc32.h
r19746a96 rf8dfb40 41 41 #include <as.h> 42 42 43 /* Generic TDs and EDs require 16byte alignment, 44 * Isochronous TD require 32byte alignment, 45 * buffers do not have to be aligned. 46 */ 47 #define OHCI_ALIGN 32 48 43 49 /** Get physical address translation 44 50 * … … 62 68 */ 63 69 static inline void * malloc32(size_t size) 64 { return memalign( size, size); }70 { return memalign(OHCI_ALIGN, size); } 65 71 /*----------------------------------------------------------------------------*/ 66 72 /** Physical mallocator simulator
Note:
See TracChangeset
for help on using the changeset viewer.