From patchwork Mon Oct 15 13:07:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 148844 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp3778681lji; Mon, 15 Oct 2018 06:10:48 -0700 (PDT) X-Google-Smtp-Source: ACcGV60jrZdTQoragNVDXZQomZ5qzIwvuiea2lJnhQojDikoE1Rp3mIQwJ7LDWRvEaiZEBqTflsi X-Received: by 2002:a62:da1a:: with SMTP id c26-v6mr6423249pfh.52.1539609048352; Mon, 15 Oct 2018 06:10:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539609048; cv=none; d=google.com; s=arc-20160816; b=G1UHpURR8jtapjuuCZDr7BCyjz0udpmftli2yDiiRD2UNJZ4Czn2CgpWiD74+8aALa th2Ge9WA7ru60qc8VP8PdUWpXXbeyB60cFynixgsVsjeah4TNKH1wjboUG+h+tebFc2E I1jKuOB3tOKzbhkT+ww/z3PbZJBbNTmvBR9W64m26lY8KwP7LxYrYGiED3VuIksGLqgU 163reuuXDfCtLm6LwBD9T/VxbDAplAfNvX4cvH3j+vaZJqNy0sgIBqektuiNxux+mkcK uSt6GpJGXXibGKuFFJc5dCfjtRNKiMs39DG9sp8fjjFM08fdXJ6L1awlMeKszpJkyodp avIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=DxVgz5sPUG76EqP9bSDNSd6wELPPnGRmw9Z8EJBd+2Q=; b=PEV9Co4MoYs86XLy4gSsy9G/ffQUFcEBLYJjCNQrAVjUFlxgjFUm3wUjZUwYFOrx+6 5A7634f/Zdk5yDCmgWj6M9Boaa6R5oeGpjpFcAvHvKhO3XBIi49kWG/tB4x5025PBlVT jSOvXRx4RFqtUiEi/b+jmcxDDeZlj9TXXRRmqHcJwnju4mnOXIBf79kXGp1MdhpDX1+U YENFZr2kvAcxXzY3aC3qmhDBe+FYChIWjpXsDmePpnI8Mla9XGAj5GQqcBxr6wJDae8w +15PF9GvJVEnmpB9m0BNLTzu5NqHgOMG/D9fdNooQBgmUdGVefm74j6Y0184J+Q1WsIs VU2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=HqDDfhWY; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r3-v6si8169164plb.197.2018.10.15.06.10.48; Mon, 15 Oct 2018 06:10:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-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=@ti.com header.s=ti-com-17Q1 header.b=HqDDfhWY; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726979AbeJOUyv (ORCPT + 6 others); Mon, 15 Oct 2018 16:54:51 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:48036 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726781AbeJOUyv (ORCPT ); Mon, 15 Oct 2018 16:54:51 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id w9FD95Ti124034; Mon, 15 Oct 2018 08:09:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1539608945; bh=DxVgz5sPUG76EqP9bSDNSd6wELPPnGRmw9Z8EJBd+2Q=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=HqDDfhWYffAHMn3pBGzZU2RKYncpbzS5bUi/C6z9YDQnPirojRTPMVeQl45oTjxpP WtOr45d6UGwhY1/BHVskuPOegzOjSt6/TgDnO0gsiUC2rfLWAqOKtmaCziG/8K/dyj XRo3kBmnahYqfxmAKwJwV3mQotuYOLrZRx1xFRPg= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w9FD95Vc001734; Mon, 15 Oct 2018 08:09:05 -0500 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Mon, 15 Oct 2018 08:09:05 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Mon, 15 Oct 2018 08:09:05 -0500 Received: from a0393678ub.dal.design.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w9FD7tLM009433; Mon, 15 Oct 2018 08:09:02 -0500 From: Kishon Vijay Abraham I To: Bjorn Helgaas , Lorenzo Pieralisi , Murali Karicheri , Jingoo Han , Gustavo Pimentel CC: Rob Herring , , , , , Kishon Vijay Abraham I Subject: [PATCH 19/19] PCI: keystone: Cleanup macros defined in pci-keystone.c Date: Mon, 15 Oct 2018 18:37:21 +0530 Message-ID: <20181015130721.5535-20-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181015130721.5535-1-kishon@ti.com> References: <20181015130721.5535-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org No functional change. Cleanup macros defined in pci-keystone.c by removing unused macros, grouping the macros and aligning it properly. Signed-off-by: Kishon Vijay Abraham I --- drivers/pci/controller/dwc/pci-keystone.c | 41 +++++++++-------------- 1 file changed, 16 insertions(+), 25 deletions(-) -- 2.17.1 diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c index db40f60ce8ab..447718a3f755 100644 --- a/drivers/pci/controller/dwc/pci-keystone.c +++ b/drivers/pci/controller/dwc/pci-keystone.c @@ -28,21 +28,14 @@ #include "pcie-designware.h" -#define DRIVER_NAME "keystone-pcie" - #define PCIE_VENDORID_MASK 0xffff #define PCIE_DEVICEID_SHIFT 16 -/* DEV_STAT_CTRL */ -#define PCIE_CAP_BASE 0x70 - -/* Application register defines */ -#define LTSSM_EN_VAL BIT(0) -#define DBI_CS2 BIT(5) -#define OB_XLAT_EN_VAL BIT(1) - /* Application registers */ #define CMD_STATUS 0x004 +#define LTSSM_EN_VAL BIT(0) +#define OB_XLAT_EN_VAL BIT(1) +#define DBI_CS2 BIT(5) #define CFG_SETUP 0x008 #define CFG_BUS(x) (((x) & 0xff) << 16) @@ -69,18 +62,16 @@ #define IRQ_STATUS 0x184 #define MSI_IRQ_OFFSET 4 -/* Error IRQ bits */ -#define ERR_AER BIT(5) /* ECRC error */ -#define ERR_AXI BIT(4) /* AXI tag lookup fatal error */ -#define ERR_CORR BIT(3) /* Correctable error */ -#define ERR_NONFATAL BIT(2) /* Non-fatal error */ -#define ERR_FATAL BIT(1) /* Fatal error */ -#define ERR_SYS BIT(0) /* System (fatal, non-fatal, or correctable) */ -#define ERR_IRQ_ALL (ERR_AER | ERR_AXI | ERR_CORR | \ - ERR_NONFATAL | ERR_FATAL | ERR_SYS) #define ERR_IRQ_STATUS 0x1c4 #define ERR_IRQ_ENABLE_SET 0x1c8 -#define ERR_IRQ_ENABLE_CLR 0x1cc +#define ERR_AER BIT(5) /* ECRC error */ +#define ERR_AXI BIT(4) /* AXI tag lookup fatal error */ +#define ERR_CORR BIT(3) /* Correctable error */ +#define ERR_NONFATAL BIT(2) /* Non-fatal error */ +#define ERR_FATAL BIT(1) /* Fatal error */ +#define ERR_SYS BIT(0) /* System error */ +#define ERR_IRQ_ALL (ERR_AER | ERR_AXI | ERR_CORR | \ + ERR_NONFATAL | ERR_FATAL | ERR_SYS) #define OB_OFFSET_INDEX(n) (0x200 + (8 * (n))) #define OB_ENABLEN BIT(0) @@ -89,12 +80,12 @@ #define MAX_MSI_HOST_IRQS 8 /* PCIE controller device IDs */ -#define PCIE_RC_K2HK 0xb008 -#define PCIE_RC_K2E 0xb009 -#define PCIE_RC_K2L 0xb00a -#define PCIE_RC_K2G 0xb00b +#define PCIE_RC_K2HK 0xb008 +#define PCIE_RC_K2E 0xb009 +#define PCIE_RC_K2L 0xb00a +#define PCIE_RC_K2G 0xb00b -#define to_keystone_pcie(x) dev_get_drvdata((x)->dev) +#define to_keystone_pcie(x) dev_get_drvdata((x)->dev) struct keystone_pcie { struct dw_pcie *pci;