Patchwork Re: [PATCH v2] rtc: snvs: add Freescale rtc-snvs driver

login
register
mail settings
Submitter Kim Phillips
Date July 6, 2012, 10:56 p.m.
Message ID <20120706175634.a98fb53a9a1fdf40bd4febb3@freescale.com>
Download mbox | patch
Permalink /patch/169550/
State New
Headers show

Comments

Kim Phillips - July 6, 2012, 10:56 p.m.
On Fri, 6 Jul 2012 08:22:56 +0800
Shawn Guo <shawn.guo@linaro.org> wrote:

> On Thu, Jul 05, 2012 at 06:28:29PM -0500, Kim Phillips wrote:
> > On Wed, 4 Jul 2012 23:38:14 +0800
> > Shawn Guo <shawn.guo@linaro.org> wrote:
> > 
> > > +static const struct of_device_id __devinitconst snvs_dt_ids[] = {
> > > +	{ .compatible = "fsl,sec-v4.0-mon-rtc-lp", },
> > 
> > the driver should be compatible with "fsl,sec-v4.0-mon", and its
> > probe function search for "fsl,sec-v4.0-mon-rtc-lp" sub-compatibles
> > (and possibly "fsl,sec-v4.0-mon-rtc-hp" in the future?).
> > 
> So you think snvs is all about rtc (lp and hp), nothing else?  If that

no, I'm aware that it's more than a couple of RTCs.

> is true, it's reasonable to do what you suggested here.  Otherwise, we
> should have a snvs driver be compatible with "fsl,sec-v4.0-mon", and
> this driver should be responsible for populate all the sub-devices of
> snvs, rtc-lp, rtc-hp, and others.  In the latter case, rtc-snvs should
> just stay as it stands right now.

but it doesn't function as it stands right now, at least on Power.
The compatible in the device tree's sec_mon node "fsl,sec-v4.0-mon"
and the driver's "fsl,sec-v4.0-mon-rtc-lp" don't match.  Here are
the device tree changes I used:


btw, I don't see any imx6q.dtsi changes.

Kim

Patch

diff --git a/arch/powerpc/boot/dts/fsl/qoriq-sec4.2-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-sec4.2-0.dtsi
index 7990e0d..14c933b 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-sec4.2-0.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-sec4.2-0.dtsi
@@ -104,6 +104,14 @@  crypto: crypto@300000 {
 
 sec_mon: sec_mon@314000 {
        compatible = "fsl,sec-v4.2-mon", "fsl,sec-v4.0-mon";
+       #address-cells = <1>;
+       #size-cells = <1>;
+       ranges = <0 0x314000 0x1000>;
        reg = <0x314000 0x1000>;
        interrupts = <93 2 0 0>;
+
+       sec_mon_rtc_lp@34 {
+               compatible = "fsl,sec-v4.2-mon-rtc-lp", "fsl,sec-v4.0-mon-rtc-lp";
+               reg = <0x34 0x58>;
+       };
 };