From: Mark Rutland <mark.rutland@arm.com>
To: York Sun <york.sun@nxp.com>
Cc: linux-edac@vger.kernel.org, morbidrsa@gmail.com,
oss@buserror.net, stuart.yoder@nxp.com, bp@alien8.de,
Rob Herring <robh+dt@kernel.org>,
Doug Thompson <dougthompson@xmission.com>,
mchehab@kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [Patch v3 08/11] driver/edac/fsl_ddr: Add support of little endian
Date: Mon, 8 Aug 2016 16:39:22 +0100 [thread overview]
Message-ID: <20160808153922.GG12649@leverpostej> (raw)
In-Reply-To: <1470351518-22404-9-git-send-email-york.sun@nxp.com>
On Thu, Aug 04, 2016 at 03:58:33PM -0700, York Sun wrote:
> Get endianness from device tree. Both big endian and little endian
> are supported. Default to big endian for backward compatibility to
> MPC85xx.
>
> Signed-off-by: York Sun <york.sun@nxp.com>
>
> ---
> Change log
> v3: no change
> v2: Separated from "Add support for ARM-based SoCs" patch
>
> .../fsl/ddr.txt} | 6 ++
> drivers/edac/fsl_ddr_edac.c | 83 ++++++++++++++--------
> 2 files changed, 58 insertions(+), 31 deletions(-)
> rename Documentation/devicetree/bindings/{powerpc/fsl/mem-ctrlr.txt => memory-controllers/fsl/ddr.txt} (74%)
>
> diff --git a/Documentation/devicetree/bindings/powerpc/fsl/mem-ctrlr.txt b/Documentation/devicetree/bindings/memory-controllers/fsl/ddr.txt
> similarity index 74%
> rename from Documentation/devicetree/bindings/powerpc/fsl/mem-ctrlr.txt
> rename to Documentation/devicetree/bindings/memory-controllers/fsl/ddr.txt
> index f87856f..62623f9 100644
> --- a/Documentation/devicetree/bindings/powerpc/fsl/mem-ctrlr.txt
> +++ b/Documentation/devicetree/bindings/memory-controllers/fsl/ddr.txt
> @@ -7,6 +7,10 @@ Properties:
> "fsl,qoriq-memory-controller".
> - reg : Address and size of DDR controller registers
> - interrupts : Error interrupt of DDR controller
> +- little-endian : Specifies little-endian access to registers
> +- big-endian : Specifies big-endian access to registers
> +
> +If both little-endian and big-endian are omitted, big-endian will be used.
The binding looks fine.
> @@ -470,6 +483,13 @@ int fsl_ddr_mc_err_probe(struct platform_device *op)
> mci->ctl_name = pdata->name;
> mci->dev_name = pdata->name;
>
> + if (of_find_property(op->dev.of_node, "little-endian", NULL))
Use: if (of_property_read_bool(dev.of_node, "little-endian"))
> + little_endian = true;
> + else if (of_find_property(op->dev.of_node, "big-endian", NULL))
Use: else if (of_property_read_bool(dev.of_node, "big-endian"))
> + little_endian = false;
> + else
> + little_endian = false;
> +
With those fixed up:
Acked-by: Mark Rutland <mark.rutland@arm.com>
Thanks,
Mark.
next prev parent reply other threads:[~2016-08-08 15:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1470351518-22404-1-git-send-email-york.sun@nxp.com>
2016-08-04 22:58 ` [Patch v3 08/11] driver/edac/fsl_ddr: Add support of little endian York Sun
[not found] ` <1470351518-22404-9-git-send-email-york.sun-3arQi8VN3Tc@public.gmane.org>
2016-08-08 8:50 ` Borislav Petkov
2016-08-08 15:26 ` york sun
2016-08-08 15:39 ` Mark Rutland [this message]
2016-08-04 22:58 ` [Patch v3 11/11] arm64: Update device tree for Layerscape SoCs York Sun
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=20160808153922.GG12649@leverpostej \
--to=mark.rutland@arm.com \
--cc=bp@alien8.de \
--cc=devicetree@vger.kernel.org \
--cc=dougthompson@xmission.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=morbidrsa@gmail.com \
--cc=oss@buserror.net \
--cc=robh+dt@kernel.org \
--cc=stuart.yoder@nxp.com \
--cc=york.sun@nxp.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).