LibXenon
Bare-metal Xbox 360 homebrew library
|
Go to the source code of this file.
Data Structures | |
struct | ehci_device |
struct | ehci_urb |
struct | ehci_hcd |
struct | ehci_qtd |
union | ehci_shadow |
struct | ehci_qh |
Macros | |
#define | __hc32 __le32 |
#define | __hc16 __le16 |
#define | EHCI_MAX_ROOT_PORTS 8 /* see HCS_N_PORTS */ |
#define | EHCI_MAX_QTD 8 |
#define | ep_bit(ep) (((ep)&0xf)+(((ep)>>7)?16:0)) |
#define | get_toggle(dev, ep) (((dev)->toggles>>ep_bit(ep))&1) |
#define | set_toggle(dev, ep, v) (dev)->toggles = ((dev)->toggles &(~(1<<ep_bit(ep)))) | ((v)<<ep_bit(ep)) |
#define | DEFAULT_I_TDPS 1024 /* some HCs can do less */ |
#define | QTD_NEXT(dma) cpu_to_hc32( (u32)dma) |
#define | QTD_TOGGLE (1 << 31) /* data toggle */ |
#define | QTD_LENGTH(tok) (((tok)>>16) & 0x7fff) |
#define | QTD_IOC (1 << 15) /* interrupt on complete */ |
#define | QTD_CERR(tok) (((tok)>>10) & 0x3) |
#define | QTD_PID(tok) (((tok)>>8) & 0x3) |
#define | QTD_STS_ACTIVE (1 << 7) /* HC may execute this */ |
#define | QTD_STS_HALT (1 << 6) /* halted on error */ |
#define | QTD_STS_DBE (1 << 5) /* data buffer error (in HC) */ |
#define | QTD_STS_BABBLE (1 << 4) /* device was babbling (qtd halted) */ |
#define | QTD_STS_XACT (1 << 3) /* device gave illegal response */ |
#define | QTD_STS_MMF (1 << 2) /* incomplete split transaction */ |
#define | QTD_STS_STS (1 << 1) /* split transaction state */ |
#define | QTD_STS_PING (1 << 0) /* issue PING? */ |
#define | ACTIVE_BIT(ehci) cpu_to_hc32( QTD_STS_ACTIVE) |
#define | HALT_BIT(ehci) cpu_to_hc32( QTD_STS_HALT) |
#define | STATUS_BIT(ehci) cpu_to_hc32( QTD_STS_STS) |
#define | QTD_MASK(ehci) cpu_to_hc32 ( ~0x1f) |
#define | IS_SHORT_READ(token) (QTD_LENGTH (token) != 0 && QTD_PID (token) == 1) |
#define | Q_NEXT_TYPE(dma) ((dma) & cpu_to_hc32( 3 << 1)) |
#define | Q_TYPE_ITD (0 << 1) |
#define | Q_TYPE_QH (1 << 1) |
#define | Q_TYPE_SITD (2 << 1) |
#define | Q_TYPE_FSTN (3 << 1) |
#define | QH_NEXT(dma) (cpu_to_hc32( (((u32)dma)&~0x01f)|Q_TYPE_QH)) |
#define | EHCI_LIST_END() cpu_to_hc32( 1) /* "null pointer" to hw */ |
#define | QH_HEAD 0x00008000 |
#define | QH_SMASK 0x000000ff |
#define | QH_CMASK 0x0000ff00 |
#define | QH_HUBADDR 0x007f0000 |
#define | QH_HUBPORT 0x3f800000 |
#define | QH_MULT 0xc0000000 |
#define | NO_FRAME ((unsigned short)~0) /* pick new start */ |
#define | cpu_to_hc32(b) cpu_to_le32(b) |
#define | hc32_to_cpu(b) le32_to_cpu(b) |
#define | hc32_to_cpup(b) le32_to_cpu(*(b)) |
#define | STUB_DEBUG_FILES |
Functions | |
struct ehci_qtd | __attribute__ ((aligned(32))) |
void * | ehci_maligned (int size, int alignement, int crossing) |
dma_addr_t | ehci_virt_to_dma (void *) |
dma_addr_t | ehci_dma_map_to (void *buf, size_t len) |
dma_addr_t | ehci_dma_map_from (void *buf, size_t len) |
dma_addr_t | ehci_dma_map_bidir (void *buf, size_t len) |
void | ehci_dma_unmap_to (dma_addr_t buf, size_t len) |
void | ehci_dma_unmap_from (dma_addr_t buf, size_t len) |
void | ehci_dma_unmap_bidir (dma_addr_t buf, size_t len) |
void | ehci_usleep (int time) |
void | ehci_msleep (int time) |
s32 | ehci_control_message (struct ehci_hcd *ehci, struct ehci_device *dev, u8 bmRequestType, u8 bmRequest, u16 wValue, u16 wIndex, u16 wLength, void *buf) |
s32 | ehci_bulk_message (struct ehci_hcd *ehci, struct ehci_device *dev, u8 bEndpoint, u16 wLength, void *rpData) |
int | ehci_discover (struct ehci_hcd *ehci) |
int | ehci_get_device_list (struct ehci_hcd *ehci, u8 maxdev, u8 b0, u8 *num, u16 *buf) |
int | ehci_reset_port2 (struct ehci_hcd *ehci, int port) |
int | ehci_open_device (struct ehci_hcd *ehci, int vid, int pid, int fd) |
int | ehci_close_device (struct ehci_device *dev) |
void * | ehci_fd_to_dev (struct ehci_hcd *ehci, int fd) |
int | ehci_release_ports (struct ehci_hcd *ehci) |
s32 | USBStorage_Init (void) |
s32 | USBStorage_Read_Sectors (int device, u32 sector, u32 numSectors, void *buffer) |
s32 | USBStorage_Read_Stress (u32 sector, u32 numSectors, void *buffer) |
s32 | USBStorage_Write_Sectors (int device, u32 sector, u32 numSectors, const void *buffer) |
Variables | |
__hc32 | hw_next |
__hc32 | hw_alt_next |
__hc32 | hw_token |
__hc32 | hw_buf [5] |
__hc32 | hw_buf_hi [5] |
dma_addr_t | qtd_dma |
struct ehci_qtd * | next |
struct ehci_urb * | urb |
size_t | length |
union ehci_shadow | __attribute__ |
__hc32 | hw_info1 |
__hc32 | hw_info2 |
__hc32 | hw_current |
__hc32 | hw_qtd_next |
dma_addr_t | qh_dma |
struct ehci_qtd * | qtd_head |
struct ehci_hcd * | ehci |
#define ACTIVE_BIT | ( | ehci | ) | cpu_to_hc32( QTD_STS_ACTIVE) |
#define cpu_to_hc32 | ( | b | ) | cpu_to_le32(b) |
#define EHCI_LIST_END | ( | ) | cpu_to_hc32( 1) /* "null pointer" to hw */ |
#define EHCI_MAX_ROOT_PORTS 8 /* see HCS_N_PORTS */ |
#define get_toggle | ( | dev, | |
ep | |||
) | (((dev)->toggles>>ep_bit(ep))&1) |
#define HALT_BIT | ( | ehci | ) | cpu_to_hc32( QTD_STS_HALT) |
#define hc32_to_cpu | ( | b | ) | le32_to_cpu(b) |
#define hc32_to_cpup | ( | b | ) | le32_to_cpu(*(b)) |
#define IS_SHORT_READ | ( | token | ) | (QTD_LENGTH (token) != 0 && QTD_PID (token) == 1) |
#define Q_NEXT_TYPE | ( | dma | ) | ((dma) & cpu_to_hc32( 3 << 1)) |
#define QH_NEXT | ( | dma | ) | (cpu_to_hc32( (((u32)dma)&~0x01f)|Q_TYPE_QH)) |
#define QTD_MASK | ( | ehci | ) | cpu_to_hc32 ( ~0x1f) |
#define QTD_NEXT | ( | dma | ) | cpu_to_hc32( (u32)dma) |
#define QTD_STS_BABBLE (1 << 4) /* device was babbling (qtd halted) */ |
#define QTD_STS_MMF (1 << 2) /* incomplete split transaction */ |
#define QTD_STS_XACT (1 << 3) /* device gave illegal response */ |
#define STATUS_BIT | ( | ehci | ) | cpu_to_hc32( QTD_STS_STS) |
struct ehci_qtd __attribute__ | ( | (aligned(32)) | ) |
s32 ehci_bulk_message | ( | struct ehci_hcd * | ehci, |
struct ehci_device * | dev, | ||
u8 | bEndpoint, | ||
u16 | wLength, | ||
void * | rpData | ||
) |
int ehci_close_device | ( | struct ehci_device * | dev | ) |
dma_addr_t ehci_dma_map_bidir | ( | void * | buf, |
size_t | len | ||
) |
dma_addr_t ehci_dma_map_from | ( | void * | buf, |
size_t | len | ||
) |
dma_addr_t ehci_dma_map_to | ( | void * | buf, |
size_t | len | ||
) |
void ehci_dma_unmap_bidir | ( | dma_addr_t | buf, |
size_t | len | ||
) |
void ehci_dma_unmap_from | ( | dma_addr_t | buf, |
size_t | len | ||
) |
void ehci_dma_unmap_to | ( | dma_addr_t | buf, |
size_t | len | ||
) |
void * ehci_maligned | ( | int | size, |
int | alignement, | ||
int | crossing | ||
) |
int ehci_open_device | ( | struct ehci_hcd * | ehci, |
int | vid, | ||
int | pid, | ||
int | fd | ||
) |
dma_addr_t ehci_virt_to_dma | ( | void * | a | ) |
s32 USBStorage_Init | ( | void | ) |
Definition at line 1215 of file usbstorage.c.
Definition at line 1342 of file usbstorage.c.
Definition at line 1378 of file usbstorage.c.
union ehci_shadow __attribute__ |
dma_addr_t qh_dma |
dma_addr_t qtd_dma |