From patchwork Fri Aug 27 06:32:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sekhar Nori X-Patchwork-Id: 62831 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-yx0-f184.google.com (mail-yx0-f184.google.com [209.85.213.184]) by ozlabs.org (Postfix) with ESMTP id B6530B70E1 for ; Fri, 27 Aug 2010 16:33:17 +1000 (EST) Received: by yxn22 with SMTP id 22sf4439787yxn.11 for ; Thu, 26 Aug 2010 23:33:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:mime-version:x-beenthere:received :received:received:received:received-spf:received:received:received :received:from:to:cc:subject:date:message-id:x-mailer :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :sender:list-subscribe:list-unsubscribe:content-type; bh=dYi3rwrJDkBTtTDFDxFN40ypAzt/+r0dg2ZISR+VwVk=; b=AkIqmCM6bFCpkwKDJf52+WAPH5zneCrAjX9uUJSzFbA4/+28HLR7FLu5utt+DzAfqj Dc4XcilSOheRICVdSo0ID6Ng/3yN3ibqNmWrZMEurIZs96f8XKi+kXPFXZSbCW7/U6Dc I1t/jrKqjii4SVFN0qUhLzBapFUUgjURQENOM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=mime-version:x-beenthere:received-spf:from:to:cc:subject:date :message-id:x-mailer:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type; b=hWm2FtIgsinrNGojTCuIwMwvXBVpIxMouCzJ85PInNKAW/sM5h6YpZeZm8xYWZ4r2d Umi2Zqdz4Vnm1LHE8jKKZCxSS1MakaYvVdL+qRqps3byYo6/a7EiWcKnA157p/Ysbze+ hG77PEfhzfgRGCHTzvo2oPlQPfq8JpWwZfmew= Received: by 10.101.49.15 with SMTP id b15mr15483ank.31.1282890795641; Thu, 26 Aug 2010 23:33:15 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.101.208.33 with SMTP id k33ls981232anq.0.p; Thu, 26 Aug 2010 23:33:15 -0700 (PDT) Received: by 10.100.191.17 with SMTP id o17mr272920anf.44.1282890795125; Thu, 26 Aug 2010 23:33:15 -0700 (PDT) Received: by 10.100.191.17 with SMTP id o17mr272919anf.44.1282890795090; Thu, 26 Aug 2010 23:33:15 -0700 (PDT) Received: from arroyo.ext.ti.com (arroyo.ext.ti.com [192.94.94.40]) by gmr-mx.google.com with ESMTP id h19si2978320anm.9.2010.08.26.23.33.14; Thu, 26 Aug 2010 23:33:15 -0700 (PDT) Received-SPF: pass (google.com: domain of a0875516@india.ti.com designates 192.94.94.40 as permitted sender) client-ip=192.94.94.40; Received: from dbdp31.itg.ti.com ([172.24.170.98]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id o7R6X9cr028412 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 27 Aug 2010 01:33:11 -0500 Received: from psplinux051.india.ti.com (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id o7R6X1Eg018500; Fri, 27 Aug 2010 12:03:02 +0530 (IST) Received: from psplinux051.india.ti.com (localhost [127.0.0.1]) by psplinux051.india.ti.com (8.13.1/8.13.1) with ESMTP id o7R6X1o0021596; Fri, 27 Aug 2010 12:03:01 +0530 Received: (from a0875516@localhost) by psplinux051.india.ti.com (8.13.1/8.13.1/Submit) id o7R6WxEl021582; Fri, 27 Aug 2010 12:02:59 +0530 From: Sekhar Nori To: Andrew Morton , Alessandro Zummo Cc: davinci-linux-open-source@linux.davincidsp.com, rtc-linux@googlegroups.com, David Brownell , Sekhar Nori , Kevin Hilman Subject: [rtc-linux] [PATCH v2 RESEND] rtc: omap: let device wakeup capability be configured from chip init logic Date: Fri, 27 Aug 2010 12:02:59 +0530 Message-Id: <1282890779-21536-1-git-send-email-nsekhar@ti.com> X-Mailer: git-send-email 1.6.2.4 X-Original-Sender: nsekhar@ti.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of a0875516@india.ti.com designates 192.94.94.40 as permitted sender) smtp.mail=a0875516@india.ti.com Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , The rtc-omap driver currently hardcodes the RTC wakeup capability to be "not capable". While this seems to be true for existing OMAP1 boards which are not wired for this, the DA850/OMAP-L138 SoC, the RTC can always be wake up source from its "deep sleep" mode. This patch lets the wakeup capability to be set from platform data and does not override the setting from the driver. For DA850/OMAP-L138, this is done from arch/arm/mach-davinci/devices-da8xx.c:da8xx_register_rtc() Note that this patch does not change the behavior on any existing OMAP1 board since the platform device registration sets the wakeup capability to 0 by default. Signed-off-by: Sekhar Nori Signed-off-by: Kevin Hilman --- Resending this patch since it was not merged anywhere. The previous discussion on this patch is here: http://groups.google.com/group/rtc-linux/browse_thread/thread/25c76c71c8ec9f70/9fe51fa05e09c657 drivers/rtc/rtc-omap.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c index 64d9727..73377b0 100644 --- a/drivers/rtc/rtc-omap.c +++ b/drivers/rtc/rtc-omap.c @@ -34,7 +34,8 @@ * Board-specific wiring options include using split power mode with * RTC_OFF_NOFF used as the reset signal (so the RTC won't be reset), * and wiring RTC_WAKE_INT (so the RTC alarm can wake the system from - * low power modes). See the BOARD-SPECIFIC CUSTOMIZATION comment. + * low power modes) for OMAP1 boards (OMAP-L138 has this built into + * the SoC). See the BOARD-SPECIFIC CUSTOMIZATION comment. */ #define OMAP_RTC_BASE 0xfffb4800 @@ -401,16 +402,17 @@ static int __init omap_rtc_probe(struct platform_device *pdev) /* BOARD-SPECIFIC CUSTOMIZATION CAN GO HERE: * - * - Boards wired so that RTC_WAKE_INT does something, and muxed - * right (W13_1610_RTC_WAKE_INT is the default after chip reset), - * should initialize the device wakeup flag appropriately. + * - Device wake-up capability setting should come through chip + * init logic. OMAP1 boards should initialize the "wakeup capable" + * flag in the platform device if the board is wired right for + * being woken up by RTC alarm. For OMAP-L138, this capability + * is built into the SoC by the "Deep Sleep" capability. * * - Boards wired so RTC_ON_nOFF is used as the reset signal, * rather than nPWRON_RESET, should forcibly enable split * power mode. (Some chip errata report that RTC_CTRL_SPLIT * is write-only, and always reads as zero...) */ - device_init_wakeup(&pdev->dev, 0); if (new_ctrl & (u8) OMAP_RTC_CTRL_SPLIT) pr_info("%s: split power mode\n", pdev->name);