Lines Matching refs:fifo
712 } fifo[4]; member
723 tail = s->fifo[n].state & 0xf; in stellaris_adc_fifo_read()
724 if (s->fifo[n].state & STELLARIS_ADC_FIFO_EMPTY) { in stellaris_adc_fifo_read()
727 s->fifo[n].state = (s->fifo[n].state & ~0xf) | ((tail + 1) & 0xf); in stellaris_adc_fifo_read()
728 s->fifo[n].state &= ~STELLARIS_ADC_FIFO_FULL; in stellaris_adc_fifo_read()
729 if (tail + 1 == ((s->fifo[n].state >> 4) & 0xf)) in stellaris_adc_fifo_read()
730 s->fifo[n].state |= STELLARIS_ADC_FIFO_EMPTY; in stellaris_adc_fifo_read()
732 return s->fifo[n].data[tail]; in stellaris_adc_fifo_read()
742 head = (s->fifo[n].state >> 4) & 0xf; in stellaris_adc_fifo_write()
743 if (s->fifo[n].state & STELLARIS_ADC_FIFO_FULL) { in stellaris_adc_fifo_write()
747 s->fifo[n].data[head] = value; in stellaris_adc_fifo_write()
749 s->fifo[n].state &= ~STELLARIS_ADC_FIFO_EMPTY; in stellaris_adc_fifo_write()
750 s->fifo[n].state = (s->fifo[n].state & ~0xf0) | (head << 4); in stellaris_adc_fifo_write()
751 if ((s->fifo[n].state & 0xf) == head) in stellaris_adc_fifo_write()
752 s->fifo[n].state |= STELLARIS_ADC_FIFO_FULL; in stellaris_adc_fifo_write()
798 s->fifo[n].state = STELLARIS_ADC_FIFO_EMPTY; in stellaris_adc_reset_hold()
819 return s->fifo[n].state; in stellaris_adc_read()
929 VMSTATE_UINT32(fifo[0].state, StellarisADCState),
930 VMSTATE_UINT32_ARRAY(fifo[0].data, StellarisADCState, 16),
933 VMSTATE_UINT32(fifo[1].state, StellarisADCState),
934 VMSTATE_UINT32_ARRAY(fifo[1].data, StellarisADCState, 16),
937 VMSTATE_UINT32(fifo[2].state, StellarisADCState),
938 VMSTATE_UINT32_ARRAY(fifo[2].data, StellarisADCState, 16),
941 VMSTATE_UINT32(fifo[3].state, StellarisADCState),
942 VMSTATE_UINT32_ARRAY(fifo[3].data, StellarisADCState, 16),