Re: Subject: [PATCH] serial:ifx6x60:add swap_buf_32 function in case SPI word width is 32 bits

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

 



> is 16 bits. But per our experiment and validation on medfield platform, 16 bit
> word width cannot cover all scenarioes, 32 bits word width is a better choice
> to avoid SPI FIFO overrun. Therefore, SPI controller is likely to configure its
> word width as either 16 bits or 32 bits. This patch is to implement 2 functions
> (swap_buf_16() and swap_buf_32()) to adapt the two configurations.

And how will you get both to work with the same kernel, which is the way
Linux wants to work (and avoids the nasty mess some other embedded
platforms have gotten themselves into).

What you probably want to do is is put a 16/32bit flag into the platform
data and then in ifx_spi_spi_probe() just do


	if (pl_data->spi_32)
		ifx_dev->swap = swap_buf_32;
	else
		ifx_dev->swap = swap_buf;


then call

	ifx_dev->swap_buf()

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux