Is the following code correct in hw/omap_dss.c: case 0x58: /* RFBI_READ */ if ((s->rfbi.control & (1 << 2)) && s->rfbi.chip[0]) s->rfbi.rxbuf = s->rfbi.chip[0]->read(s->rfbi.chip[0]->opaque, 1); else if ((s->rfbi.control & (1 << 3)) && s->rfbi.chip[1]) s->rfbi.rxbuf = s->rfbi.chip[0]->read(s->rfbi.chip[0]->opaque, 1); if (!-- s->rfbi.pixels) omap_rfbi_transfer_stop(s); break;
case 0x5c: /* RFBI_STATUS */ if ((s->rfbi.control & (1 << 2)) && s->rfbi.chip[0]) s->rfbi.rxbuf = s->rfbi.chip[0]->read(s->rfbi.chip[0]->opaque, 0); else if ((s->rfbi.control & (1 << 3)) && s->rfbi.chip[1]) s->rfbi.rxbuf = s->rfbi.chip[0]->read(s->rfbi.chip[0]->opaque, 0); if (!-- s->rfbi.pixels) omap_rfbi_transfer_stop(s); break; It checks chip[1] in the "else if" statement. But notice it actually operates on chip[0]. Is this intentional or should it use chip[1]? Reported-by: Dr David Alan Gilbert <davidagilb...@uk.ibm.com>