linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH 1/2] ARM: shmobile: Add function to get SoCs revision data for R-Car Gen2
Date: Tue, 10 Feb 2015 08:41:29 +0000	[thread overview]
Message-ID: <CAMuHMdVW450ZHPE-RGfEkMfgnRa0DYKNLABvMp4s3xeqLie2QA@mail.gmail.com> (raw)
In-Reply-To: <20130107023101.GM2935@verge.net.au>

Hi Iwamatsu-san,

On Fri, Feb 6, 2015 at 2:33 AM, Nobuhiro Iwamatsu
<nobuhiro.iwamatsu.yj@renesas.com> wrote:
> SoCs of R-Car Gen2 have some revision. This adds function to get SoCs revision
> data, and change so that user can confirm from /proc/cpuinfo.

Thanks for your patch.

> --- a/arch/arm/mach-shmobile/setup-rcar-gen2.c
> +++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c

> +#define PRR 0xFF000044
> +static unsigned int __init rcar_gen2_get_revision(void)
> +{
> +       void __iomem *addr = ioremap_nocache(PRR, 4);
> +       u32 data = ioread32(addr);
> +
> +       iounmap(addr);
> +
> +       return ((data & 0xF0) >> 4) + 1;

Is there any specific reason why you're not returning the fractional part
(lowest 4 bits) of the ESx.y revision number?
I.e. why not return "(data & 0xf0) + 0x10"?

> +}

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  parent reply	other threads:[~2015-02-10  8:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-31 11:23 [PATCH 1/2] ARM: shmobile: add function declarations for sh7372 DT helper functions Guennadi Liakhovetski
2012-12-31 11:23 ` [PATCH 2/2] ARM: shmobile: add a reference DT implementation for mackerel Guennadi Liakhovetski
2013-01-09  1:51   ` Simon Horman
2013-01-07  2:31 ` [PATCH 1/2] ARM: shmobile: add function declarations for sh7372 DT helper functions Simon Horman
2015-02-06  1:33   ` [PATCH 1/2] ARM: shmobile: Add function to get SoCs revision data for R-Car Gen2 Nobuhiro Iwamatsu
2015-02-10  8:41   ` Geert Uytterhoeven [this message]
2015-02-12  7:11   ` Nobuhiro Iwamatsu

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=CAMuHMdVW450ZHPE-RGfEkMfgnRa0DYKNLABvMp4s3xeqLie2QA@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=linux-sh@vger.kernel.org \
    /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).