From patchwork Fri Jul 6 22:56:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kim Phillips X-Patchwork-Id: 169550 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-ee0-f56.google.com (mail-ee0-f56.google.com [74.125.83.56]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 423612C0083 for ; Sat, 7 Jul 2012 08:58:44 +1000 (EST) Received: by eeke53 with SMTP id e53sf6170869eek.11 for ; Fri, 06 Jul 2012 15:58:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:x-forefront-antispam-report:x-spamscore :x-bigfish:date:from:to:cc:subject:message-id:in-reply-to:references :organization:x-mailer:mime-version:x-originatororg :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-google-group-id:list-post :list-help:list-archive:sender:list-subscribe:list-unsubscribe :content-type; bh=Pl+bCFtk4ikSd/F/Wy1vndnVSaSL2770b+j/vm6g4oA=; b=acHWS2SkHg/g4SG9BDXb6t1iy8RaWCG0L7mSFm8woYzTuBONuVkbra9vAQHStf7qo4 GjPWGEl5HCkYS4AdCGYjOUT/pVZj4zg4UeeIZGuDb3KIignH9CKsRoSEM/p8Vds0yjOp EBJm27RMWDPdvlD+CC/odvK90xHUWHieXdO/Q= Received: by 10.216.115.69 with SMTP id d47mr25917weh.9.1341615520892; Fri, 06 Jul 2012 15:58:40 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.180.90.195 with SMTP id by3ls1803695wib.4.gmail; Fri, 06 Jul 2012 15:58:39 -0700 (PDT) Received: by 10.216.9.202 with SMTP id 52mr1066659wet.7.1341615519397; Fri, 06 Jul 2012 15:58:39 -0700 (PDT) Received: by 10.216.9.202 with SMTP id 52mr1066658wet.7.1341615519381; Fri, 06 Jul 2012 15:58:39 -0700 (PDT) Received: from ch1outboundpool.messaging.microsoft.com (ch1ehsobe005.messaging.microsoft.com. [216.32.181.185]) by gmr-mx.google.com with ESMTPS id a5si1064660wiy.0.2012.07.06.15.58.38 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 06 Jul 2012 15:58:39 -0700 (PDT) Received-SPF: neutral (google.com: 216.32.181.185 is neither permitted nor denied by best guess record for domain of R1AAHA@freescale.com) client-ip=216.32.181.185; Received: from mail68-ch1-R.bigfish.com (10.43.68.233) by CH1EHSOBE012.bigfish.com (10.43.70.62) with Microsoft SMTP Server id 14.1.225.23; Fri, 6 Jul 2012 22:56:29 +0000 Received: from mail68-ch1 (localhost [127.0.0.1]) by mail68-ch1-R.bigfish.com (Postfix) with ESMTP id 20C4FA02F4; Fri, 6 Jul 2012 22:56:29 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: -2 X-BigFish: VS-2(zz98dI1432Izz1202hzz8275dhz2dh2a8h668h839h944hd24he5bhf0ah107ah) Received: from mail68-ch1 (localhost.localdomain [127.0.0.1]) by mail68-ch1 (MessageSwitch) id 1341615386345311_5491; Fri, 6 Jul 2012 22:56:26 +0000 (UTC) Received: from CH1EHSMHS001.bigfish.com (snatpool2.int.messaging.microsoft.com [10.43.68.236]) by mail68-ch1.bigfish.com (Postfix) with ESMTP id 487E94C0218; Fri, 6 Jul 2012 22:56:26 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS001.bigfish.com (10.43.70.1) with Microsoft SMTP Server (TLS) id 14.1.225.23; Fri, 6 Jul 2012 22:56:26 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server (TLS) id 14.2.298.5; Fri, 6 Jul 2012 17:58:33 -0500 Received: from x9.am.freescale.net (x9.am.freescale.net [10.82.120.9]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with SMTP id q66MwUQM004529; Fri, 6 Jul 2012 15:58:30 -0700 Date: Fri, 6 Jul 2012 17:56:34 -0500 From: Kim Phillips To: Shawn Guo CC: Alessandro Zummo , Stephen Boyd , Sascha Hauer , , Subject: [rtc-linux] Re: [PATCH v2] rtc: snvs: add Freescale rtc-snvs driver Message-ID: <20120706175634.a98fb53a9a1fdf40bd4febb3@freescale.com> In-Reply-To: <20120706002254.GB20175@S2101-09.ap.freescale.net> References: <1341416294-3194-1-git-send-email-shawn.guo@linaro.org> <20120705182829.d13d6992406e02e1024552e3@freescale.com> <20120706002254.GB20175@S2101-09.ap.freescale.net> Organization: Freescale Semiconductor, Inc. X-Mailer: Sylpheed 3.2.0beta5 (GTK+ 2.24.10; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-Original-Sender: kim.phillips@freescale.com X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 216.32.181.185 is neither permitted nor denied by best guess record for domain of R1AAHA@freescale.com) smtp.mail=R1AAHA@freescale.com Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , 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>; + }; };