linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: geert@linux-m68k.org (Geert Uytterhoeven)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 08/20] ARM: shmobile: r8a7779: Add helper to read mode pins
Date: Wed, 16 Apr 2014 09:29:33 +0200	[thread overview]
Message-ID: <CAMuHMdXVAaU=eEBr4hwfbz3TGL+k0NHxGtzh-uuzFwuUqeNA9Q@mail.gmail.com> (raw)
In-Reply-To: <1397613454-7522-9-git-send-email-horms+renesas@verge.net.au>

On Wed, Apr 16, 2014 at 3:57 AM, Simon Horman
<horms+renesas@verge.net.au> wrote:
> Add and use helper to read mode pins.
> This will be re-used when moving marzen-reference to
> the common clock framework.
>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>

> --- a/arch/arm/mach-shmobile/setup-r8a7779.c
> +++ b/arch/arm/mach-shmobile/setup-r8a7779.c
> @@ -802,6 +802,20 @@ void __init r8a7779_add_standard_devices_dt(void)
>         of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
>  }
>
> +#define MODEMR         0xffcc0020
> +
> +u32 __init r8a7779_read_mode_pins(void)
> +{
> +       void __iomem *modemr = ioremap_nocache(MODEMR, PAGE_SIZE);
> +       u32 mode;
> +
> +       BUG_ON(!modemr);
> +       mode = ioread32(modemr);
> +       iounmap(modemr);
> +
> +       return mode;
> +}

No caching, cfr. rcar_gen2_read_mode_pins()?

BTW, I know you don't trust "R-Car Gen1" similarities, but the code for
r8a7778 is identical. And this is code, not DT, so perhaps this can be
rcar_gen_read_mode_pins() in arch/arm/mach-shmobile/setup-rcar-gen1.c?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at 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

  reply	other threads:[~2014-04-16  7:29 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16  1:57 [PATCH v5 00/20] ARM: shmobile: r8a7779, marzen: CCF and multiplatform Simon Horman
2014-04-16  1:57 ` [PATCH v5 01/20] clk: shmobile: r8a7779: Add clocks support Simon Horman
2014-04-16  9:27   ` Laurent Pinchart
2014-04-16  1:57 ` [PATCH v5 02/20] clk: shmobile: r8a7779: Add MSTP clock support Simon Horman
2014-04-16  7:19   ` Geert Uytterhoeven
2014-04-16  1:57 ` [PATCH v5 03/20] ARM: shmobile: r8a7779: Add clock index macros for DT sources Simon Horman
2014-04-16  1:57 ` [PATCH v5 04/20] ARM: shmobile: r8a7779: Add clocks Simon Horman
2014-04-16  9:26   ` Laurent Pinchart
2014-04-16  1:57 ` [PATCH v5 05/20] ARM: shmobile: Sync Marzen DTS with Marzen reference DTS Simon Horman
2014-04-16  1:57 ` [PATCH v5 06/20] ARM: shmobile: marzen: Specify external clock frequency in DT Simon Horman
2014-04-16  1:57 ` [PATCH v5 07/20] ARM: shmobile: r8a7779: Reference clocks Simon Horman
2014-04-16  1:57 ` [PATCH v5 08/20] ARM: shmobile: r8a7779: Add helper to read mode pins Simon Horman
2014-04-16  7:29   ` Geert Uytterhoeven [this message]
2014-04-16  7:55     ` Simon Horman
2014-04-16  8:12       ` Geert Uytterhoeven
2014-04-16  8:26         ` Simon Horman
2014-04-16  1:57 ` [PATCH v5 09/20] ARM: shmobile: r8a7779: Move r8a7779_earlytimer_init to clock-r8a7779.c Simon Horman
2014-04-16  1:57 ` [PATCH v5 10/20] ARM: shmobile: marzen-reference: Move clock and OF device initialisation into board code Simon Horman
2014-04-16  1:57 ` [PATCH v5 11/20] ARM: shmobile: r8a7779: Do not include sh_clk.h in r8a7779.h Simon Horman
2014-04-16  1:57 ` [PATCH v5 12/20] ARM: shmobile: r8a7779: Initial multiplatform support Simon Horman
2014-04-16  1:57 ` [PATCH v5 13/20] ARM: shmobile: marzen-reference: Initialize CPG device Simon Horman
2014-04-16  1:57 ` [PATCH v5 14/20] ARM: shmobile: marzen-reference: Instantiate clkdevs for SCIF and TMU Simon Horman
2014-04-16  1:57 ` [PATCH v5 15/20] ARM: shmobile: marzen-reference: Work around core clock issues Simon Horman
2014-04-16  1:57 ` [PATCH v5 16/20] ARM: shmobile: marzen: Add to shmobile defconfig Simon Horman
2014-04-16  1:57 ` [PATCH v5 17/20] ARM: shmobile: Remove non-multiplatform Marzen reference support Simon Horman
2014-04-16  1:57 ` [PATCH v5 18/20] ARM: shmobile: Let Marzen multiplatform boot with Marzen DTB Simon Horman
2014-04-16  1:57 ` [PATCH v5 19/20] ARM: shmobile: Remove Marzen reference DTS Simon Horman
2014-04-16  1:57 ` [PATCH v5 20/20] ARM: shmobile: marzen-reference: Remove legacy clock support Simon Horman

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='CAMuHMdXVAaU=eEBr4hwfbz3TGL+k0NHxGtzh-uuzFwuUqeNA9Q@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=linux-arm-kernel@lists.infradead.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).