[Top] [All Lists]

Re: [PATCH 2/2] spi: Add SPI master controller for OCTEON SOCs.

To: Grant Likely <>
Subject: Re: [PATCH 2/2] spi: Add SPI master controller for OCTEON SOCs.
From: David Daney <>
Date: Tue, 21 Aug 2012 12:30:18 -0700
Cc:, Rob Herring <>,,,, David Daney <>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=Jd1d6N8N22IftvL+uqboOcHwz7DbOyyaDHMpm67Sg/c=; b=kR4w3s42AfFNa+shw4hUpUBW/EGnntIpYwEEXKgQ/XRUQkb66YT7YbeMf/QLCIjVin w9tv3jS3UwNXuNBbuKY7xWLqgnJThFj0l13RjP0sCi+C5/a9cS8unIs/xFPgiYz/HP3O F+c8ae+JMnbKDdzsY8p5KNx7pePtb2Og8SQ/gtwgoRdcEwgdNWEIH+DImeVml2Hr9sd0 Hn8qDR3TKUxljnbP4R8SwQgBCW7QBuBd4wPO5rWiRGOrp/iI17O3hjZPMZ2f0YknTw/k N6W4eVLMs35gNVYBKfAjTL2qBbjBhWuDCbX0Dq/2Op7tUphKVTMpd6s9FQTBWSA/feWI O9XQ==
In-reply-to: <20120520054657.091DA3E03B8@localhost>
List-archive: <>
List-help: <>
List-id: linux-mips <>
List-owner: <>
List-post: <>
List-software: Ecartis version 1.0.0
List-subscribe: <>
List-unsubscribe: <>
References: <> <> <20120520054657.091DA3E03B8@localhost>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0
On 05/19/2012 10:46 PM, Grant Likely wrote:
On Fri, 11 May 2012 14:34:46 -0700, David Daney <> wrote:
From: David Daney <>

Add the driver, link it into the kbuild system and provide device tree
binding documentation.

Signed-off-by: David Daney <>

Some comments below, but you can add my a-b:

Acked-by: Grant Likely <>

+       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

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

<Prev in Thread] Current Thread [Next in Thread>