From patchwork Sun Jun 17 13:45:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 9366 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 524A423EE2 for ; Sun, 17 Jun 2012 13:45:54 +0000 (UTC) Received: from mail-ob0-f180.google.com (mail-ob0-f180.google.com [209.85.214.180]) by fiordland.canonical.com (Postfix) with ESMTP id 18C52A1826B for ; Sun, 17 Jun 2012 13:45:53 +0000 (UTC) Received: by obbun3 with SMTP id un3so7852584obb.11 for ; Sun, 17 Jun 2012 06:45:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:mime-version:content-type :x-gm-message-state; bh=Gv3QTr98cwW1253cQfXlLKvmFwcFRDNB8hXDrSQNRYk=; b=Rp4V27NH4FtbQ4ICW9azk8/MU6Q3FWsR/GiPJypzzd+IWrTF2OWf7jqckEfRya4eZ/ hzJ+lN6azviG738gPxJuDShU6CjVXRd/Wo4A8CzcNsJsvcqdPYFwyX90jhIdWlfE5giG bRXWZzbzm4x3zG2UytKh88kmnO77KnWOxuxE5VJrznw68VNY+sGY6xTEuDY69IrBrpJd EYmX5AiObWFlby4A0guGTYyV1Hx2AKVHZHG4anGxsUVD9lPwQVZIRCbgtVweI9+N0qvE KtI0xpgVEhFirVhZcOYJgN7AVbiSXIxbf7I3lUT2tajPJ1gzX5pEinNZdajMNHGJzbV6 mTDg== Received: by 10.50.57.167 with SMTP id j7mr6080597igq.53.1339940753441; Sun, 17 Jun 2012 06:45:53 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.24.148 with SMTP id v20csp22767ibb; Sun, 17 Jun 2012 06:45:52 -0700 (PDT) Received: by 10.14.185.134 with SMTP id u6mr2011687eem.188.1339940752203; Sun, 17 Jun 2012 06:45:52 -0700 (PDT) Received: from eu1sys200aog107.obsmtp.com (eu1sys200aog107.obsmtp.com. [207.126.144.123]) by mx.google.com with SMTP id z6si7069862eem.128.2012.06.17.06.45.32 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 17 Jun 2012 06:45:52 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.123 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.123; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.123 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob107.postini.com ([207.126.147.11]) with SMTP ID DSNKT93fe/d7CF2a1atg9ATHr0kGY/v7FG8J@postini.com; Sun, 17 Jun 2012 13:45:51 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 8A2999E; Sun, 17 Jun 2012 13:37:09 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id CD67312AF; Sun, 17 Jun 2012 13:45:28 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id 4E6D7A8065; Sun, 17 Jun 2012 15:45:22 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.3.83.0; Sun, 17 Jun 2012 15:45:27 +0200 From: Linus Walleij To: Andrew Morton Cc: Alessandro Zummo , , Bengt Jonsson , Linus Walleij Subject: [PATCH 2/2] rtc/ab8500: Remove fix for AB8500 ED version Date: Sun, 17 Jun 2012 15:45:24 +0200 Message-ID: <1339940724-6963-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.9.2 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQlHqkDvNwVV7f9IaUyr8xZnTphrKcJ7PS/5erTB42PlGaEh+m/P3zV9ocK3eK/PiHQmaPeK From: Bengt Jonsson AB8500 ED (Early Drop) is no longer supported by the kernel. Signed-off-by: Bengt Jonsson Signed-off-by: Linus Walleij --- drivers/rtc/rtc-ab8500.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/drivers/rtc/rtc-ab8500.c b/drivers/rtc/rtc-ab8500.c index 60e43ab..5268d9d 100644 --- a/drivers/rtc/rtc-ab8500.c +++ b/drivers/rtc/rtc-ab8500.c @@ -88,22 +88,17 @@ static int ab8500_rtc_read_time(struct device *dev, struct rtc_time *tm) if (retval < 0) return retval; - /* Early AB8500 chips will not clear the rtc read request bit */ - if (abx500_get_chip_id(dev) == 0) { - usleep_range(1000, 1000); - } else { - /* Wait for some cycles after enabling the rtc read in ab8500 */ - while (time_before(jiffies, timeout)) { - retval = abx500_get_register_interruptible(dev, - AB8500_RTC, AB8500_RTC_READ_REQ_REG, &value); - if (retval < 0) - return retval; - - if (!(value & RTC_READ_REQUEST)) - break; - - usleep_range(1000, 5000); - } + /* Wait for some cycles after enabling the rtc read in ab8500 */ + while (time_before(jiffies, timeout)) { + retval = abx500_get_register_interruptible(dev, + AB8500_RTC, AB8500_RTC_READ_REQ_REG, &value); + if (retval < 0) + return retval; + + if (!(value & RTC_READ_REQUEST)) + break; + + usleep_range(1000, 5000); } /* Read the Watchtime registers */