From patchwork Fri May 9 12:09:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sekhar Nori X-Patchwork-Id: 29890 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f69.google.com (mail-oa0-f69.google.com [209.85.219.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D9FA020534 for ; Fri, 9 May 2014 12:10:27 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id i7sf19628283oag.8 for ; Fri, 09 May 2014 05:10:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=t0I7m2mFANGWDbXKOuUaT0h2fM8zDqlwgifSxtD4AF0=; b=JL/IaGIDPSkFZaztrNwnHrCBf2ISYVYzfQ3zOXt1XlHeGqDEZty7b5k4Nzomr0ChhU afCslElRMV8bm4PygaKhgnl2Pj1LpRA5sVDmybPFn3lCTej0Vk8xbtAXcFAf+C3uMEo9 2gD0QwhS324r1NsoKQ8/OyXH5HRVVxqq6QwKYc5IVylsdL/QWvNbrnGDo0RxI4w308YK SwYxsEcZh5q96/dIV1xP1uIE1pRdXJa0FyiR8LHbiXjPFcvj233r2Km72icXg4AeUEuF dAALTQQSH82wKaQPoS/EH4YpijTwmSwjysiPecQYdTcW4Uy/rxykRWHJmo+NAXvWK9jd yR3w== X-Gm-Message-State: ALoCoQlHkRqmZOSWnmgaS1jJ1gIaA4euGk3Yz/r7K8JzmN1ZoGx80ntxAFCSK8jul7/zCvAbAaNG X-Received: by 10.43.141.196 with SMTP id jf4mr4513016icc.9.1399637427367; Fri, 09 May 2014 05:10:27 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.85.40 with SMTP id m37ls273920qgd.18.gmail; Fri, 09 May 2014 05:10:27 -0700 (PDT) X-Received: by 10.58.179.115 with SMTP id df19mr174190vec.41.1399637427222; Fri, 09 May 2014 05:10:27 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id db15si687137vec.208.2014.05.09.05.10.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 May 2014 05:10:27 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id hu19so2066657vcb.20 for ; Fri, 09 May 2014 05:10:27 -0700 (PDT) X-Received: by 10.58.186.207 with SMTP id fm15mr8040871vec.4.1399637427135; Fri, 09 May 2014 05:10:27 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp74066vcb; Fri, 9 May 2014 05:10:26 -0700 (PDT) X-Received: by 10.66.124.137 with SMTP id mi9mr19625109pab.111.1399637426397; Fri, 09 May 2014 05:10:26 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id db3si2174966pbc.15.2014.05.09.05.10.25; Fri, 09 May 2014 05:10:25 -0700 (PDT) Received-SPF: none (google.com: linux-omap-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754122AbaEIMKY (ORCPT + 6 others); Fri, 9 May 2014 08:10:24 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:49538 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754101AbaEIMKX (ORCPT ); Fri, 9 May 2014 08:10:23 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s49C9Fqf023023; Fri, 9 May 2014 07:09:15 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s49C9FRr007990; Fri, 9 May 2014 07:09:15 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Fri, 9 May 2014 07:09:15 -0500 Received: from psplinux063.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s49C99TA031720; Fri, 9 May 2014 07:09:13 -0500 From: Sekhar Nori To: Alessandro Zummo , Andrew Morton CC: Linux RTC Mailing List , Linux OMAP Mailing List , Sekhar Nori Subject: [PATCH 2/3] rtc: omap: use BIT() macro Date: Fri, 9 May 2014 17:39:02 +0530 Message-ID: <33a80baca85cca7415524ccb54562287f4d22b56.1399635871.git.nsekhar@ti.com> X-Mailer: git-send-email 1.7.10.1 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: nsekhar@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Use BIT() macro for RTC_HAS_ defines instead of hand-writing bit masks. Use BIT() macros for register bit field definitions. While at it, fix indentation done using spaces. No functional change in this patch. Signed-off-by: Sekhar Nori --- drivers/rtc/rtc-omap.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c index 70f5149..734e408 100644 --- a/drivers/rtc/rtc-omap.c +++ b/drivers/rtc/rtc-omap.c @@ -73,43 +73,43 @@ #define OMAP_RTC_IRQWAKEEN 0x7c /* OMAP_RTC_CTRL_REG bit fields: */ -#define OMAP_RTC_CTRL_SPLIT (1<<7) -#define OMAP_RTC_CTRL_DISABLE (1<<6) -#define OMAP_RTC_CTRL_SET_32_COUNTER (1<<5) -#define OMAP_RTC_CTRL_TEST (1<<4) -#define OMAP_RTC_CTRL_MODE_12_24 (1<<3) -#define OMAP_RTC_CTRL_AUTO_COMP (1<<2) -#define OMAP_RTC_CTRL_ROUND_30S (1<<1) -#define OMAP_RTC_CTRL_STOP (1<<0) +#define OMAP_RTC_CTRL_SPLIT BIT(7) +#define OMAP_RTC_CTRL_DISABLE BIT(6) +#define OMAP_RTC_CTRL_SET_32_COUNTER BIT(5) +#define OMAP_RTC_CTRL_TEST BIT(4) +#define OMAP_RTC_CTRL_MODE_12_24 BIT(3) +#define OMAP_RTC_CTRL_AUTO_COMP BIT(2) +#define OMAP_RTC_CTRL_ROUND_30S BIT(1) +#define OMAP_RTC_CTRL_STOP BIT(0) /* OMAP_RTC_STATUS_REG bit fields: */ -#define OMAP_RTC_STATUS_POWER_UP (1<<7) -#define OMAP_RTC_STATUS_ALARM (1<<6) -#define OMAP_RTC_STATUS_1D_EVENT (1<<5) -#define OMAP_RTC_STATUS_1H_EVENT (1<<4) -#define OMAP_RTC_STATUS_1M_EVENT (1<<3) -#define OMAP_RTC_STATUS_1S_EVENT (1<<2) -#define OMAP_RTC_STATUS_RUN (1<<1) -#define OMAP_RTC_STATUS_BUSY (1<<0) +#define OMAP_RTC_STATUS_POWER_UP BIT(7) +#define OMAP_RTC_STATUS_ALARM BIT(6) +#define OMAP_RTC_STATUS_1D_EVENT BIT(5) +#define OMAP_RTC_STATUS_1H_EVENT BIT(4) +#define OMAP_RTC_STATUS_1M_EVENT BIT(3) +#define OMAP_RTC_STATUS_1S_EVENT BIT(2) +#define OMAP_RTC_STATUS_RUN BIT(1) +#define OMAP_RTC_STATUS_BUSY BIT(0) /* OMAP_RTC_INTERRUPTS_REG bit fields: */ -#define OMAP_RTC_INTERRUPTS_IT_ALARM (1<<3) -#define OMAP_RTC_INTERRUPTS_IT_TIMER (1<<2) +#define OMAP_RTC_INTERRUPTS_IT_ALARM BIT(3) +#define OMAP_RTC_INTERRUPTS_IT_TIMER BIT(2) /* OMAP_RTC_IRQWAKEEN bit fields: */ -#define OMAP_RTC_IRQWAKEEN_ALARM_WAKEEN (1<<1) +#define OMAP_RTC_IRQWAKEEN_ALARM_WAKEEN BIT(1) /* OMAP_RTC_KICKER values */ #define KICK0_VALUE 0x83e70b13 #define KICK1_VALUE 0x95a4f1e0 -#define OMAP_RTC_HAS_KICKER 0x1 +#define OMAP_RTC_HAS_KICKER BIT(0) /* * Few RTC IP revisions has special WAKE-EN Register to enable Wakeup * generation for event Alarm. */ -#define OMAP_RTC_HAS_IRQWAKEEN 0x2 +#define OMAP_RTC_HAS_IRQWAKEEN BIT(1) static void __iomem *rtc_base;