From patchwork Thu May 18 20:17:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 100124 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp6158qge; Thu, 18 May 2017 13:17:52 -0700 (PDT) X-Received: by 10.84.150.131 with SMTP id h3mr6969382plh.103.1495138672418; Thu, 18 May 2017 13:17:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495138672; cv=none; d=google.com; s=arc-20160816; b=DF3hubrWb1vV/UlbY2lltOODUsSKKGRdDyQBvaK98SpyV1/NqQfzHnXk6eKNRWM1C9 hrtseXVCeBkTkvxZUjOoglWmJ8NnEeThwJfMR0AgAi1eVbhKFII7+dBSBOeC90cwNvYL 6yXVtABXT5Cue3Odj8AKgXQXMOWoXhVJI5JtBhxLIN4THHTCUmvyjxj5OCOqP+M0qyu3 /rTKZ7IkzoGeLQPfH61fFmZ55X2ZTd00EeCy75M/iduwLWXe+owVZKvf6Qqo9BJo5JZU m7WMjZXO4umiIn9N8mx8NtkFlxxJEco/iVFVR8NqVDx/55K0MlwZlh1ldf6lze8sTTyH ZE0A== 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=XbzO8hEp9aq9iuqVDfUVydAzCCyg4MzK2/tngoQiBY4=; b=fyz3qaY5JTHWEE2Zq493EA9AHtmgN7NFls4Wv9IwUv09rU2DAcgjcKklpA+RtY7I+P Vts5EKckzCCWquxuIPhP65OZpAE/+A1450k2DeypOqcv56qoPdL3e+0k1KcSH4L9kFFG XAjDOBOjTsWyRQPqoAzo74tpsb04r8Wz0OH7vCRJBDw0Y+8uMVR7Kl0uT4p/D8IxcKqQ XwXl4odGVZM6k2ycZQgKBdXVDEzh/HTe2Q3zrZODPmVmGV6g33vq+PO1p28NMF34Orur 5JfCJ5L7bN9QYmkfmarNlbMnDI2AqyLjMVw7Kv9Uk87VlNoOfTsVQL+sxHaMn/w3vQp7 YJeg== 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 q7si6059160pfd.332.2017.05.18.13.17.52; Thu, 18 May 2017 13:17:52 -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 S1755848AbdERURi (ORCPT + 25 others); Thu, 18 May 2017 16:17:38 -0400 Received: from mail-wm0-f45.google.com ([74.125.82.45]:35227 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755695AbdERURc (ORCPT ); Thu, 18 May 2017 16:17:32 -0400 Received: by mail-wm0-f45.google.com with SMTP id b84so214498949wmh.0 for ; Thu, 18 May 2017 13:17:31 -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=XbzO8hEp9aq9iuqVDfUVydAzCCyg4MzK2/tngoQiBY4=; b=BYGnMcSG18lko8lgIhC7wGKMLNrVSN80HO0WBn7puFTRMyODtKNkPGRwM6m8bSc+xz vGlA0Nhuv2lZqShr1DPcUyEZDj2TWhgT6tYDwVRwJyaJEMlqu52VlxPgu/H9Sjc9UuTg aINsXH8btYujO6Uyyhpm0b0jJr+VAxLb3qaPE= 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=XbzO8hEp9aq9iuqVDfUVydAzCCyg4MzK2/tngoQiBY4=; b=OyrM1jwXuRb1hGPeNZWiRM+2QHLtsDNHvV4Z1QwQet1QB4aR0LBTwKod/elDxpb4Xk COKP0xI+FuCn64jHoXFo7bzS6gjbBcH/oQ11oC4dhWdd1SfAYMs/hRZrK7SHFWy8OXTC hreHzs+r6bt3/PqLHCyJozdWbMFJTHDLKqHolEWPYQ5Ub/A8FTDSgqKet4BIHzzpL1p8 dueSfgseoWnIekq1fBkc2BfHDf9hGEZn13tfJr/UhUXpwmpMiJKUVDc9SMu4R5B5cwFW vCmBkR8/1r1iEW5qPqwg87MrpswNj47ei+Seq4Xvxf6Bgzw8SR8rqvx7CSEXbSdsvvrM r1vA== X-Gm-Message-State: AODbwcBGYmpG4A4hyFqhSKI8/yMvYc2TOjgfP13OCIi+6GvXZjgp3Day 74nXqLxJeuqfPp7W X-Received: by 10.25.38.129 with SMTP id m123mr1489832lfm.150.1495138650778; Thu, 18 May 2017 13:17:30 -0700 (PDT) Received: from fabina.bredbandsbolaget.se (c-787571d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.117.120]) by smtp.gmail.com with ESMTPSA id y1sm1103615lja.24.2017.05.18.13.17.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 May 2017 13:17:29 -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 v2] clocksource/drivers/fttmr010: Switch to use bitops Date: Thu, 18 May 2017 22:17:02 +0200 Message-Id: <20170518201705.28790-5-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170518201705.28790-1-linus.walleij@linaro.org> References: <20170518201705.28790-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 Tested-by: Jonas Jensen Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Added Jonas' Tested-by, no functional changes. --- 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 {