From: Grant Likely <grant.likely@secretlab.ca>
To: "Richard Röjfors" <richard.rojfors@pelagicore.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Paul Mundt <lethal@linux-sh.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-embedded@vger.kernel.org
Subject: Re: xilinx_spi in linux-next
Date: Thu, 4 Feb 2010 07:36:05 -0700 [thread overview]
Message-ID: <fa686aa41002040636ubb0e156ybae9774b27bfe4f1@mail.gmail.com> (raw)
In-Reply-To: <4B6A8E4A.5020204@pelagicore.com>
[cc'ing linux-kernel & linux-embedded]
On Thu, Feb 4, 2010 at 2:07 AM, Richard Röjfors
<richard.rojfors@pelagicore.com> wrote:
> On 02/04/2010 05:14 AM, Andrew Morton wrote:
>>
>> Breaks sparc64 allmodconfig:
>>
>>
>> drivers/spi/xilinx_spi.c: In function `xspi_write32_be':
>> drivers/spi/xilinx_spi.c:108: error: implicit declaration of function
>> `iowrite32be'
>> drivers/spi/xilinx_spi.c: In function `xspi_read32_be':
>> drivers/spi/xilinx_spi.c:113: error: implicit declaration of function
>> `ioread32be'
>
> I did a quick grep in the sparc's arch tree and the big endian versions of
> io(read/write) are not implemented. So the driver can not be compiled on
> sparc,
> I think we have to put harder limits in the Kconfig. The driver has not
> worked on sparc
> before anyway.
I can easily tighten up the Kconfig limits (ARM has the same problem),
but I'd like to know what the right thing to do here is to write a
portable driver. This device is implemented on a Xilinx FPGA, so it
is totally feasable it to be wired up to any architecture, especially
on embedded stuff. So far it works with PowerPC, Microblaze and x86,
and it will most likely show up on ARM in the near future.
The most likely deviation is byte lane ordering either being big or
little endian, hence the driver using both io{read,write}32() and
io{read,write}32be(), but the 'be' variants aren't implemented on all
architectures. What's a driver author to do when trying to write
portable code?
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
parent reply other threads:[~2010-02-04 14:36 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <4B6A8E4A.5020204@pelagicore.com>]
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=fa686aa41002040636ubb0e156ybae9774b27bfe4f1@mail.gmail.com \
--to=grant.likely@secretlab.ca \
--cc=akpm@linux-foundation.org \
--cc=lethal@linux-sh.org \
--cc=linux-embedded@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=richard.rojfors@pelagicore.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;
as well as URLs for NNTP newsgroup(s).