From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-in-11.arcor-online.net (mail-in-11.arcor-online.net [151.189.21.51]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.arcor.de", Issuer "Thawte Premium Server CA" (verified OK)) by ozlabs.org (Postfix) with ESMTP id 41720DDEC7 for ; Fri, 22 Jun 2007 17:56:34 +1000 (EST) In-Reply-To: <20070622033158.GA21419@localhost.localdomain> References: <1182298510.5674.358.camel@rhino> <1182358772.5674.383.camel@rhino> <20070622033158.GA21419@localhost.localdomain> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: From: Segher Boessenkool Subject: Re: [PATCH v3] Create add_rtc() function to enable the RTC CMOS driver Date: Fri, 22 Jun 2007 09:56:24 +0200 To: David Gibson Cc: linuxppc-dev , paulus@samba.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , > Hrm. It seems rather specific. Can we do this more generally, by > creating an of_platform device which binds to rtc nodes, then > registers an appropriate platform device for each so that the generic > rtc drivers pick them up. Obviously we'd need some sort of table > mapping the device node compatible properties to the appropriate > platform device names. >> + * RTC_PORT(x) is hardcoded in asm/mc146818rtc.h. Verify that the >> + * address provided by the device node matches. >> + */ >> + if (res.start != RTC_PORT(0)) { >> + of_node_put(np); >> + return -ENODEV; >> + } > > This looks totally bogus. If we have a device tree we should be using > the address information from there, not using hardcoded magic. Sounds > like asm/mc146818rtc.h needs some serious fixing. Both of your comments would be nice extensions (and the right way forwards), but Wade's patch is good as-is already. Segher