From patchwork Wed May 17 14:05:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 99977 Delivered-To: patch@linaro.org Received: by 10.182.142.97 with SMTP id rv1csp230027obb; Wed, 17 May 2017 07:07:13 -0700 (PDT) X-Received: by 10.99.56.25 with SMTP id f25mr4027090pga.108.1495030033563; Wed, 17 May 2017 07:07:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495030033; cv=none; d=google.com; s=arc-20160816; b=axI9Ln4oYzeWrXVsKPTyb3tllE8mTIEbRwq5iHHqllH02As5tkKlkt6YCypm4oOLko fdom6qHMsEvZFzCGjsRxCmmFO1dws5jTlArTIQMTxJ2phZmA18IXzd3FC8HwTFF8crU3 529yz2ZK79c5QkC40Ic40uc2ZaWa51z5Ic5k6NPIAOBa1fTeuUR/nU2NfPbGDV7g5z9v 388/p6xNWG7jot1iklqiH6vNZBgVQbP2pOVplo80BpAJTHQRz7t5PEu+7Alwd5OHv6oG T7dWPvWkKIPFcw2J41CRSyuur48lDibsUGbyKt8CCfWflrqcIEfuHqLO9af/BDcTyUq8 1TyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=EF8VE4dBHRZC7eJwfuYl4pU+I0K4UEmXQuiCRTs+0R0=; b=k5LyoibxgOO9sqt/i8Cik8ZGEdQ0fBlaMNSircohALGf5MsEq3uAOV1pC2zADQEvO4 zxj9jdYj2RkOZv/FeXefx8Hbm39bYus1oP3IfFgMub8i1pUNsms5VJ80lfQjt8H0rM9Y 6nMToVwyz0FK1irnnxHueX8INLzIDQG2E60VROKfXNRaWPOmau1hAco+Tt39jCRGHHNC e8roAO0ghF7f8ltpUwIrv5y8GQgoUm6SYMOTLYKD5HfoejLr4yRcu3fOqilwbHcI/316 /Hr2HsNxtN/A6PallnLQ3+bNYFZ8o1Q4T9Cb3ECl4bX4IL27EEQUlWB73rU4KYbYeSg8 AqKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5si2193574pfc.53.2017.05.17.07.07.13; Wed, 17 May 2017 07:07:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932095AbdEQOGy (ORCPT + 25 others); Wed, 17 May 2017 10:06:54 -0400 Received: from mail-wr0-f176.google.com ([209.85.128.176]:35109 "EHLO mail-wr0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753874AbdEQOGt (ORCPT ); Wed, 17 May 2017 10:06:49 -0400 Received: by mail-wr0-f176.google.com with SMTP id z52so10988923wrc.2 for ; Wed, 17 May 2017 07:06:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EF8VE4dBHRZC7eJwfuYl4pU+I0K4UEmXQuiCRTs+0R0=; b=dW2RTlHTFuQNZUQL3agdXgLB/g1PAdXSuFyuqnR6orx1XZ4hv04ewcpOOoQLFsHyiR t6uuOQqIXRkGEv7657tL2lfIYrPWFOO2c9LB1q2Ab6F0eA6OHaS39y46E5+fJA5dkiYw xmtVJWVLhHt0CL0kT3QN5UEI98sMK7LaTfoTY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=EF8VE4dBHRZC7eJwfuYl4pU+I0K4UEmXQuiCRTs+0R0=; b=MsrySJzB19H8FkYmxjebgDB1QAj1TPksxevQ6kK58FoyHh3Xp5jX9sbIG4MsxnnLF3 QkmvFEv1mGGM9jApcM+96O1FopAx0e4O2k4PmADsfnYgNkKkA1bY6hl/n3krU4VI3Cuh /lTHU8JK4oFcYCLhljkSt1iVEyPHZYJZziOMKU7ZRg7ny7stiNvwkVoFcjjDjC1smDx8 MujeWvAbuIkwND3ZlvXOa5talT9BJxMOiEUJjUfHB4eI422wYcSCgu9bdOra/6NE/fKr LaNKjxHsIq+cK3+LuqUbciJ+v/SCW4e6oL/O4VKuG2bvG1qHRXQ9Rou0umEmNA1w68EC 9BFg== X-Gm-Message-State: AODbwcCW826XQlx56yxv2tITYkghwAafjY49b/YteYqCwLCOaqeIx112 9yM+H/oNbSMq48yc X-Received: by 10.46.83.1 with SMTP id h1mr981600ljb.102.1495030007697; Wed, 17 May 2017 07:06:47 -0700 (PDT) Received: from fabina.bredbandsbolaget.se (c-3c94db54.014-348-6c756e10.cust.bredbandsbolaget.se. [84.219.148.60]) by smtp.gmail.com with ESMTPSA id 139sm409680ljj.16.2017.05.17.07.06.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 May 2017 07:06:46 -0700 (PDT) From: Linus Walleij To: Daniel Lezcano , Thomas Gleixner , Joel Stanley , Jonas Jensen Cc: Janos Laube , Paulius Zaleckas , linux-arm-kernel@lists.infradead.org, Hans Ulli Kroll , Florian Fainelli , linux-kernel@vger.kernel.org, Linus Walleij Subject: [PATCH 5/8] clocksource/drivers/fttmr010: Switch to use bitops Date: Wed, 17 May 2017 16:05:39 +0200 Message-Id: <20170517140542.20016-6-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170517140542.20016-1-linus.walleij@linaro.org> References: <20170517140542.20016-1-linus.walleij@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This switches the drivers to use the bitops BIT() macro to define bits. Cc: Joel Stanley Cc: Jonas Jensen Signed-off-by: Linus Walleij --- drivers/clocksource/timer-fttmr010.c | 43 ++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 21 deletions(-) -- 2.9.3 diff --git a/drivers/clocksource/timer-fttmr010.c b/drivers/clocksource/timer-fttmr010.c index 9ad31489bbef..9df14cf13808 100644 --- a/drivers/clocksource/timer-fttmr010.c +++ b/drivers/clocksource/timer-fttmr010.c @@ -16,6 +16,7 @@ #include #include #include +#include /* * Register definitions for the timers @@ -36,31 +37,31 @@ #define TIMER_INTR_STATE (0x34) #define TIMER_INTR_MASK (0x38) -#define TIMER_1_CR_ENABLE (1 << 0) -#define TIMER_1_CR_CLOCK (1 << 1) -#define TIMER_1_CR_INT (1 << 2) -#define TIMER_2_CR_ENABLE (1 << 3) -#define TIMER_2_CR_CLOCK (1 << 4) -#define TIMER_2_CR_INT (1 << 5) -#define TIMER_3_CR_ENABLE (1 << 6) -#define TIMER_3_CR_CLOCK (1 << 7) -#define TIMER_3_CR_INT (1 << 8) -#define TIMER_1_CR_UPDOWN (1 << 9) -#define TIMER_2_CR_UPDOWN (1 << 10) -#define TIMER_3_CR_UPDOWN (1 << 11) +#define TIMER_1_CR_ENABLE BIT(0) +#define TIMER_1_CR_CLOCK BIT(1) +#define TIMER_1_CR_INT BIT(2) +#define TIMER_2_CR_ENABLE BIT(3) +#define TIMER_2_CR_CLOCK BIT(4) +#define TIMER_2_CR_INT BIT(5) +#define TIMER_3_CR_ENABLE BIT(6) +#define TIMER_3_CR_CLOCK BIT(7) +#define TIMER_3_CR_INT BIT(8) +#define TIMER_1_CR_UPDOWN BIT(9) +#define TIMER_2_CR_UPDOWN BIT(10) +#define TIMER_3_CR_UPDOWN BIT(11) #define TIMER_DEFAULT_FLAGS (TIMER_1_CR_UPDOWN | \ TIMER_3_CR_ENABLE | \ TIMER_3_CR_UPDOWN) -#define TIMER_1_INT_MATCH1 (1 << 0) -#define TIMER_1_INT_MATCH2 (1 << 1) -#define TIMER_1_INT_OVERFLOW (1 << 2) -#define TIMER_2_INT_MATCH1 (1 << 3) -#define TIMER_2_INT_MATCH2 (1 << 4) -#define TIMER_2_INT_OVERFLOW (1 << 5) -#define TIMER_3_INT_MATCH1 (1 << 6) -#define TIMER_3_INT_MATCH2 (1 << 7) -#define TIMER_3_INT_OVERFLOW (1 << 8) +#define TIMER_1_INT_MATCH1 BIT(0) +#define TIMER_1_INT_MATCH2 BIT(1) +#define TIMER_1_INT_OVERFLOW BIT(2) +#define TIMER_2_INT_MATCH1 BIT(3) +#define TIMER_2_INT_MATCH2 BIT(4) +#define TIMER_2_INT_OVERFLOW BIT(5) +#define TIMER_3_INT_MATCH1 BIT(6) +#define TIMER_3_INT_MATCH2 BIT(7) +#define TIMER_3_INT_OVERFLOW BIT(8) #define TIMER_INT_ALL_MASK 0x1ff struct fttmr010 {