From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: chao bi <chao.bi@intel.com>
Cc: alan@linux.intel.com, linux-serial@vger.kernel.org,
richardx.r.gorby@intel.com, jun.d.chen@intel.com,
chuansheng.liu@intel.com
Subject: Re: Subject: [PATCH] serial:ifx6x60:add swap_buf_32 function in case SPI word width is 32 bits
Date: Tue, 23 Oct 2012 10:39:20 +0100 [thread overview]
Message-ID: <20121023103920.3bcb9159@pyramind.ukuu.org.uk> (raw)
In-Reply-To: <1350981170.18855.83.camel@bichao>
> 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
next prev parent reply other threads:[~2012-10-23 9:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-23 8:32 Subject: [PATCH] serial:ifx6x60:add swap_buf_32 function in case SPI word width is 32 bits chao bi
2012-10-23 9:39 ` Alan Cox [this message]
2012-10-24 6:43 ` Bi, Chao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121023103920.3bcb9159@pyramind.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=alan@linux.intel.com \
--cc=chao.bi@intel.com \
--cc=chuansheng.liu@intel.com \
--cc=jun.d.chen@intel.com \
--cc=linux-serial@vger.kernel.org \
--cc=richardx.r.gorby@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox