From patchwork Tue Jun 7 08:01:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Holler X-Patchwork-Id: 855402 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p578AsAv010549 for ; Tue, 7 Jun 2011 08:10:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751834Ab1FGIKx (ORCPT ); Tue, 7 Jun 2011 04:10:53 -0400 Received: from h1446028.stratoserver.net ([85.214.92.142]:55213 "EHLO mail.ahsoftware.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751261Ab1FGIKw (ORCPT ); Tue, 7 Jun 2011 04:10:52 -0400 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 07 Jun 2011 08:10:55 +0000 (UTC) X-Greylist: delayed 508 seconds by postgrey-1.27 at vger.kernel.org; Tue, 07 Jun 2011 04:10:52 EDT Received: by mail.ahsoftware.de (Postfix, from userid 65534) id E76B54345A9; Tue, 7 Jun 2011 10:02:22 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.ahsoftware.de X-Spam-Level: X-Spam-Status: No, score=-101.0 required=5.0 tests=ALL_TRUSTED, USER_IN_WHITELIST autolearn=disabled version=3.3.1 Received: from eiche.ahsoftware (p57B2165D.dip0.t-ipconnect.de [87.178.22.93]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.ahsoftware.de (Postfix) with ESMTPSA id 60BC74344AD for ; Tue, 7 Jun 2011 10:02:21 +0200 (CEST) Received: by eiche.ahsoftware (Postfix, from userid 65534) id 29D813FCC7; Tue, 7 Jun 2011 10:02:20 +0200 (CEST) Received: from krabat.ahsoftware (unknown [192.168.207.2]) by eiche.ahsoftware (Postfix) with ESMTP id 2E4373FC87; Tue, 7 Jun 2011 08:01:59 +0000 (UTC) Message-ID: <4DEDDAF6.2070505@ahsoftware.de> Date: Tue, 07 Jun 2011 10:01:58 +0200 From: Alexander Holler User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc13 Lightning/1.0b3pre Thunderbird/3.1.10 MIME-Version: 1.0 To: Tony Lindgren CC: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Subject: Re: [PATCH] arm: omap3: beagle: Ensure msecure is mux'd to be able to set the RTC References: <4D9AEB76.2060509@ahsoftware.de> <1302010808-3065-1-git-send-email-holler@ahsoftware.de> <20110531102903.GU11352@atomide.com> In-Reply-To: <20110531102903.GU11352@atomide.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Am 31.05.2011 12:29, schrieb Tony Lindgren: > * Alexander Holler [110405 06:38]: >> Without msecure beeing high it isn't possible to set (or start) >> the RTC. >> >> Tested with a BeagleBoard C4. > > Adding this into fixes. > > Tony > >> Signed-off-by: Alexander Holler >> --- >> arch/arm/mach-omap2/board-omap3beagle.c | 3 +++ >> 1 files changed, 3 insertions(+), 0 deletions(-) >> >> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c >> index 46d814a..ebe3a7e 100644 >> --- a/arch/arm/mach-omap2/board-omap3beagle.c >> +++ b/arch/arm/mach-omap2/board-omap3beagle.c >> @@ -628,6 +628,9 @@ static void __init omap3_beagle_init(void) >> usb_ehci_init(&ehci_pdata); >> omap3beagle_flash_init(); >> >> + /* Ensure msecure is mux'd to be able to set the RTC. */ >> + omap_mux_init_signal("sys_drm_msecure", OMAP_PIN_OFF_OUTPUT_HIGH); >> + >> /* Ensure SDRC pins are mux'd for self-refresh */ >> omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); >> omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); >> -- >> 1.7.3.4 >> I've later switched to the following patch which muxes msecure as GPIO (the drm-mode isn't explained in the TRM) and also exports the GPIO, so root could easily switch it to prevent modifications on the RTC. (Warning, either my clipboard or the version of Thunderbird I'm currently using replaces the tabs with spaces in the pasted patch and I'm currently too lazy to search a workaround). --- arch/arm/mach-omap2/board-omap3beagle.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 33007fd..24b4417 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -673,6 +673,12 @@ static void __init omap3_beagle_init(void) usbhs_init(&usbhs_bdata); omap3beagle_flash_init(); + /* Ensure msecure is high to be able to set the RTC. */ + omap_mux_init_signal("gpio_22", OMAP_PIN_OFF_OUTPUT_HIGH); + gpio_request(22, "msecure"); + gpio_direction_output(22, true); + gpio_export(22, false); + /* Ensure SDRC pins are mux'd for self-refresh */ omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);