Re: [PATCH v2 1/3] spi: add xtfpga SPI controller driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Wed, Mar 12, 2014 at 04:21:03PM +0400, Max Filippov wrote:

> +	case 16:
> +		/* Bytes that should go out earlier have lower addresses,
> +		 * but the hardware operates with 16 bit words and transmits
> +		 * higher bits first. Thus data in memory is in BE order.
> +		 */
> +		xspi->data = (xspi->data << 16) | be16_to_cpu(v);
> +		xspi->data_sz += 2;
> +		break;

Are you sure you need to do this byte swap?  SPI words are big endian so
if you are running on a little endian processor if you are transmitting
16 bit words you should see the data getting swapped on the bus (this is
why I say you should never have more than 8 bits per word for regmap).

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux