Received: by 10.223.164.202 with SMTP id h10csp3820086wrb; Mon, 20 Nov 2017 05:38:03 -0800 (PST) X-Google-Smtp-Source: AGs4zMbG/a6zbA9Fc7dFY5Nmz/I2fYOSBRuQhifjpbefXRdcl/aQeN8SIamFw3Vci62SjBjasSsh X-Received: by 10.99.106.137 with SMTP id f131mr13723708pgc.334.1511185083183; Mon, 20 Nov 2017 05:38:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511185083; cv=none; d=google.com; s=arc-20160816; b=iWxcTN7kBWDyda6ijpgurOm6VxZcRhsbYt14sgKdFNLokLwX8lZe66oDiCS1mECuXn 9Vt59Yl6eYn55AFF6crOqTssJBo5FPenwBCvlctcLeC/3LJ+Ms9u1OB9KbtA/H65F5qI YcdOeLeOlZK8Kgjv2Cx2U93+ICd2hOiswxXeeklHqRtqYs2abtymgW8QZ+WJW27bJEOa CSBNUp4SEDI5OgJ3boCif/+f+oGW207DQqdipo4Fu5xGm41FspGd9iOFWi5SKiN0tyOO rWYTN09LZJl5m/S1pDNKFimLQGMRdyQ8QYKCy4esgKa9NZ+BvRaC247WomxSUhfhC9lZ bK6Q== 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:arc-authentication-results; bh=xW50iXBpckd172npyhfRe7FZ8kVNMrgAbbYFHm3m4ek=; b=NO2kY/sPhuAEMQgZM1T9hpEaUkQa4cvGD5ejqIU/ryNtGNuyRx2JSryDvcEfak3Jvr vAFAZwxEs1uzJvqa+bhacmBd8/GY18PtT7th6cvE3Y/PtToJBVDv5/+Wci2JDhU3beM6 MLIRnHKoeyzlYi3JqCIWh/A+11sGsWSeVOEvAylStmTIXT6c/rJcaXEcIqmNVg90F8E4 IQtT6eZN0PRac5vy/AfUNpKnz3lipccoJX42nFKRcF45BxWyd6mq7kvCf36M+03k6epx jl9VRJKmMMMYWbFaVcuAlq/W1+hpr15hQ1QLUFwITQwUsrrZqYROsU6vQ7PvEAdDKtkP 42jA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u9si8260060plz.497.2017.11.20.05.37.53; Mon, 20 Nov 2017 05:38:03 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751725AbdKTNfe (ORCPT + 66 others); Mon, 20 Nov 2017 08:35:34 -0500 Received: from bastet.se.axis.com ([195.60.68.11]:39624 "EHLO bastet.se.axis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751415AbdKTNd2 (ORCPT ); Mon, 20 Nov 2017 08:33:28 -0500 Received: from localhost (localhost [127.0.0.1]) by bastet.se.axis.com (Postfix) with ESMTP id 0A01B183AC; Mon, 20 Nov 2017 14:33:27 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at bastet.se.axis.com Received: from bastet.se.axis.com ([IPv6:::ffff:127.0.0.1]) by localhost (bastet.se.axis.com [::ffff:127.0.0.1]) (amavisd-new, port 10024) with LMTP id AtEkYn0hc8JG; Mon, 20 Nov 2017 14:33:25 +0100 (CET) Received: from boulder02.se.axis.com (boulder02.se.axis.com [10.0.8.16]) by bastet.se.axis.com (Postfix) with ESMTPS id 0007A183B0; Mon, 20 Nov 2017 14:33:24 +0100 (CET) Received: from boulder02.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E10B51A08C; Mon, 20 Nov 2017 14:33:24 +0100 (CET) Received: from boulder02.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D4DD91A070; Mon, 20 Nov 2017 14:33:24 +0100 (CET) Received: from thoth.se.axis.com (unknown [10.0.2.173]) by boulder02.se.axis.com (Postfix) with ESMTP; Mon, 20 Nov 2017 14:33:24 +0100 (CET) Received: from lnxartpec1.se.axis.com (lnxartpec1.se.axis.com [10.88.4.10]) by thoth.se.axis.com (Postfix) with ESMTP id C82DD19AA; Mon, 20 Nov 2017 14:33:24 +0100 (CET) Received: by lnxartpec1.se.axis.com (Postfix, from userid 20283) id C36A0400FE; Mon, 20 Nov 2017 14:33:24 +0100 (CET) From: Niklas Cassel To: Niklas Cassel , Jesper Nilsson , Lorenzo Pieralisi , Bjorn Helgaas Cc: linux-arm-kernel@axis.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 11/18] PCI: dwc: artpec6: Use BIT and GENMASK macros Date: Mon, 20 Nov 2017 14:32:14 +0100 Message-Id: <20171120133222.27771-12-niklas.cassel@axis.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171120133222.27771-1-niklas.cassel@axis.com> References: <20171120133222.27771-1-niklas.cassel@axis.com> X-TM-AS-GCONF: 00 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use BIT and GENMASK macros to improve readability. Signed-off-by: Niklas Cassel --- drivers/pci/dwc/pcie-artpec6.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/pci/dwc/pcie-artpec6.c b/drivers/pci/dwc/pcie-artpec6.c index 4b8ef266dc2f..18075e0fab80 100644 --- a/drivers/pci/dwc/pcie-artpec6.c +++ b/drivers/pci/dwc/pcie-artpec6.c @@ -39,28 +39,28 @@ struct artpec6_pcie { /* ARTPEC-6 specific registers */ #define PCIECFG 0x18 -#define PCIECFG_DBG_OEN (1 << 24) -#define PCIECFG_CORE_RESET_REQ (1 << 21) -#define PCIECFG_LTSSM_ENABLE (1 << 20) -#define PCIECFG_CLKREQ_B (1 << 11) -#define PCIECFG_REFCLK_ENABLE (1 << 10) -#define PCIECFG_PLL_ENABLE (1 << 9) -#define PCIECFG_PCLK_ENABLE (1 << 8) -#define PCIECFG_RISRCREN (1 << 4) -#define PCIECFG_MODE_TX_DRV_EN (1 << 3) -#define PCIECFG_CISRREN (1 << 2) -#define PCIECFG_MACRO_ENABLE (1 << 0) +#define PCIECFG_DBG_OEN BIT(24) +#define PCIECFG_CORE_RESET_REQ BIT(21) +#define PCIECFG_LTSSM_ENABLE BIT(20) +#define PCIECFG_CLKREQ_B BIT(11) +#define PCIECFG_REFCLK_ENABLE BIT(10) +#define PCIECFG_PLL_ENABLE BIT(9) +#define PCIECFG_PCLK_ENABLE BIT(8) +#define PCIECFG_RISRCREN BIT(4) +#define PCIECFG_MODE_TX_DRV_EN BIT(3) +#define PCIECFG_CISRREN BIT(2) +#define PCIECFG_MACRO_ENABLE BIT(0) #define NOCCFG 0x40 -#define NOCCFG_ENABLE_CLK_PCIE (1 << 4) -#define NOCCFG_POWER_PCIE_IDLEACK (1 << 3) -#define NOCCFG_POWER_PCIE_IDLE (1 << 2) -#define NOCCFG_POWER_PCIE_IDLEREQ (1 << 1) +#define NOCCFG_ENABLE_CLK_PCIE BIT(4) +#define NOCCFG_POWER_PCIE_IDLEACK BIT(3) +#define NOCCFG_POWER_PCIE_IDLE BIT(2) +#define NOCCFG_POWER_PCIE_IDLEREQ BIT(1) #define PHY_STATUS 0x118 -#define PHY_COSPLLLOCK (1 << 0) +#define PHY_COSPLLLOCK BIT(0) -#define ARTPEC6_CPU_TO_BUS_ADDR 0x0fffffff +#define ARTPEC6_CPU_TO_BUS_ADDR GENMASK(27, 0) static u32 artpec6_pcie_readl(struct artpec6_pcie *artpec6_pcie, u32 offset) { -- 2.14.2 From 1584555714473522352@xxx Mon Nov 20 03:54:47 +0000 2017 X-GM-THRID: 1583204216475065296 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread