From patchwork Mon Apr 1 04:25:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Smirnov X-Patchwork-Id: 10879055 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 576EF139A for ; Mon, 1 Apr 2019 04:26:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D420287B6 for ; Mon, 1 Apr 2019 04:26:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 31C402881E; Mon, 1 Apr 2019 04:26:06 +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=unavailable 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 DFF07287B6 for ; Mon, 1 Apr 2019 04:26:05 +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: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:In-Reply-To:References: List-Owner; bh=MqL1r0HD0d3ZP8ojdzmFwM9Fgt0a1mid1xchfznMNrQ=; b=j3zBHF88yPuq3B D1Vy6yNe/thEoEAGF5z648ef+eV20fdObVgJkKd0RrIbXgWqQ0ija/9Qyra12DYFhBv05YD0//5ZG E1XTrXXREy5/VDNNPcztTY2lpW8/xhU3ZapVB0jrsCnfCV+Vw6DimCKv0ZUQ5hIY1VRu0vfJeWZhw aEYG+qcwczdQJCePp1RcAjqxm5vYkzjGq/3OhAx9ZNDrhVROBMTetLba9bViG41LlCL1DaIvvs/3w R5YXq7T+NE4EE6FVE1uJ+qdH6oXV41xJ9KuzPm5BP0vtBOjL1KQpgJ+2tYVPsoUX7eq5PKlQO41ir l38nsVBkC85JZVAoXl8w==; 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 1hAoWJ-0003Od-Ur; Mon, 01 Apr 2019 04:26:03 +0000 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hAoWG-0003Nb-7G for linux-arm-kernel@lists.infradead.org; Mon, 01 Apr 2019 04:26:01 +0000 Received: by mail-pl1-x643.google.com with SMTP id y6so3807133pll.13 for ; Sun, 31 Mar 2019 21:25:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4Ji7Xwi4CX455TTm7FFnww+qNo0h+6JrE6lrT1VdynY=; b=BDc76Jl3PoyoLKFPdcJaMp7O95LaPSgoitZ1Rmeecx4zQsHxdqctBQzO4Kun4mJeoV osxHv6tprfvEJMbR+84TdcyeLS46KcVvwbKORPVfee0kHABd4cTGRyYj3wciajmhyP95 IgCAXs9XWG48rg427IluZgbkB1QWbSgXP0n7jReWSwX04P2kM1dwDxGnCiSB91ho4VzI h8kh1g4TV03E5zcQWZgXrJxY5tAyNaqZXV56t5pH61CIGjYVQWMp8xuuejV+cBYmIhQt mtdbOvtDTzMeBNLp38W28xr/38ugoyZe2uLU4OTRASQV/+nsfV6EOHJKftsNtIukTeoY rW+A== 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:mime-version :content-transfer-encoding; bh=4Ji7Xwi4CX455TTm7FFnww+qNo0h+6JrE6lrT1VdynY=; b=hMLN7eqIcXq/yBAY9JvH/Rlep1MIjFZLrN++k2OZzErv+zNXcnl95oCVzIUyn63a+8 Ii3rEofM+JJz2bjEfs+qmzi3zIO2b0maReKEmHQ0yyElhjbchHryv5eeX8TCfRgCJeAa D0KAZs/EGB/G3JLCKfqTN7Wpc6G5eqmKp3/jiCBuvu/XFkuTR0n+ALutFc6IZiv0Il8h fB5eqP445+xe6PCxJnEKHEr8iQHtQb22IAAmKbIVZ5ATocwKGCkbTAn/rRRuhRytT1TG taHM0sKMv1bs5uhJaB7vzXGvV8OByO1Gjo3gGgdtKzuP1ilKOVTdJHHSdjqssZlNxL/D m8lQ== X-Gm-Message-State: APjAAAU8gpOr7nrVwEvARU0OXj63++ff424VHQV+SmZDwmMbgXAfzZoq i2TD6/L/1mAh0DlZ0gyWlYk= X-Google-Smtp-Source: APXvYqwpc6sqR9aUkSdqMU7paYBxspuj5lmmtiLkXT4iSMvkm+VzHsZ6aw287aYBfIVx+SEGKgUBZw== X-Received: by 2002:a17:902:2927:: with SMTP id g36mr34153435plb.57.1554092759109; Sun, 31 Mar 2019 21:25:59 -0700 (PDT) Received: from squirtle.lan (c-24-22-235-96.hsd1.wa.comcast.net. [24.22.235.96]) by smtp.gmail.com with ESMTPSA id t22sm10996829pgu.45.2019.03.31.21.25.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 31 Mar 2019 21:25:57 -0700 (PDT) From: Andrey Smirnov To: linux-pci@vger.kernel.org Subject: [PATCH v3 00/11] i.MX6, DesignWare PCI improvements Date: Sun, 31 Mar 2019 21:25:36 -0700 Message-Id: <20190401042547.14067-1-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190331_212600_312519_870C2381 X-CRM114-Status: GOOD ( 10.70 ) 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 Everyone: This is the series containing various small improvements that I made while reading the code and researching commit history of pci-imx6.c and pcie-designware*.c files. All changes are optional, so commits that don't seem like an improvement can be easily dropped. Hopefully each patch is self-explanatory. I tested this series on i.MX6Q, i.MX7D and i.MX8MQ. Feedback is welcome! Thanks, Andrey Smirnov Changes since [v2]: - All non i.MX6 patches dropped, since they were accepted as a seprarte series - Series rebased on lates 'dwc-pci' branch of PCI tree - Patches "PCI: imx6: Use flags to indicate support for suspend" and "PCI: imx6: Replace calls to udelay() with usleep_range()" added to the series Changes since [v1]: - Dropped "PCI: imx6: Drop imx6_pcie_link_up()" due to the matter already having been addressed by "PCI: imx6: Fix link training status detection in link up check" from Trent Piepho - Changed "designware" -> "dwc" for all subject lines - Collected Acked-by's from Gustavo Pimentel [v2] lkml.kernel.org/r/20190104174925.17153-1-andrew.smirnov@gmail.com [v1] lkml.kernel.org/r/20181221072716.29017-1-andrew.smirnov@gmail.com Andrey Smirnov (11): PCI: imx6: Simplify imx7d_pcie_wait_for_phy_pll_lock() PCI: imx6: Remove redundant debug tracing PCI: imx6: Return -ETIMEOUT from imx6_pcie_wait_for_speed_change() PCI: imx6: Remove PCIE_PL_PFLR_* constants PCI: dwc: imx6: Share PHY debug register definitions PCI: imx6: Make use of BIT() in constant definitions PCI: imx6: Simplify bit operations in PHY functions PCI: imx6: Simplify pcie_phy_poll_ack() PCI: imx6: Restrict PHY register data to 16-bit PCI: imx6: Use flags to indicate support for suspend PCI: imx6: Replace calls to udelay() with usleep_range() drivers/pci/controller/dwc/pci-imx6.c | 119 ++++++++----------- drivers/pci/controller/dwc/pcie-designware.c | 12 +- drivers/pci/controller/dwc/pcie-designware.h | 3 + 3 files changed, 54 insertions(+), 80 deletions(-)