From patchwork Wed Oct 17 07:41:14 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: 149039 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp328172lji; Wed, 17 Oct 2018 00:43:08 -0700 (PDT) X-Google-Smtp-Source: ACcGV62SOgLg+eClOBhA2O2h1l2nL5uymBOyVL11Y3uDVTG6XvgkBPsA4vth6m15ICsd2JVLEUov X-Received: by 2002:a63:af5b:: with SMTP id s27-v6mr23113411pgo.448.1539762188027; Wed, 17 Oct 2018 00:43:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539762188; cv=none; d=google.com; s=arc-20160816; b=RK5N+knPqOBGXRjSCkPGT0R4DwdX1ryV9hZ42g2jDsxWYRwxM3rib1UbUwf3+8llPn GIU99EPtI/mjLjLMbkBk/5cnVesBxLTJ5fUEaUA0cO/Cbs++I1INb1m/GVnF1KQi19LF 5F33AEh5fEKsp+flC+s/gw4NFoy50k4Vep4758fQXCoDLItYlaSy77o6z5nklmpaIhio Nyg6gFpflzwWPN91i0hcS1BeesP2NW5GPyoSSeUYLNP4+rns53bCqKjYm9fPWgsBJibF ngLnjt3j48klvNuvopLRLIcKYbSoUZdO9lr30YqX+l2NW/pWduvqozoykXOIRVb57L7n 0d8g== 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=zxAbqT5mwnQ0yf4Gth6G3KMxef3pL6xYIy++EsgoCT8=; b=cIk6vMiQUpm9X6TPqLFiQlUlURtRo42CUhAnTm7TVgV8fUK0Yxst5MOzI7OJlRkMxX opIec9q21yfFcKQGRwlpvHZffdjL6OTnG7QEUEGeM3manEv1fwoKdb+WnHsi4XDIHqt5 91jl8yw3XvnBG+cB0Abx38hpDNrUiFeAqYAWefWXkFSQHOzrb0BljLA4RSzlvWHOC6dd tEoUl9gSWDOXUDw3gmJB/dfWPhO/ZjpnLE9Af0e87BcaK2NwhYOgx62Ki0xfyHfDgDGZ vdkhw7d3nllTWEkITMf5Kr+5MJzbhCKVfRP9d6gXb9vtCSkQ7MmejlfvmdUjNENLYLNN 8Nvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="iqQ/Ttv4"; 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=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 y13-v6si16262418pgl.236.2018.10.17.00.43.07; Wed, 17 Oct 2018 00:43:08 -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=@ti.com header.s=ti-com-17Q1 header.b="iqQ/Ttv4"; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727711AbeJQPh3 (ORCPT + 32 others); Wed, 17 Oct 2018 11:37:29 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:60660 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727652AbeJQPh2 (ORCPT ); Wed, 17 Oct 2018 11:37:28 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id w9H7gueP054099; Wed, 17 Oct 2018 02:42:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1539762176; bh=zxAbqT5mwnQ0yf4Gth6G3KMxef3pL6xYIy++EsgoCT8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=iqQ/Ttv4hmBuxmfG7L1lX5unnQKDcr1aKy+cb3WrHhIQ0jjImWetMUu1Ry3KPEmPY wR5k+jlwrZx02TARIR2Hf5BiSHQ7KPhT117nSSniyyNGWWbMI+PuGAQMDbpZcJ7jI/ M0TgnLq/LuVI+QZ18QzYdG8UHK7wKmw2xukPB9OU= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w9H7gu8q010261; Wed, 17 Oct 2018 02:42:56 -0500 Received: from DLEE103.ent.ti.com (157.170.170.33) 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; Wed, 17 Oct 2018 02:42:56 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Wed, 17 Oct 2018 02:42:56 -0500 Received: from a0393678ub.dal.design.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w9H7fgSg009413; Wed, 17 Oct 2018 02:42:53 -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 v2 21/21] PCI: keystone: Cleanup macros defined in pci-keystone.c Date: Wed, 17 Oct 2018 13:11:14 +0530 Message-ID: <20181017074114.28239-22-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181017074114.28239-1-kishon@ti.com> References: <20181017074114.28239-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 0cfeaad1d013..14f2b0b4ed5e 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) @@ -70,27 +63,25 @@ #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 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;