48 #define DEV_OHCI_LENGTH 0x1000 64 uint64_t idata = 0, odata = 0;
65 const char *name = NULL;
70 switch (relative_addr) {
78 name =
"COMMAND_STATUS";
80 fatal(
"Hm... OHCI COMMAND STATUS\n");
85 name =
"INTERRUPT_STATUS";
93 name =
"RH_DESCRIPTOR_A";
101 name =
"RH_PORT_STATUS(1)";
108 odata |= (0x10 << 16) | 0x10;
113 if (idata & 0x100000)
118 name =
"RH_PORT_STATUS(2)";
124 debug(
"[ ohci: read from addr 0x%x: 0x%llx ]\n",
125 (
int)relative_addr, (
long long)odata);
127 debug(
"[ ohci: write to addr 0x%x: 0x%llx ]\n",
128 (
int)relative_addr, (
long long)idata);
134 debug(
"[ ohci: read from %s: 0x%llx ]\n",
135 name, (
long long)odata);
137 debug(
"[ ohci: write to %s: 0x%llx ]\n",
138 name, (
long long)idata);
uint64_t memory_readmax64(struct cpu *cpu, unsigned char *buf, int len)
void fatal(const char *fmt,...)
#define CHECK_ALLOCATION(ptr)
#define OHCI_INTERRUPT_STATUS
#define INTERRUPT_ASSERT(istruct)
#define OHCI_RH_PORT_STATUS(n)
#define INTERRUPT_CONNECT(name, istruct)
void memory_writemax64(struct cpu *cpu, unsigned char *buf, int len, uint64_t data)
void memory_device_register(struct memory *mem, const char *, uint64_t baseaddr, uint64_t len, int(*f)(struct cpu *, struct memory *, uint64_t, unsigned char *, size_t, int, void *), void *extra, int flags, unsigned char *dyntrans_data)
#define OHCI_COMMAND_STATUS
#define OHCI_RH_DESCRIPTOR_A