From patchwork Fri Dec 21 07:27:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Smirnov X-Patchwork-Id: 10740053 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C9B0713BF for ; Fri, 21 Dec 2018 07:31:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF2E828571 for ; Fri, 21 Dec 2018 07:31:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A3DFE285EB; Fri, 21 Dec 2018 07:31:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4861B284DC for ; Fri, 21 Dec 2018 07:31:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+sN9egbIBQkYkyHoaInmFpyXbocgXjKNjnsPJwp4YtU=; b=LucXzsCo3fvJh8 MQNhgNfFdJC7R+Dim/tZ1VcgLMdmweTrAzuVM5IFmEbVxwVUBOy+JXVtNTcU9Wm7cOaLsrwM8Zk4W Lt/5Ipra/gBav21slaXkMaJWUTqueq7SsFHHMaf8dr/GjPnVeN2mf+dne0+ToZDT8HoGiQe20cADR NTo+ZHk8PqLsQ5eWW9pF1qHJsZKgTl3aCAkyg9p6dpL/Fb2uI1LVMDJT42SQc8/82Mpdh3Wc3yrQ5 G6/IiSGNsycf0KjhCYFokB51QvPW/7AEZu5f9VN2U6H3ZHgRqHa+HEFRuSqFnm0c2sDSzBHDGQtAI qjek0gaMcV6nPNwyVy0w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gaFGv-0005z2-FX; Fri, 21 Dec 2018 07:31:01 +0000 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gaFE9-0001qF-Gk for linux-arm-kernel@lists.infradead.org; Fri, 21 Dec 2018 07:28:11 +0000 Received: by mail-pl1-x641.google.com with SMTP id 101so2106879pld.6 for ; Thu, 20 Dec 2018 23:28:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TqYCFphTE89qwX5r9RN/jgIceUrAGJyLboLH1gjiqTU=; b=T9Auu21dO+fPpRqohnW/C+5tSklOBK/DUBX20FiVnu8xHc0T/An1rBo5B2i+ENO0+N gipONMVohHBbWbt4wqeDEZa4gB0NGELCRQZA4INafJ7EntVQy4Kf5WIb54oCOT+Ct3yI pu2UFPnDwqLo2DgBb1qi9z1wmJ+1sUbJtsCCeROo4OC4DrB3Y8iwJqiEvshv5sg/sxvG XOy3AuJ6oDQwNGR9hm3NmGGspi4kgJP4lPAMfnB/ZunBOlmuoX+cC4M32WlLoeYOAGPd swEszRp5rZxwIRTzF5N81LYeL4jiPmy0shs30vcTC9bqaYnp3DZ2DmfkY3uH3/DrY0iF fgCQ== 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:mime-version:content-transfer-encoding; bh=TqYCFphTE89qwX5r9RN/jgIceUrAGJyLboLH1gjiqTU=; b=mOS1AGjY5rnblTuK6cCy+FZEyK5Q/PtLQMZ1f7MAaeV4ttu9aMMHS0KaUG54wZdyMV A4+g3k5iiKevX8AUXgtGKLWHeT7f00fkZ7JO+jA5minOG0XoIB3ebVj4KpEREVhNwXEQ 0YJOQ/Ce3uBRN/z/jBekaV/4+QNutlPneso1XP1k8p8j2qxYxSJEMZ6qKouudlbSaWXO 963QOaH0PUBMvLv5CNoeiB4lev7sMy1wPXF40NfIw2JVLkCa4K4velraG2bQdQOUCYFG Aw5NmwDKSAVgF5Og5QFXdxX3sKbeJnCt+WRutmLYEKsdzPDRdl9PvpXHj/zVqeLCDUiN zV7g== X-Gm-Message-State: AJcUukfAghfbUwrQxiTyKfhoxFNGHrmc45BGEvhZXsqJWP9Dn1jXItz5 +3GBT09aPHTns2EXq1dRZ6bal1xN X-Google-Smtp-Source: ALg8bN7VFNOfyipcRVN4uHadck2NF4rcy2dCIULEnDmBnNnp6tn/CxUmIVmP48c7+xPdGJUmJd7jdg== X-Received: by 2002:a17:902:9b93:: with SMTP id y19mr1437738plp.336.1545377281678; Thu, 20 Dec 2018 23:28:01 -0800 (PST) Received: from squirtle.lan (c-24-22-235-96.hsd1.wa.comcast.net. [24.22.235.96]) by smtp.gmail.com with ESMTPSA id t90sm44971921pfj.23.2018.12.20.23.27.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Dec 2018 23:28:00 -0800 (PST) From: Andrey Smirnov To: linux-pci@vger.kernel.org Subject: [PATCH 12/21] PCI: imx6: Make use of BIT() in constant definitions Date: Thu, 20 Dec 2018 23:27:07 -0800 Message-Id: <20181221072716.29017-13-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181221072716.29017-1-andrew.smirnov@gmail.com> References: <20181221072716.29017-1-andrew.smirnov@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181220_232809_592340_269EE203 X-CRM114-Status: GOOD ( 11.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "A.s. Dong" , Lorenzo Pieralisi , Richard Zhu , linux-arm-kernel@lists.infradead.org, Andrey Smirnov , linux-kernel@vger.kernel.org, Fabio Estevam , linux-imx@nxp.com, Bjorn Helgaas , Leonard Crestez , Chris Healy , Lucas Stach Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Avoid using explicit left shifts and convert various definitions to use BIT() instead. No functional change intended. Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Fabio Estevam Cc: Chris Healy Cc: Lucas Stach Cc: Leonard Crestez Cc: "A.s. Dong" Cc: Richard Zhu Cc: linux-imx@nxp.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: linux-pci@vger.kernel.org Signed-off-by: Andrey Smirnov --- drivers/pci/controller/dwc/pci-imx6.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index c0b073cf20c0..2737526158fa 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -95,18 +95,18 @@ struct imx6_pcie { /* PHY registers (not memory-mapped) */ #define PCIE_PHY_ATEOVRD 0x10 -#define PCIE_PHY_ATEOVRD_EN (0x1 << 2) +#define PCIE_PHY_ATEOVRD_EN BIT(2) #define PCIE_PHY_ATEOVRD_REF_CLKDIV_SHIFT 0 #define PCIE_PHY_ATEOVRD_REF_CLKDIV_MASK 0x1 #define PCIE_PHY_MPLL_OVRD_IN_LO 0x11 #define PCIE_PHY_MPLL_MULTIPLIER_SHIFT 2 #define PCIE_PHY_MPLL_MULTIPLIER_MASK 0x7f -#define PCIE_PHY_MPLL_MULTIPLIER_OVRD (0x1 << 9) +#define PCIE_PHY_MPLL_MULTIPLIER_OVRD BIT(9) #define PHY_RX_OVRD_IN_LO 0x1005 -#define PHY_RX_OVRD_IN_LO_RX_DATA_EN (1 << 5) -#define PHY_RX_OVRD_IN_LO_RX_PLL_EN (1 << 3) +#define PHY_RX_OVRD_IN_LO_RX_DATA_EN BIT(5) +#define PHY_RX_OVRD_IN_LO_RX_PLL_EN BIT(3) static int pcie_phy_poll_ack(struct imx6_pcie *imx6_pcie, int exp_val) {