void ide_input_data_shorts(int dev, ushort *sect_buf, int shorts) { uchar *dbuf; volatile uchar *pbuf_even; volatile uchar *pbuf_odd; pbuf_even = (uchar *) (ATA_CURR_BASE(dev) + ATA_DATA_EVEN); pbuf_odd = (uchar *) (ATA_CURR_BASE(dev) + ATA_DATA_ODD); dbuf = (uchar *) sect_buf; while (shorts--) { EIEIO; *dbuf++ = *pbuf_even; EIEIO; *dbuf++ = *pbuf_odd; } }
void ide_input_swap_data(int dev, ulong *sect_buf, int words) { uchar i; volatile uchar *pbuf_even = (uchar *) (ATA_CURR_BASE(dev) + ATA_DATA_EVEN); volatile uchar *pbuf_odd = (uchar *) (ATA_CURR_BASE(dev) + ATA_DATA_ODD); ushort *dbuf = (ushort *) sect_buf; while (words--) { for (i = 0; i < 2; i++) { *(((uchar *) (dbuf)) + 1) = *pbuf_even; *(uchar *) dbuf = *pbuf_odd; dbuf += 1; } } }
void ide_output_data(int dev, const ulong *sect_buf, int words) { uchar *dbuf; volatile uchar *pbuf_even; volatile uchar *pbuf_odd; pbuf_even = (uchar *) (ATA_CURR_BASE(dev) + ATA_DATA_EVEN); pbuf_odd = (uchar *) (ATA_CURR_BASE(dev) + ATA_DATA_ODD); dbuf = (uchar *) sect_buf; while (words--) { EIEIO; *pbuf_even = *dbuf++; EIEIO; *pbuf_odd = *dbuf++; EIEIO; *pbuf_even = *dbuf++; EIEIO; *pbuf_odd = *dbuf++; } }
void ide_input_data(int dev, ulong *sect_buf, int words) { uchar *dbuf; volatile uchar *pbuf_even; volatile uchar *pbuf_odd; pbuf_even = (uchar *) (ATA_CURR_BASE(dev) + ATA_DATA_EVEN); pbuf_odd = (uchar *) (ATA_CURR_BASE(dev) + ATA_DATA_ODD); dbuf = (uchar *) sect_buf; while (words--) { *dbuf++ = *pbuf_even; EIEIO; SYNC; *dbuf++ = *pbuf_odd; EIEIO; SYNC; *dbuf++ = *pbuf_even; EIEIO; SYNC; *dbuf++ = *pbuf_odd; EIEIO; SYNC; } }
__weak void ide_input_data_shorts(int dev, ushort *sect_buf, int shorts) { ushort *dbuf; volatile ushort *pbuf; pbuf = (ushort *)(ATA_CURR_BASE(dev) + ATA_DATA_REG); dbuf = (ushort *)sect_buf; debug("in input data shorts base for read is %lx\n", (unsigned long) pbuf); while (shorts--) { EIEIO; *dbuf++ = *pbuf; } }
__weak void ide_input_data_shorts(int dev, ushort *sect_buf, int shorts) { insw(ATA_CURR_BASE(dev) + ATA_DATA_REG, sect_buf, shorts); }