From: Florian Fainelli <f.fainelli@gmail.com>
To: Jaedon Shin <jaedon.shin@gmail.com>,
Brian Norris <computersforpeace@gmail.com>,
Tejun Heo <tj@kernel.org>, Kishon Vijay Abraham I <kishon@ti.com>,
Ralf Baechle <ralf@linux-mips.org>
Cc: Rob Herring <robh+dt@kernel.org>,
Kevin Cernekee <cernekee@gmail.com>,
Dragan Stancevic <dragan.stancevic@gmail.com>,
linux-ide@vger.kernel.org, Linux-MIPS <linux-mips@linux-mips.org>,
devicetree@vger.kernel.org
Subject: Re: [v2 03/10] ata: ahci_brcmstb: add quick for broken phy
Date: Tue, 27 Oct 2015 08:54:17 -0700 [thread overview]
Message-ID: <562F9E29.3060806@gmail.com> (raw)
In-Reply-To: <1445928491-7320-4-git-send-email-jaedon.shin@gmail.com>
On 26/10/15 23:48, Jaedon Shin wrote:
> Add quick for broken phy. The ARM-based 28nm chipsets have four phy
> interface control registers and each port has two registers. But, The
> MIPS-based 40nm chipsets have three. and there are no information and
> documentation. The legacy version of broadcom's strict-ahci based
> initial code did not control these registers.
Qualifying this of a broken PHY is a misnomer, this is more about the
fact that the PHY control registers have a different layout and behavior
on 40nm vs 28nm chips, but more importantly, do not require any kind of
configuration.
>
> Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com>
> ---
> Documentation/devicetree/bindings/ata/brcm,sata-brcmstb.txt | 1 +
> drivers/ata/ahci_brcmstb.c | 10 ++++++++++
> 2 files changed, 11 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/ata/brcm,sata-brcmstb.txt b/Documentation/devicetree/bindings/ata/brcm,sata-brcmstb.txt
> index 488a383ce202..0f0925d58188 100644
> --- a/Documentation/devicetree/bindings/ata/brcm,sata-brcmstb.txt
> +++ b/Documentation/devicetree/bindings/ata/brcm,sata-brcmstb.txt
> @@ -12,6 +12,7 @@ Required properties:
>
> Optional properties:
> - brcm,broken-ncq : if present, NCQ is unusable
> +- brcm,broken-phy : if present, to control phy interface is unusable
Same comment as in patch 1, this is something that can be known based on
the compatible string, and the name of the property is misleading.
>
> Also see ahci-platform.txt.
>
> diff --git a/drivers/ata/ahci_brcmstb.c b/drivers/ata/ahci_brcmstb.c
> index e53962cb48ee..c61303f7c7dc 100644
> --- a/drivers/ata/ahci_brcmstb.c
> +++ b/drivers/ata/ahci_brcmstb.c
> @@ -71,6 +71,7 @@
>
> enum brcm_ahci_quicks {
> BRCM_AHCI_QUICK_NONCQ = BIT(0),
> + BRCM_AHCI_QUICK_NOPHY = BIT(1),
I would use something like BRCM_AHCI_SKIP_PHY_ENABLE or something like
that to illustrate what this really is about.
> };
>
> struct brcm_ahci_priv {
> @@ -119,6 +120,9 @@ static void brcm_sata_phy_enable(struct brcm_ahci_priv *priv, int port)
> void __iomem *p;
> u32 reg;
>
> + if (priv->quicks & BRCM_AHCI_QUICK_NOPHY)
> + return;
> +
> /* clear PHY_DEFAULT_POWER_STATE */
> p = phyctrl + SATA_TOP_CTRL_PHY_CTRL_1;
> reg = brcm_sata_readreg(p);
> @@ -148,6 +152,9 @@ static void brcm_sata_phy_disable(struct brcm_ahci_priv *priv, int port)
> void __iomem *p;
> u32 reg;
>
> + if (priv->quicks & BRCM_AHCI_QUICK_NOPHY)
> + return;
> +
> /* power-off the PHY digital logic */
> p = phyctrl + SATA_TOP_CTRL_PHY_CTRL_2;
> reg = brcm_sata_readreg(p);
> @@ -297,6 +304,9 @@ static int brcm_ahci_probe(struct platform_device *pdev)
> if (of_property_read_bool(dev->of_node, "brcm,broken-ncq"))
> priv->quicks |= BRCM_AHCI_QUICK_NONCQ;
>
> + if (of_property_read_bool(dev->of_node, "brcm,broken-phy"))
> + priv->quicks |= BRCM_AHCI_QUICK_NOPHY;
> +
> brcm_sata_init(priv);
> brcm_sata_quick(pdev, priv);
>
>
--
Florian
next prev parent reply other threads:[~2015-10-27 15:54 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-27 6:48 [v2 00/10] add support SATA for BMIPS_GENERIC Jaedon Shin
[not found] ` <1445928491-7320-1-git-send-email-jaedon.shin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-10-27 6:48 ` [v2 01/10] ata: ahci_brcmstb: add quick for broken ncq Jaedon Shin
2015-10-27 15:46 ` Florian Fainelli
2015-10-27 6:48 ` [v2 02/10] ata: ahci_brcmstb: add support MIPS-based platforms Jaedon Shin
[not found] ` <1445928491-7320-3-git-send-email-jaedon.shin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-10-27 16:35 ` Brian Norris
2015-10-27 6:48 ` [v2 10/10] MIPS: BMIPS: brcmstb: add SATA/PHY nodes for bcm7362 Jaedon Shin
2015-10-27 6:48 ` [v2 03/10] ata: ahci_brcmstb: add quick for broken phy Jaedon Shin
2015-10-27 8:17 ` Rob Herring
2015-10-27 9:55 ` Jaedon Shin
2015-10-27 15:54 ` Florian Fainelli [this message]
2015-10-27 6:48 ` [v2 04/10] ata: ahci_brcmstb: remove unused definitions Jaedon Shin
2015-10-27 6:48 ` [v2 05/10] phy: phy_brcmstb_sata: remove duplicate definitions Jaedon Shin
2015-10-27 6:48 ` [v2 06/10] phy: phy_brcmstb_sata: add data for phy version Jaedon Shin
2015-10-31 15:20 ` Arnd Bergmann
2015-10-27 6:48 ` [v2 07/10] phy: phy_brcmstb_sata: add support MIPS-based platforms Jaedon Shin
2015-10-27 19:28 ` Rob Herring
2015-10-27 6:48 ` [v2 08/10] MIPS: BMIPS: brcmstb: add SATA/PHY nodes for bcm7425 Jaedon Shin
2015-10-27 6:48 ` [v2 09/10] MIPS: BMIPS: brcmstb: add SATA/PHY nodes for bcm7346 Jaedon Shin
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=562F9E29.3060806@gmail.com \
--to=f.fainelli@gmail.com \
--cc=cernekee@gmail.com \
--cc=computersforpeace@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=dragan.stancevic@gmail.com \
--cc=jaedon.shin@gmail.com \
--cc=kishon@ti.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
--cc=robh+dt@kernel.org \
--cc=tj@kernel.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).