From: David Daney <ddaney.cavm@gmail.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: devicetree-discuss@lists.ozlabs.org,
Rob Herring <rob.herring@calxeda.com>,
spi-devel-general@lists.sourceforge.net,
linux-kernel@vger.kernel.org, linux-mips@linux-mips.org,
David Daney <david.daney@cavium.com>
Subject: Re: [PATCH 2/2] spi: Add SPI master controller for OCTEON SOCs.
Date: Tue, 21 Aug 2012 12:30:18 -0700 [thread overview]
Message-ID: <5033E1CA.8050107@gmail.com> (raw)
In-Reply-To: <20120520054657.091DA3E03B8@localhost>
On 05/19/2012 10:46 PM, Grant Likely wrote:
> On Fri, 11 May 2012 14:34:46 -0700, David Daney <ddaney.cavm@gmail.com> wrote:
>> From: David Daney <david.daney@cavium.com>
>>
>> Add the driver, link it into the kbuild system and provide device tree
>> binding documentation.
>>
>> Signed-off-by: David Daney <david.daney@cavium.com>
>
> Some comments below, but you can add my a-b:
>
> Acked-by: Grant Likely <grant.likely@secretlab.ca>
>
[...]
>> + p->register_base = (u64)devm_ioremap(&pdev->dev, res_mem->start,
>> + resource_size(res_mem));
>
> Nasty cast. p->register_base needs to be an __iomem pointer
> variable.
No, it is only ever used as an argument to cvmx_{read,write}_csr(),
which want the u64 type.
> The fact taht cvmx_read_csr accepts a uint64_t instead of
> an __iomem pointer looks really wrong. Why is it written that way?
Register addresses on OCTEON are 64-bits wide. In a 32-bit kernel,
pointers are only 32-bits wide. Thus was born the cvmx_read_csr()
function that takes a u64 address.
We no longer support 32-bit kernels, but the legacy of the interface
lives on.
David Daney
next prev parent reply other threads:[~2012-08-21 19:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-11 21:34 [PATCH 0/2] MIPS/spi: New driver for SPI master controller for OCTEON SOCs David Daney
2012-05-11 21:34 ` [PATCH 1/2] MIPS: OCTEON: Add register definitions for SPI host hardware David Daney
2012-05-14 20:02 ` Linus Walleij
2012-05-20 5:23 ` Grant Likely
2012-05-11 21:34 ` [PATCH 2/2] spi: Add SPI master controller for OCTEON SOCs David Daney
2012-05-14 5:46 ` Shubhrajyoti Datta
2012-05-14 18:13 ` David Daney
2012-05-20 5:26 ` Grant Likely
2012-05-14 20:07 ` Linus Walleij
2012-05-20 5:46 ` Grant Likely
2012-08-21 19:30 ` David Daney [this message]
2012-08-21 19:49 ` [2/2] " Guenter Roeck
2012-08-21 20:38 ` David Daney
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=5033E1CA.8050107@gmail.com \
--to=ddaney.cavm@gmail.com \
--cc=david.daney@cavium.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=rob.herring@calxeda.com \
--cc=spi-devel-general@lists.sourceforge.net \
/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).