#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdint.h>
#include "usbhack.h"
#include "lib_malloc.h"
#include "lib_queue.h"
#include "usbchap9.h"
#include "usbd.h"
#include "ohci.h"
Go to the source code of this file.
|
#define | CPUCFG_COHERENT_DMA 1 /* hack runs on a PC, PCs are coherent */ |
|
#define | ENDIAN_BIG 0 |
|
#define | ENDIAN_LITTLE 1 /* hack runs on PC, PCs are little endian */ |
|
#define | BSWAP32(x) (x) |
|
#define | OHCI_VTOP(ptr) vtop(ptr) |
|
#define | OHCI_PTOV(ptr) ptov(ptr) |
|
#define | OHCI_VTOD(ptr) OHCI_VTOP(ptr) |
|
#define | OHCI_DTOV(ptr) OHCI_PTOV(ptr) |
|
#define | OHCI_WRITECSR(softc, x, y) *((volatile uint32_t *) ((softc)->ohci_regs + ((x)/sizeof(uint32_t)))) = (y) |
|
#define | OHCI_READCSR(softc, x) *((volatile uint32_t *) ((softc)->ohci_regs + ((x)/sizeof(uint32_t)))) |
|
#define | OHCI_INVAL_RANGE(s, l) memdcbf(s,l) |
|
#define | OHCI_FLUSH_RANGE(s, l) memdcbst(s,l) |
|
#define | OHCIDEBUG(x) |
|
#define | ohci_td_from_transfer(softc, transfer) ((softc)->ohci_hwtdpool + ((transfer) - (softc)->ohci_transfer_pool)) |
|
#define | ohci_transfer_from_td(softc, td) ((softc)->ohci_transfer_pool + ((td) - (softc)->ohci_hwtdpool)) |
|
#define | ohci_ed_from_endpoint(softc, endpoint) ((softc)->ohci_hwedpool + ((endpoint) - (softc)->ohci_endpoint_pool)) |
|
#define | ohci_endpoint_from_ed(softc, ed) ((softc)->ohci_endpoint_pool + ((ed) - (softc)->ohci_hwedpool)) |
|
#define | CACHE_ALIGN 32 /* XXX place holder, big enough to now. */ |
|
#define | ALIGN(n, align) (((n)+((align)-1)) & ~((align)-1)) |
|
◆ ALIGN
#define ALIGN |
( |
|
n, |
|
|
|
align |
|
) |
| (((n)+((align)-1)) & ~((align)-1)) |
◆ BSWAP32
◆ CACHE_ALIGN
#define CACHE_ALIGN 32 /* XXX place holder, big enough to now. */ |
◆ CPUCFG_COHERENT_DMA
#define CPUCFG_COHERENT_DMA 1 /* hack runs on a PC, PCs are coherent */ |
◆ ENDIAN_BIG
◆ ENDIAN_LITTLE
#define ENDIAN_LITTLE 1 /* hack runs on PC, PCs are little endian */ |
◆ OHCI_DTOV
◆ ohci_ed_from_endpoint
#define ohci_ed_from_endpoint |
( |
|
softc, |
|
|
|
endpoint |
|
) |
| ((softc)->ohci_hwedpool + ((endpoint) - (softc)->ohci_endpoint_pool)) |
◆ ohci_endpoint_from_ed
#define ohci_endpoint_from_ed |
( |
|
softc, |
|
|
|
ed |
|
) |
| ((softc)->ohci_endpoint_pool + ((ed) - (softc)->ohci_hwedpool)) |
◆ OHCI_FLUSH_RANGE
#define OHCI_FLUSH_RANGE |
( |
|
s, |
|
|
|
l |
|
) |
| memdcbst(s,l) |
◆ OHCI_INVAL_RANGE
#define OHCI_INVAL_RANGE |
( |
|
s, |
|
|
|
l |
|
) |
| memdcbf(s,l) |
◆ OHCI_PTOV
◆ OHCI_READCSR
#define OHCI_READCSR |
( |
|
softc, |
|
|
|
x |
|
) |
| *((volatile uint32_t *) ((softc)->ohci_regs + ((x)/sizeof(uint32_t)))) |
◆ ohci_td_from_transfer
#define ohci_td_from_transfer |
( |
|
softc, |
|
|
|
transfer |
|
) |
| ((softc)->ohci_hwtdpool + ((transfer) - (softc)->ohci_transfer_pool)) |
◆ ohci_transfer_from_td
#define ohci_transfer_from_td |
( |
|
softc, |
|
|
|
td |
|
) |
| ((softc)->ohci_transfer_pool + ((td) - (softc)->ohci_hwtdpool)) |
◆ OHCI_VTOD
◆ OHCI_VTOP
◆ OHCI_WRITECSR
#define OHCI_WRITECSR |
( |
|
softc, |
|
|
|
x, |
|
|
|
y |
|
) |
| *((volatile uint32_t *) ((softc)->ohci_regs + ((x)/sizeof(uint32_t)))) = (y) |
◆ OHCIDEBUG
◆ ohci_dumpdoneq()
◆ ohci_dumped()
◆ ohci_dumpedchain()
◆ ohci_dumpportstat()
void ohci_dumpportstat |
( |
int |
idx, |
|
|
uint32_t |
reg |
|
) |
| |
◆ ohci_dumprhstat()
◆ ohci_dumptd()
◆ ohci_dumptdchain()
◆ ptov()
◆ vtop()
◆ ohci_driver
Initial value:= {
ohci_create,
ohci_delete,
ohci_start,
ohci_stop,
ohci_intr,
ohci_ept_create,
ohci_ept_delete,
ohci_ept_setmps,
ohci_ept_setaddr,
ohci_ept_cleartoggle,
ohci_xfer
}
Definition at line 1717 of file ohci.c.
◆ ohcidebug