Lines Matching refs:value

941     uint8_t value;  in musb_read_fifo()  local
951 value=ep->buf[1][ep->fifostart[1] + ep->fifolen[1] ++]; in musb_read_fifo()
952 TRACE("EP%d 0x%02x, %d", ep->epnum, value, ep->fifolen[1] ); in musb_read_fifo()
953 return value; in musb_read_fifo()
956 static void musb_write_fifo(MUSBEndPoint *ep, uint8_t value) in musb_write_fifo() argument
958 TRACE("EP%d = %02x", ep->epnum, value); in musb_write_fifo()
965 ep->buf[0][ep->fifostart[0] + ep->fifolen[0] ++] = value; in musb_write_fifo()
997 static void musb_busctl_writeb(void *opaque, int ep, int addr, uint8_t value) in musb_busctl_writeb() argument
1003 s->ep[ep].faddr[0] = value; in musb_busctl_writeb()
1006 s->ep[ep].faddr[1] = value; in musb_busctl_writeb()
1009 s->ep[ep].haddr[0] = value; in musb_busctl_writeb()
1012 s->ep[ep].hport[0] = value; in musb_busctl_writeb()
1015 s->ep[ep].haddr[1] = value; in musb_busctl_writeb()
1018 s->ep[ep].hport[1] = value; in musb_busctl_writeb()
1043 static void musb_busctl_writeh(void *opaque, int ep, int addr, uint16_t value) in musb_busctl_writeh() argument
1049 s->ep[ep].faddr[0] = value; in musb_busctl_writeh()
1052 s->ep[ep].faddr[1] = value; in musb_busctl_writeh()
1056 musb_busctl_writeb(s, ep, addr, value & 0xff); in musb_busctl_writeh()
1057 musb_busctl_writeb(s, ep, addr | 1, value >> 8); in musb_busctl_writeh()
1088 static void musb_ep_writeb(void *opaque, int ep, int addr, uint8_t value) in musb_ep_writeb() argument
1094 s->ep[ep].type[0] = value; in musb_ep_writeb()
1097 s->ep[ep].interval[0] = value; in musb_ep_writeb()
1101 s->ep[ep].type[1] = value; in musb_ep_writeb()
1104 s->ep[ep].interval[1] = value; in musb_ep_writeb()
1110 TRACE("somebody messes with fifosize (now %i bytes)", value); in musb_ep_writeb()
1111 s->ep[ep].fifosize = value; in musb_ep_writeb()
1149 static void musb_ep_writeh(void *opaque, int ep, int addr, uint16_t value) in musb_ep_writeh() argument
1155 s->ep[ep].maxp[0] = value; in musb_ep_writeh()
1159 s->ep[ep].csr[0] &= value & 0xa6; in musb_ep_writeh()
1160 s->ep[ep].csr[0] |= value & 0xff59; in musb_ep_writeh()
1162 s->ep[ep].csr[0] &= value & 0x85; in musb_ep_writeh()
1163 s->ep[ep].csr[0] |= value & 0xf7a; in musb_ep_writeh()
1168 if ((ep && (value & MGC_M_TXCSR_FLUSHFIFO)) || in musb_ep_writeh()
1169 (!ep && (value & MGC_M_CSR0_FLUSHFIFO))) { in musb_ep_writeh()
1182 (value & MGC_M_TXCSR_TXPKTRDY) && in musb_ep_writeh()
1183 !(value & MGC_M_TXCSR_H_NAKTIMEOUT)) || in musb_ep_writeh()
1185 (value & MGC_M_TXCSR_TXPKTRDY)) || in musb_ep_writeh()
1189 (value & MGC_M_CSR0_TXPKTRDY) && in musb_ep_writeh()
1190 !(value & MGC_M_CSR0_H_NAKTIMEOUT))) in musb_ep_writeh()
1192 (value & MGC_M_CSR0_TXPKTRDY))) in musb_ep_writeh()
1196 (value & MGC_M_CSR0_H_REQPKT) && in musb_ep_writeh()
1198 !(value & (MGC_M_CSR0_H_NAKTIMEOUT | in musb_ep_writeh()
1201 !(value & MGC_M_CSR0_RXPKTRDY)) in musb_ep_writeh()
1207 s->ep[ep].maxp[1] = value; in musb_ep_writeh()
1212 (value & MGC_M_RXCSR_H_AUTOREQ) && in musb_ep_writeh()
1213 !(value & MGC_M_RXCSR_RXPKTRDY) && in musb_ep_writeh()
1215 value |= MGC_M_RXCSR_H_REQPKT; in musb_ep_writeh()
1217 s->ep[ep].csr[1] &= 0x102 | (value & 0x4d); in musb_ep_writeh()
1218 s->ep[ep].csr[1] |= value & 0xfeb0; in musb_ep_writeh()
1222 if (value & MGC_M_RXCSR_FLUSHFIFO) { in musb_ep_writeh()
1230 if ((value & MGC_M_RXCSR_H_REQPKT) && !(value & MGC_M_RXCSR_DATAERROR)) in musb_ep_writeh()
1232 if (value & MGC_M_RXCSR_H_REQPKT) in musb_ep_writeh()
1237 s->ep[ep].rxcount = value; in musb_ep_writeh()
1241 musb_ep_writeb(s, ep, addr, value & 0xff); in musb_ep_writeh()
1242 musb_ep_writeb(s, ep, addr | 1, value >> 8); in musb_ep_writeh()
1309 static void musb_writeb(void *opaque, hwaddr addr, uint32_t value) in musb_writeb() argument
1316 s->faddr = value & 0x7f; in musb_writeb()
1319 s->power = (value & 0xef) | (s->power & 0x10); in musb_writeb()
1321 if ((value & MGC_M_POWER_RESET) && s->port.dev) { in musb_writeb()
1324 if ((value & MGC_M_POWER_HSENAB) && in musb_writeb()
1329 if (value & MGC_M_POWER_SUSPENDM) { in musb_writeb()
1334 if (value & MGC_M_POWER_RESUME) { in musb_writeb()
1342 s->mask = value & 0xff; in musb_writeb()
1345 s->idx = value & 0xf; in musb_writeb()
1351 musb_ep_writeb(s, s->idx, addr & 0xf, value); in musb_writeb()
1355 s->session = !!(value & MGC_M_DEVCTL_SESSION); in musb_writeb()
1362 s->devctl |= value & MGC_M_DEVCTL_SESSION; in musb_writeb()
1377 musb_busctl_writeb(s, ep, addr & 0x7, value); in musb_writeb()
1382 musb_ep_writeb(s, ep, addr & 0xf, value); in musb_writeb()
1387 musb_write_fifo(s->ep + ep, value & 0xff); in musb_writeb()
1450 static void musb_writeh(void *opaque, hwaddr addr, uint32_t value) in musb_writeh() argument
1457 s->tx_mask = value; in musb_writeh()
1463 s->rx_mask = value; in musb_writeh()
1470 s->ep[s->idx].fifoaddr[0] = value; in musb_writeh()
1472 s->buf + ((value << 3) & 0x7ff ); in musb_writeh()
1475 s->ep[s->idx].fifoaddr[1] = value; in musb_writeh()
1477 s->buf + ((value << 3) & 0x7ff); in musb_writeh()
1481 musb_ep_writeh(s, s->idx, addr & 0xf, value); in musb_writeh()
1486 musb_busctl_writeh(s, ep, addr & 0x7, value); in musb_writeh()
1491 musb_ep_writeh(s, ep, addr & 0xf, value); in musb_writeh()
1496 musb_write_fifo(s->ep + ep, value & 0xff); in musb_writeh()
1497 musb_write_fifo(s->ep + ep, (value >> 8) & 0xff); in musb_writeh()
1501 musb_writeb(s, addr, value & 0xff); in musb_writeh()
1502 musb_writeb(s, addr | 1, value >> 8); in musb_writeh()
1524 static void musb_writew(void *opaque, hwaddr addr, uint32_t value) in musb_writew() argument
1532 musb_write_fifo(s->ep + ep, value & 0xff); in musb_writew()
1533 musb_write_fifo(s->ep + ep, (value >> 8 ) & 0xff); in musb_writew()
1534 musb_write_fifo(s->ep + ep, (value >> 16) & 0xff); in musb_writew()
1535 musb_write_fifo(s->ep + ep, (value >> 24) & 0xff); in musb_writew()