Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751327AbaLPVyQ (ORCPT ); Tue, 16 Dec 2014 16:54:16 -0500 Received: from mail-gw3-out.broadcom.com ([216.31.210.64]:13758 "EHLO mail-gw3-out.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751066AbaLPVyO (ORCPT ); Tue, 16 Dec 2014 16:54:14 -0500 X-IronPort-AV: E=Sophos;i="5.07,589,1413270000"; d="scan'208";a="53083035" Message-ID: <5490A9FC.6030305@broadcom.com> Date: Tue, 16 Dec 2014 13:54:04 -0800 From: Arun Ramamurthy User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Ray Jui , Arnd Bergmann , CC: , , , , , , Arun Ramamurthy , , , , , , Subject: Re: [PATCHv1] rtc: bcm-iproc: Add support for Broadcom iproc rtc References: <1418757750-3628-1-git-send-email-arun.ramamurthy@broadcom.com> <7947905.aK8KkUx4sY@wuerfel> <54909074.2070804@broadcom.com> <1418783023.hzNZBNCmFc@wuerfel> <549095CA.7090505@broadcom.com> In-Reply-To: <549095CA.7090505@broadcom.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14-12-16 12:27 PM, Ray Jui wrote: > > > On 12/16/2014 12:19 PM, Arnd Bergmann wrote: >> On Tuesday 16 December 2014 12:05:08 Arun Ramamurthy wrote: >>> On 14-12-16 11:42 AM, Arnd Bergmann wrote: >>>> On Tuesday 16 December 2014 11:22:30 arun.ramamurthy@broadcom.com >>>> wrote: >>>>> + rtc: iproc_rtc@0x03026000 { >>>>> + compatible = "brcm,iproc-rtc"; >>>>> + reg = spru_bbl: <0x03026000 0xC>, >>>>> + crmu_pwr_good_status: <0x0301C02C 0x14>, >>>>> + crmu_bbl_auth: <0x03024C74 0x8>; >>>>> + interrupts = spru_rtc_periodic: >>>> IRQ_TYPE_LEVEL_HIGH>, >>>>> + spru_alarm: >>>> IRQ_TYPE_LEVEL_HIGH>; >>>> >>>> The reg properties look really random, could it be that the registers >>>> are really part of some other device that contains multiple functions? >>>> >>> This RTC block is on a battery backed logic island and is accessed >>> indirectly using the spru_bbl registers. The CRMU registers are required >>> to read the power status and write to some authentication registers. >>> Without writing to these authentication >>> registers, we cannot access any of the spru_bbl registers. In conclusion >>> I don't think the CRMU register accesses can be considered as another >>> device access. Do you agree Arnd? >> >> It sounds like CRMU is some other unit aside from the RTC. Could this >> be something like a generic system controller? I think it should >> either have its own driver or use the syscon logic if that is what >> this is. >> > Giving that CRMU has scattered, miscellaneous control logic for multiple > different peripherals, it probably makes more sense to use the syscon > logic here. > Arnd, thanks for the feedback. If I was to write a separate driver for the CRMU, I would have to export certain functions and create an api that only this RTC driver would use. I am not sure that is efficient or required. What is your opinion? Would it be better if I use the syson api in my current driver and move the CRMU registers to separate syscon device tree entry? >>>> Also, what do you use the labels for? >>>> >>> The labels are purely to improve readability of the device tree entry >> >> Please remove them then, they don't help at all. >> Sure, I will remove the labels >> Arnd >> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/