All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH/RFC 2/6] boot-mode-reg: Add R-Car Gen2 driver
Date: Fri, 30 Oct 2015 15:47:51 +0000	[thread overview]
Message-ID: <1457864.DILdaN6aDz@avalon> (raw)
In-Reply-To: <1444892377-10170-3-git-send-email-horms+renesas@verge.net.au>

Hi Simon,

On Monday 26 October 2015 14:50:08 Simon Horman wrote:
> On Fri, Oct 23, 2015 at 03:37:46PM +0300, Laurent Pinchart wrote:
> > On Thursday 15 October 2015 16:59:18 Simon Horman wrote:
> >> On Thu, Oct 15, 2015 at 09:09:13AM +0200, Geert Uytterhoeven wrote:
> >>> On Thu, Oct 15, 2015 at 8:59 AM, Simon Horman wrote:
> >>>> --- /dev/null
> >>>> +++ b/drivers/misc/boot-mode-reg/rcar-gen2.c
> >>>> @@ -0,0 +1,61 @@
> >>>> +/*
> >>>> + * R-Car Gen2 Boot Mode Register Driver
> >>>> 
> >>>> +#define MODEMR 0xe6160060
> >>> 
> >>> Shouldn't this come from DT?
> >> 
> >> If its a property of the SoC then I'm not sure that it needs to as its a
> >> known value for the supported SoCs.
> > 
> > Hypervisors (at least Xen) use DT to initialize memory mappings. I believe
> > we should thus describe the RST IP in DT and create an rcar-rst driver
> > that includes the code from this patch.
> 
> So we would add a binding, say a compat string and a register range.
> That might look like this:
> 
> 	rst: reset-controller@e6160000 {
> 		compatible = "renesas,rst-r8a7795", "syscon";
> 		reg = <0 0xe6160000 0 0x0200>;
> 	};
> 
> The above is copped from Geerts earlier work
> "[PATCH 1/6]  reset: Add renesas,rst DT bindings"
> 
> http://www.spinics.net/lists/linux-sh/msg44800.html:
> 
> Is that binding what we are after?

That's exactly it, except that as we'll have a proper API to retrieve the boot 
mode we won't need the "syscon" compatible string.

> Would the driver do anything beyond what it currently does + using an offset
> to the base of its register range instead of the hardcoded MODEMR value (and
> changes discussed elswhere in this thread, e.g. to use soemthing like
> CLK_OF_DECLARE) ?

It should handle CPU reset in the future, but for now your description is all 
that would need to be implemented.

-- 
Regards,

Laurent Pinchart


  parent reply	other threads:[~2015-10-30 15:47 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-15  6:59 [PATCH/RFC 2/6] boot-mode-reg: Add R-Car Gen2 driver Simon Horman
2015-10-15  7:09 ` Geert Uytterhoeven
2015-10-15  7:34 ` Khiem Nguyen
2015-10-15  7:56 ` Khiem Nguyen
2015-10-15  7:59 ` Simon Horman
2015-10-15  8:00 ` Simon Horman
2015-10-23 12:37 ` Laurent Pinchart
2015-10-23 12:49 ` Laurent Pinchart
2015-10-24 17:46 ` Geert Uytterhoeven
2015-10-26  2:08 ` Laurent Pinchart
2015-10-26  5:50 ` Simon Horman
2015-10-30 15:47 ` Laurent Pinchart [this message]
2015-12-15  7:58 ` Simon Horman
2015-12-15  8:16 ` Geert Uytterhoeven
2015-12-15  8:59 ` Magnus Damm
2015-12-15  9:02 ` Geert Uytterhoeven
2015-12-16  4:32 ` Simon Horman
2015-12-16  7:40 ` Geert Uytterhoeven
2016-01-19  0:30 ` Simon Horman
2016-01-19  8:01 ` Geert Uytterhoeven
2016-01-19  9:27 ` 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=1457864.DILdaN6aDz@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.