From patchwork Fri Feb 19 07:21:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Walmsley X-Patchwork-Id: 8357021 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B01079F38B for ; Fri, 19 Feb 2016 07:24:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BC8CC203AD for ; Fri, 19 Feb 2016 07:24:14 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DC220203AB for ; Fri, 19 Feb 2016 07:24:13 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aWfOm-0007zp-G7; Fri, 19 Feb 2016 07:22:44 +0000 Received: from utopia.booyaka.com ([74.50.51.50]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aWfO4-0007IL-8z for linux-arm-kernel@lists.infradead.org; Fri, 19 Feb 2016 07:22:01 +0000 Received: (qmail 3046 invoked by uid 1019); 19 Feb 2016 07:21:36 -0000 Date: Fri, 19 Feb 2016 07:21:36 +0000 (UTC) From: Paul Walmsley To: Keerthy Subject: Re: [PATCH v2 2/2] ARM: AM43XX: HWMOD: Add rtc hwmod In-Reply-To: <1455856735-11515-3-git-send-email-j-keerthy@ti.com> Message-ID: References: <1455856735-11515-1-git-send-email-j-keerthy@ti.com> <1455856735-11515-3-git-send-email-j-keerthy@ti.com> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160218_232200_440165_AF0BBFFD X-CRM114-Status: GOOD ( 23.02 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, tony@atomide.com, linux-kernel@vger.kernel.org, robh+dt@kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, 19 Feb 2016, Keerthy wrote: > The patch adds rtc hwmod. RTC module The RTC module is physically > present on the AM438x SoC used on AM43X-EPOS-EVM, but it is permanently > disabled. A secure RTC is used instead on these devices, where needed. > . Hence adding it selectively using a seprate list to get RTC Module > functional on the other am43x SoCs used on am437x-gp-evm and > am437x-sk-evm. > > Signed-off-by: Keerthy > --- > > Changes in v2: > > Inverted the checking logic to accommodate registering for all > the SoCs compatible to am4372 and removed the negating am438x logic > to register rtc hwmods as suggested by Paul. > > arch/arm/mach-omap2/omap_hwmod_43xx_data.c | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) OK thanks; I've queued the following patch for v4.6 or if I get unlucky, v4.7. - Paul From: Keerthy Date: Fri, 19 Feb 2016 10:08:55 +0530 Subject: [PATCH] ARM: AM43XX: hwmod: Add rtc hwmod The patch registers the rtc hwmod on AM437x chips. The RTC module is physically present on the AM438x SoC used on AM43X-EPOS-EVM, but it is permanently disabled. A secure RTC is used instead on these devices, where needed. Hence adding it selectively using a separate list to get RTC Module functional on the other am43x SoCs used on am437x-gp-evm and am437x-sk-evm. Signed-off-by: Keerthy [paul@pwsan.com: cleaned up patch description] Signed-off-by: Paul Walmsley --- arch/arm/mach-omap2/omap_hwmod_43xx_data.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c index e97a894b5f88..97fd399202dc 100644 --- a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c @@ -1020,9 +1020,21 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = { NULL, }; +static struct omap_hwmod_ocp_if *am43xx_rtc_hwmod_ocp_ifs[] __initdata = { + &am33xx_l4_wkup__rtc, + NULL, +}; + int __init am43xx_hwmod_init(void) { + int ret; + omap_hwmod_am43xx_reg(); omap_hwmod_init(); - return omap_hwmod_register_links(am43xx_hwmod_ocp_ifs); + ret = omap_hwmod_register_links(am43xx_hwmod_ocp_ifs); + + if (!ret && of_machine_is_compatible("ti,am4372")) + ret = omap_hwmod_register_links(am43xx_rtc_hwmod_ocp_ifs); + + return ret; }