devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Ray Jui <ray.jui@broadcom.com>,
	Srinath Mannam <srinath.mannam@broadcom.com>,
	Vivek Gautam <vivek.gautam@codeaurora.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Heiko Stuebner <heiko@sntech.de>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>,
	bcm-kernel-feedback-list@broadcom.com
Subject: [PATCH 2/3] phy: brcm-sata: Prepare for doing more tuning
Date: Wed, 11 Oct 2017 17:53:11 -0700	[thread overview]
Message-ID: <20171012005312.17363-3-f.fainelli@gmail.com> (raw)
In-Reply-To: <20171012005312.17363-1-f.fainelli@gmail.com>

Split the functional code in brcm_stb_sata_init() to a separate function
that actually does configure spread spectrum: brcm_stb_sata_ssc_init()
and make that function return void, since that function cannot fail.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/phy/broadcom/phy-brcm-sata.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/phy/broadcom/phy-brcm-sata.c b/drivers/phy/broadcom/phy-brcm-sata.c
index 9d7f74fe3d7c..0152d0b32dae 100644
--- a/drivers/phy/broadcom/phy-brcm-sata.c
+++ b/drivers/phy/broadcom/phy-brcm-sata.c
@@ -190,7 +190,7 @@ static u32 brcm_sata_phy_rd(void __iomem *pcb_base, u32 bank, u32 ofs)
 #define STB_FMAX_VAL_DEFAULT	0x3df
 #define STB_FMAX_VAL_SSC	0x83
 
-static int brcm_stb_sata_init(struct brcm_sata_port *port)
+static void brcm_stb_sata_ssc_init(struct brcm_sata_port *port)
 {
 	void __iomem *base = brcm_sata_pcb_base(port);
 	struct brcm_sata_phy *priv = port->phy_priv;
@@ -215,6 +215,11 @@ static int brcm_stb_sata_init(struct brcm_sata_port *port)
 
 	brcm_sata_phy_wr(base, TXPMD_REG_BANK, TXPMD_TX_FREQ_CTRL_CONTROL3,
 			  ~TXPMD_TX_FREQ_CTRL_CONTROL3_FMAX_MASK, tmp);
+}
+
+static int brcm_stb_sata_init(struct brcm_sata_port *port)
+{
+	brcm_stb_sata_ssc_init(port);
 
 	return 0;
 }
-- 
2.9.3

  parent reply	other threads:[~2017-10-12  0:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-12  0:53 [PATCH 0/3] phy: brcm-sata: Allow RX equalizer tuning Florian Fainelli
2017-10-12  0:53 ` [PATCH 1/3] dt-bindings: phy: Add RX equalizer properties for Broadcom SATA PHY Florian Fainelli
2017-10-17 20:26   ` Rob Herring
2017-10-12  0:53 ` Florian Fainelli [this message]
     [not found] ` <20171012005312.17363-1-f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-10-12  0:53   ` [PATCH 3/3] phy: brcm-sata: Allow RX equalizer tuning Florian Fainelli
2017-10-18 12:18   ` [PATCH 0/3] " Kishon Vijay Abraham I

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171012005312.17363-3-f.fainelli@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=dan.carpenter@oracle.com \
    --cc=devicetree@vger.kernel.org \
    --cc=heiko@sntech.de \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=ray.jui@broadcom.com \
    --cc=robh+dt@kernel.org \
    --cc=srinath.mannam@broadcom.com \
    --cc=viresh.kumar@linaro.org \
    --cc=vivek.gautam@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).