Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3532155imm; Mon, 2 Jul 2018 00:21:59 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdk9gq8t98T2yy7gtr+IAU3lHzntpgG9i7RBUUaZ9cWNDmp17n8VegBvYqIzZ6NywesQIgg X-Received: by 2002:a62:2785:: with SMTP id n127-v6mr24339978pfn.129.1530516118972; Mon, 02 Jul 2018 00:21:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530516118; cv=none; d=google.com; s=arc-20160816; b=wNPh548uiNWpziXQLNRKg1wKRfcVHoFL5a8++ha2s6S5rdvQg90SWXVfds7/yxBLae 7410SF637RUnPO8q+J9ocQEoQWqb6hbhPWHl5/VQTd/kY3Z8x61dESKGS54DgsiXMYc6 Ib4+N8OpdzL+GPiok+YOl9JoGA6IjullI4zf7ZlERpTqG+IMyvrE/xlQyLsd8fH8ycHX AKB1PVXFOV8YhjpMYSxuc3DkHxORoZbeXuL8vlfi5bxpbTSoPZ6jh8LGMfzqc5RJuwd/ T+67nR2fJzyibM6fNt60E8g3O0fzbQA/w7LjIlZc0PQX25Ldex2RncQF9Vwwr7MvcVa2 pVNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dmarc-filter:dkim-signature :dkim-signature:arc-authentication-results; bh=2scjr0vnf6Jpwu8wNmDVxqWMDHVykcQI03UCa3M+1jw=; b=uGJ8de0d4ccMdA0jEyNnnf7J+rngZuBcc1AqbstJwHo0AjUxlEtwJepCZjY0CUuZQt q67jJ2arC8Q4PPJ1GsFN5mpgatYbJYLAcQoyYTVLcGmiY4Qj2gR3EFTEms0h34KT/39a IwAhPi1TRHFn1dN6Q/9zaJdCSuIrh4oy9KZooUwJEZhk9UmUh9FjLdekGbb5fotnm9tV tAIZzrxWM5CXhJp71ZYuZy2CyB8epC8Kc7knORC4//RODmpZnEXZRqX1DEU17rEULAJc lEY7azvdSDmssZ2oF1Q5iX5aP3ntULRxJo6TsmFPzZqhY9tfjGqV80VdIIJweHV+GAfl ktOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=PJJEqv10; dkim=pass header.i=@codeaurora.org header.s=default header.b="YyQZWku/"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l7-v6si10603420pgc.650.2018.07.02.00.21.44; Mon, 02 Jul 2018 00:21:58 -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=@codeaurora.org header.s=default header.b=PJJEqv10; dkim=pass header.i=@codeaurora.org header.s=default header.b="YyQZWku/"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752676AbeGBGmU (ORCPT + 99 others); Mon, 2 Jul 2018 02:42:20 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:52794 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752068AbeGBGmS (ORCPT ); Mon, 2 Jul 2018 02:42:18 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 082BA606FC; Mon, 2 Jul 2018 06:42:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1530513738; bh=n8bOhuB4DFBlB5Rxl2IIfr1KzPyl6lsX6Z1Y7ajB6Ng=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=PJJEqv10R9mNPTo3lStFMRODFC+P7ZjkzN7phj/8CXaiAwT9+Yopjt+1cvJHt2DZ6 y1auSGs5bwsU0aKvaEFiyPktEj6JRaXB3sWjQWuaUJMbjAh3T6fuofVT0nzwWhZk+4 iIHymv62jQLvFSMAgm9hnBumwut6Mz3IuQpAZy6I= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from mail-qk0-f180.google.com (mail-qk0-f180.google.com [209.85.220.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: vivek.gautam@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 06C1660B10; Mon, 2 Jul 2018 06:42:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1530513737; bh=n8bOhuB4DFBlB5Rxl2IIfr1KzPyl6lsX6Z1Y7ajB6Ng=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=YyQZWku/hEx0ozUiPFMoScmoKY1SKnNdrxZJsTeW2Gw+ZDRZB+nf23NNYFBzTwgwh 8r8u9l9cg7SL1xvbAp97ypMMJESPw9DPThO3WWqB6cBKM3QwYaDZdkzK2ehbJ8eJ8Z IAqEavUCn9gGsHQkHnGDQ5DtP7i7h/pNEehVxDRM= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 06C1660B10 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=vivek.gautam@codeaurora.org Received: by mail-qk0-f180.google.com with SMTP id u62-v6so8126284qkf.9; Sun, 01 Jul 2018 23:42:16 -0700 (PDT) X-Gm-Message-State: APt69E3O2DLhCaxn4M5s2QP8q98tyCUYRF2sVM3zVH5re/7q0edH0gBm mEB8c7M9Ddoa6QEz7rXc2ODWqRdzQhiongMZTCQ= X-Received: by 2002:a37:7c45:: with SMTP id x66-v6mr20581844qkc.310.1530513736201; Sun, 01 Jul 2018 23:42:16 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac8:1082:0:0:0:0:0 with HTTP; Sun, 1 Jul 2018 23:42:15 -0700 (PDT) In-Reply-To: <20180619083647.10116-3-cang@codeaurora.org> References: <20180619083647.10116-1-cang@codeaurora.org> <20180619083647.10116-3-cang@codeaurora.org> From: Vivek Gautam Date: Mon, 2 Jul 2018 12:12:15 +0530 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v7 2/4] phy: General struct and field cleanup To: Can Guo Cc: Subhash Jadavani , asutoshd@codeaurora.org, Manu Gautam , kishon , "robh+dt" , Mark Rutland , open list , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , linux-arm-msm Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Can, On Tue, Jun 19, 2018 at 2:06 PM, Can Guo wrote: > Move MSM8996 specific PHY vreg list struct name to a genernal one as it is > used by all PHYs. Add a specific field to handle dual lane situation. > > Signed-off-by: Can Guo > --- > drivers/phy/qualcomm/phy-qcom-qmp.c | 25 ++++++++++++++----------- > 1 file changed, 14 insertions(+), 11 deletions(-) > > diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c > index ccb8578..9be9754 100644 > --- a/drivers/phy/qualcomm/phy-qcom-qmp.c > +++ b/drivers/phy/qualcomm/phy-qcom-qmp.c > @@ -649,6 +649,8 @@ struct qmp_phy_cfg { > > /* true, if PHY has a separate DP_COM control block */ > bool has_phy_dp_com_ctrl; > + /* true, if PHY has secondary tx/rx lanes to be configured */ > + bool is_dual_lane_phy; > /* Register offset of secondary tx/rx lanes for USB DP combo PHY */ > unsigned int tx_b_lane_offset; > unsigned int rx_b_lane_offset; > @@ -758,7 +760,7 @@ static inline void qphy_clrbits(void __iomem *base, u32 offset, u32 val) > }; > > /* list of regulators */ > -static const char * const msm8996_phy_vreg_l[] = { > +static const char * const qmp_phy_vreg_l[] = { > "vdda-phy", "vdda-pll", > }; > > @@ -778,8 +780,8 @@ static inline void qphy_clrbits(void __iomem *base, u32 offset, u32 val) > .num_clks = ARRAY_SIZE(msm8996_phy_clk_l), > .reset_list = msm8996_pciephy_reset_l, > .num_resets = ARRAY_SIZE(msm8996_pciephy_reset_l), > - .vreg_list = msm8996_phy_vreg_l, > - .num_vregs = ARRAY_SIZE(msm8996_phy_vreg_l), > + .vreg_list = qmp_phy_vreg_l, > + .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), > .regs = pciephy_regs_layout, > > .start_ctrl = PCS_START | PLL_READY_GATE_EN, > @@ -809,8 +811,8 @@ static inline void qphy_clrbits(void __iomem *base, u32 offset, u32 val) > .num_clks = ARRAY_SIZE(msm8996_phy_clk_l), > .reset_list = msm8996_usb3phy_reset_l, > .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), > - .vreg_list = msm8996_phy_vreg_l, > - .num_vregs = ARRAY_SIZE(msm8996_phy_vreg_l), > + .vreg_list = qmp_phy_vreg_l, > + .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), > .regs = usb3phy_regs_layout, > > .start_ctrl = SERDES_START | PCS_START, > @@ -870,8 +872,8 @@ static inline void qphy_clrbits(void __iomem *base, u32 offset, u32 val) > .num_clks = ARRAY_SIZE(qmp_v3_phy_clk_l), > .reset_list = msm8996_usb3phy_reset_l, > .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), > - .vreg_list = msm8996_phy_vreg_l, > - .num_vregs = ARRAY_SIZE(msm8996_phy_vreg_l), > + .vreg_list = qmp_phy_vreg_l, > + .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), > .regs = qmp_v3_usb3phy_regs_layout, > > .start_ctrl = SERDES_START | PCS_START, > @@ -883,6 +885,7 @@ static inline void qphy_clrbits(void __iomem *base, u32 offset, u32 val) > .pwrdn_delay_max = POWER_DOWN_DELAY_US_MAX, > > .has_phy_dp_com_ctrl = true, > + .is_dual_lane_phy = true, > .tx_b_lane_offset = 0x400, > .rx_b_lane_offset = 0x400, > }; > @@ -903,8 +906,8 @@ static inline void qphy_clrbits(void __iomem *base, u32 offset, u32 val) > .num_clks = ARRAY_SIZE(qmp_v3_phy_clk_l), > .reset_list = msm8996_usb3phy_reset_l, > .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), > - .vreg_list = msm8996_phy_vreg_l, > - .num_vregs = ARRAY_SIZE(msm8996_phy_vreg_l), > + .vreg_list = qmp_phy_vreg_l, > + .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), > .regs = qmp_v3_usb3phy_regs_layout, > > .start_ctrl = SERDES_START | PCS_START, > @@ -1116,12 +1119,12 @@ static int qcom_qmp_phy_init(struct phy *phy) > /* Tx, Rx, and PCS configurations */ > qcom_qmp_phy_configure(tx, cfg->regs, cfg->tx_tbl, cfg->tx_tbl_num); > /* Configuration for other LANE for USB-DP combo PHY */ > - if (cfg->has_phy_dp_com_ctrl) > + if (cfg->is_dual_lane_phy) > qcom_qmp_phy_configure(tx + cfg->tx_b_lane_offset, cfg->regs, > cfg->tx_tbl, cfg->tx_tbl_num); > > qcom_qmp_phy_configure(rx, cfg->regs, cfg->rx_tbl, cfg->rx_tbl_num); > - if (cfg->has_phy_dp_com_ctrl) > + if (cfg->is_dual_lane_phy) > qcom_qmp_phy_configure(rx + cfg->rx_b_lane_offset, cfg->regs, > cfg->rx_tbl, cfg->rx_tbl_num); > Thanks for the patch. Looks good to me now. Reviewed-by: Vivek Gautam Best regards Vivek > -- > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, > a Linux Foundation Collaborative Project > > -- > To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation