From patchwork Fri Jul 6 22:56:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH v2] rtc: snvs: add Freescale rtc-snvs driver From: Kim Phillips X-Patchwork-Id: 169550 Message-Id: <20120706175634.a98fb53a9a1fdf40bd4febb3@freescale.com> To: Shawn Guo Cc: Alessandro Zummo , Stephen Boyd , Sascha Hauer , , Date: Fri, 6 Jul 2012 17:56:34 -0500 On Fri, 6 Jul 2012 08:22:56 +0800 Shawn Guo 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 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 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>; + }; };