/* Retrieve a frame from the receive FIFO TO-DO: support frames of size != 8  */
static void spi_a2f_hw_rxfifo_get(struct spi_a2f *c, unsigned int wb, void *rx, int i)
/* Retrieve a frame from the receive FIFO TO-DO: support frames of size != 8  */
static void spi_a2f_hw_rxfifo_get(struct spi_a2f *c, unsigned int wb, void *rx, int i)
{
	int j;
	unsigned int d = readl(&MSS_SPI(c)->spi_rx_data);
	unsigned char *p = (unsigned char *)rx;
	if (p) {
		for (j = wb-1; j >= 0; j--) {
			p[i*wb + j] = d & 0xFF;
			d >>= 8;
		}
	}
}