From patchwork Mon Oct 12 15:46:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 7377341 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9CB1F9F1D5 for ; Mon, 12 Oct 2015 15:49:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C60692073E for ; Mon, 12 Oct 2015 15:49:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EB8E9206CD for ; Mon, 12 Oct 2015 15:49:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751706AbbJLPt1 (ORCPT ); Mon, 12 Oct 2015 11:49:27 -0400 Received: from mail-qk0-f171.google.com ([209.85.220.171]:36391 "EHLO mail-qk0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751643AbbJLPt0 (ORCPT ); Mon, 12 Oct 2015 11:49:26 -0400 Received: by qkht68 with SMTP id t68so59526801qkh.3 for ; Mon, 12 Oct 2015 08:49:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3CpdhaZn191klrGItf9dHfWqgVpaSj8piBu/Jmqnhoo=; b=yzdIOEoTPJORiJJTH+Nlem9SHVqPSNmjRtHWea+hSFy948LbfwtLlNk8V80VejVbbv buoRtDHCSCcSIqSdJDVtvsw9PhXOfci0tcfWBrRTanFIjiOvWceMFuF8UF5uLIUp6y2P RlwPZaVzZG3/JiywEKthjkn7RhI50XHYS+mPotBtP0IWhAWvGh/L/U1zAc7moCiglZQp /qZ0XfDm0k5jx79NuiIQHjrQ5kCy2PljJ8ljXjfIECbN5uv/+/oSTY+XgvuNCgJo15Sv +iub+WC7aYYMVotK3Sq+6zw7Tc7wVPwQxpbJPgdZGw1p4aypNgb7tzqHZ/bXP3LFRpsW c3Tw== X-Received: by 10.55.215.211 with SMTP id t80mr32707512qkt.62.1444664966215; Mon, 12 Oct 2015 08:49:26 -0700 (PDT) Received: from localhost.localdomain ([189.5.18.107]) by smtp.gmail.com with ESMTPSA id 5sm7361990qkq.19.2015.10.12.08.49.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Oct 2015 08:49:25 -0700 (PDT) From: Fabio Estevam To: bhelgaas@google.com Cc: pratyush.anand@gmail.com, m-karicheri2@ti.com, l.stach@pengutronix.de, linux-pci@vger.kernel.org, Fabio Estevam Subject: [PATCH v3 3/3] PCI: imx6: Use the common LTSSM state mask Date: Mon, 12 Oct 2015 12:46:48 -0300 Message-Id: <1444664808-16445-3-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1444664808-16445-1-git-send-email-festevam@gmail.com> References: <1444664808-16445-1-git-send-email-festevam@gmail.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam Use the common LTSSM_STATE_MASK instead of a local definition. Signed-off-by: Fabio Estevam Reviewed-by: Lucas Stach --- Changes since v2: - Newly introduced in this version. drivers/pci/host/pci-imx6.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c index 4e7b577..4c788d27 100644 --- a/drivers/pci/host/pci-imx6.c +++ b/drivers/pci/host/pci-imx6.c @@ -55,7 +55,6 @@ struct imx6_pcie { #define PCIE_PL_PFLR_LINK_STATE_MASK (0x3f << 16) #define PCIE_PL_PFLR_FORCE_LINK (1 << 15) #define PCIE_PHY_DEBUG_R0 (PL_OFFSET + 0x28) -#define PCIE_PHY_DEBUG_R0_LTSSM_MASK (0x3f << 0) #define PCIE_PHY_DEBUG_R1 (PL_OFFSET + 0x2c) #define PCIE_PHY_DEBUG_R1_XMLH_LINK_IN_TRAINING (1 << 29) #define PCIE_PHY_DEBUG_R1_XMLH_LINK_UP (1 << 4) @@ -508,7 +507,7 @@ static int imx6_pcie_link_up(struct pcie_port *pp) if (rx_valid & PCIE_PHY_RX_ASIC_OUT_VALID) return 0; - if ((debug_r0 & PCIE_PHY_DEBUG_R0_LTSSM_MASK) != LTSSM_STATE_RCVRY_LOCK) + if ((debug_r0 & LTSSM_STATE_MASK) != LTSSM_STATE_RCVRY_LOCK) return 0; dev_err(pp->dev, "transition to gen2 is stuck, reset PHY!\n");