devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
	Simon Horman <horms@verge.net.au>,
	Magnus Damm <magnus.damm@gmail.com>,
	linux-renesas-soc@vger.kernel.org,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Linux PM list <linux-pm@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH/RFC v2 04/11] soc: renesas: rcar: Add DT support for SYSC PM domains
Date: Fri, 26 Feb 2016 18:28:55 +0200	[thread overview]
Message-ID: <5625748.8DscGPjtYP@avalon> (raw)
In-Reply-To: <CAMuHMdVo2V7Ez5g8ZW74w-QWiwS8i2mbYeCjOU9brxRzNjMAdg@mail.gmail.com>

Hi Geert,

On Friday 26 February 2016 16:41:27 Geert Uytterhoeven wrote:
> On Mon, Feb 15, 2016 at 11:51 PM, Laurent Pinchart wrote:
> >>  drivers/soc/renesas/pm-rcar.c | 327 ++++++++++++++++++++++++++++++++++++
> >>  1 file changed, 327 insertions(+)
> >> 
> >> diff --git a/drivers/soc/renesas/pm-rcar.c
> >> b/drivers/soc/renesas/pm-rcar.c
> >> index cc684e9cc8db5d1c..c0540934126e58eb 100644
> >> --- a/drivers/soc/renesas/pm-rcar.c
> >> +++ b/drivers/soc/renesas/pm-rcar.c
> >> 
> >> +static int __init rcar_init_pm_domains(void)
> >> +{
> >> +     const struct of_device_id *match;
> >> +     struct device_node *np, *pmd;
> >> +     bool scanned = false;
> >> +     void __iomem *base;
> >> +     int ret = 0;
> >> +
> >> +     for_each_matching_node_and_match(np, rcar_sysc_matches, &match) {
> >> +             u32 syscier = 0;
> >> +
> >> +             rcar_gen = (uintptr_t)match->data;
> >> +
> >> +             base = of_iomap(np, 0);
> >> +             if (!base) {
> >> +                     pr_warn("%s cannot map reg 0\n", np->full_name);
> >> +                     continue;
> >> +             }
> >> +
> >> +             rcar_sysc_base = base;  // FIXME conflicts with
> >> rcar_sysc_init() +
> >> +             pmd = of_get_child_by_name(np, "pm-domains");
> >> +             if (!pmd) {
> >> +                     pr_warn("%s lacks pm-domains node\n",
> >> np->full_name);
> > 
> > Shouldn't you call iounmap() here ?
> 
> Yes. Will fix.
> 
> >> +             /*
> >> +              * Enable all interrupt sources, but do not use interrupt
> >> +              * handler
> >> +              */
> >> +             pr_debug("%s: syscier = 0x%08x\n", np->full_name, syscier);
> >> +             iowrite32(syscier, rcar_sysc_base + SYSCIER);
> >> +             iowrite32(0, rcar_sysc_base + SYSCIMR);
> > 
> > Shouldn't the SYSCIMR bits be set to 1 to mask interrupts ?
> 
> That would work, too. It doesn't matter much, as the driver doesn't use
> interrupts, so they stay disabled at the GIC level.

You're right, but as you write to the SYSCIMR register anyway, I'd feel safer 
if interrupts were masked in it too.

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2016-02-26 16:28 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-15 21:16 [PATCH/RFC v2 00/11] ARM/arm64: renesas: Add SYSC PM Domain DT Support Geert Uytterhoeven
2016-02-15 21:16 ` [PATCH/RFC v2 01/11] PM / Domains: Add DT bindings for the R-Car System Controller Geert Uytterhoeven
2016-02-15 23:08   ` Laurent Pinchart
2016-02-15 23:33     ` Laurent Pinchart
2016-02-16  7:15     ` Geert Uytterhoeven
2016-02-18 14:38   ` Rob Herring
2016-02-18 17:18     ` Geert Uytterhoeven
2016-02-18 21:14       ` Laurent Pinchart
2016-02-23 20:08       ` Rob Herring
2016-02-15 21:16 ` [PATCH/RFC v2 02/11] soc: renesas: Move pm-rcar to drivers/soc/renesas/ Geert Uytterhoeven
2016-02-15 22:12   ` Laurent Pinchart
2016-02-15 21:16 ` [PATCH/RFC v2 03/11] soc: renesas: Improve rcar_sysc_power() debug info Geert Uytterhoeven
2016-02-15 22:11   ` Laurent Pinchart
2016-02-15 21:16 ` [PATCH/RFC v2 05/11] soc: renesas: rcar: Handle clock domain devices in SYSC PM domains Geert Uytterhoeven
2016-02-15 22:08   ` Laurent Pinchart
2016-02-16  7:30     ` Geert Uytterhoeven
2016-02-16  8:02       ` Laurent Pinchart
2016-02-15 21:16 ` [PATCH/RFC v2 06/11] ARM: dts: r8a7779: Add " Geert Uytterhoeven
2016-02-15 21:16 ` [PATCH/RFC v2 08/11] ARM: dts: r8a7791: " Geert Uytterhoeven
2016-02-15 21:16 ` [PATCH/RFC v2 10/11] ARM: dts: r8a7794: " Geert Uytterhoeven
     [not found] ` <1455571020-18968-1-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
2016-02-15 21:16   ` [PATCH/RFC v2 04/11] soc: renesas: rcar: Add DT support for " Geert Uytterhoeven
2016-02-15 22:51     ` Laurent Pinchart
2016-02-17 12:45       ` Geert Uytterhoeven
2016-02-26 15:41       ` Geert Uytterhoeven
2016-02-26 16:28         ` Laurent Pinchart [this message]
2016-02-15 21:16   ` [PATCH/RFC v2 07/11] ARM: dts: r8a7790: Add " Geert Uytterhoeven
2016-02-15 21:16   ` [PATCH/RFC v2 09/11] ARM: dts: r8a7793: " Geert Uytterhoeven
2016-02-15 21:17   ` [PATCH/RFC v2 11/11] arm64: dts: r8a7795: " Geert Uytterhoeven
2016-02-27  1:53 ` [PATCH/RFC v2 00/11] ARM/arm64: renesas: Add SYSC PM Domain DT Support Laurent Pinchart
2016-02-28  8:55   ` Geert Uytterhoeven
2016-02-28 15:04     ` Laurent Pinchart
2016-02-28 19:26       ` Laurent Pinchart

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=5625748.8DscGPjtYP@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=horms@verge.net.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.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).