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: 10879053 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 D0D3F1390 for ; Mon, 1 Apr 2019 04:26:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B7FC2287B6 for ; Mon, 1 Apr 2019 04:26:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A5F982881E; Mon, 1 Apr 2019 04:26:01 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E8CD287B6 for ; Mon, 1 Apr 2019 04:26:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726083AbfDAE0A (ORCPT ); Mon, 1 Apr 2019 00:26:00 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:37000 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725992AbfDAE0A (ORCPT ); Mon, 1 Apr 2019 00:26:00 -0400 Received: by mail-pl1-f196.google.com with SMTP id w23so870387ply.4; 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=G4LvUpL05sOEpkbYa9/x2kYw1ec5/bLUsmBpB9mwe7fjlBWJm2R+gELA01kbXeXR+Q QJeKRwxoeqG5TkFqQ8Y1i4EUps0ZLUkIPZjD8+KZQl2bnKXFTBTg1Uj/QEA+GHOcs4hd pRU19MZX95SoAsToIOahAIgzkeFXqjte26Jt7xcwRlsVf8InT+MR3IYgC5KlbF6aWNeU MYjfAhAO3FmK4CizkjcWSVt/pLDcx9M5RcmsvAP2jUewTAJVTBjv00f+pH7aPAHGmeG7 TkQTYZrreiIA7G/RiPxMgOMwfS/ENWFzIY43Wc15d0cG/qYuCCkxaKRm5XkKGAL3XePb J80g== X-Gm-Message-State: APjAAAUPFI38EnOx8sLoP9UuHILhDiFD2ZJ2BsmVbkEt7QRA2SDlgpuq y+E3ylhoHb/+/PhqietpfYQyyzrw 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 Cc: Andrey Smirnov , Lorenzo Pieralisi , Bjorn Helgaas , Fabio Estevam , Chris Healy , Lucas Stach , Leonard Crestez , "A.s. Dong" , Richard Zhu , linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@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 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.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(-)