···120 * Only data is little endian, addr has cpu endianess121 */122static void hpi_write_words_le16(struct c67x00_device *dev, u16 addr,123- u16 *data, u16 count)124{125 unsigned long flags;126 int i;···129130 hpi_write_reg(dev, HPI_ADDR, addr);131 for (i = 0; i < count; i++)132- hpi_write_reg(dev, HPI_DATA, cpu_to_le16(*data++));133134 spin_unlock_irqrestore(&dev->hpi.lock, flags);135}···138 * Only data is little endian, addr has cpu endianess139 */140static void hpi_read_words_le16(struct c67x00_device *dev, u16 addr,141- u16 *data, u16 count)142{143 unsigned long flags;144 int i;···146 spin_lock_irqsave(&dev->hpi.lock, flags);147 hpi_write_reg(dev, HPI_ADDR, addr);148 for (i = 0; i < count; i++)149- *data++ = le16_to_cpu(hpi_read_reg(dev, HPI_DATA));150151 spin_unlock_irqrestore(&dev->hpi.lock, flags);152}···425 len--;426 }427428- hpi_write_words_le16(dev, addr, (u16 *)buf, len / 2);429 buf += len & ~0x01;430 addr += len & ~0x01;431 len &= 0x01;···456 len--;457 }458459- hpi_read_words_le16(dev, addr, (u16 *)buf, len / 2);460 buf += len & ~0x01;461 addr += len & ~0x01;462 len &= 0x01;
···120 * Only data is little endian, addr has cpu endianess121 */122static void hpi_write_words_le16(struct c67x00_device *dev, u16 addr,123+ __le16 *data, u16 count)124{125 unsigned long flags;126 int i;···129130 hpi_write_reg(dev, HPI_ADDR, addr);131 for (i = 0; i < count; i++)132+ hpi_write_reg(dev, HPI_DATA, le16_to_cpu(*data++));133134 spin_unlock_irqrestore(&dev->hpi.lock, flags);135}···138 * Only data is little endian, addr has cpu endianess139 */140static void hpi_read_words_le16(struct c67x00_device *dev, u16 addr,141+ __le16 *data, u16 count)142{143 unsigned long flags;144 int i;···146 spin_lock_irqsave(&dev->hpi.lock, flags);147 hpi_write_reg(dev, HPI_ADDR, addr);148 for (i = 0; i < count; i++)149+ *data++ = cpu_to_le16(hpi_read_reg(dev, HPI_DATA));150151 spin_unlock_irqrestore(&dev->hpi.lock, flags);152}···425 len--;426 }427428+ hpi_write_words_le16(dev, addr, (__le16 *)buf, len / 2);429 buf += len & ~0x01;430 addr += len & ~0x01;431 len &= 0x01;···456 len--;457 }458459+ hpi_read_words_le16(dev, addr, (__le16 *)buf, len / 2);460 buf += len & ~0x01;461 addr += len & ~0x01;462 len &= 0x01;