linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Jaedon Shin <jaedon.shin@gmail.com>, Tejun Heo <tj@kernel.org>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Rob Herring <robh+dt@kernel.org>,
	Brian Norris <computersforpeace@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	linux-ide@vger.kernel.org
Cc: Ralf Baechle <ralf@linux-mips.org>,
	Dragan Stancevic <dragan.stancevic@gmail.com>
Subject: Re: [v6 6/7] phy: phy_brcmstb_sata: add data for phy version
Date: Thu, 26 Nov 2015 14:05:03 +0300	[thread overview]
Message-ID: <5656E75F.9020701@cogentembedded.com> (raw)
In-Reply-To: <1448506595-4981-7-git-send-email-jaedon.shin@gmail.com>

Hello.

On 11/26/2015 5:56 AM, Jaedon Shin wrote:

> Add data for phy version, and the default value of version is using the
> BRCM_SATA_PHY_28NM.
>
> Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com>
> Tested-by: Florian Fainelli <f.fainelli@gmail.com>
> Acked-by: Brian Norris <computersforpeace@gmail.com>
> ---
>   drivers/phy/phy-brcmstb-sata.c | 23 ++++++++++++++++++++---
>   1 file changed, 20 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/phy/phy-brcmstb-sata.c b/drivers/phy/phy-brcmstb-sata.c
> index 0be55dafe9ea..5de394f589c8 100644
> --- a/drivers/phy/phy-brcmstb-sata.c
> +++ b/drivers/phy/phy-brcmstb-sata.c
> @@ -30,7 +30,11 @@
>   #define MAX_PORTS					2
>
>   /* Register offset between PHYs in PCB space */
> -#define SATA_MDIO_REG_SPACE_SIZE			0x1000
> +#define SATA_MDIO_REG_28NM_SPACE_SIZE			0x1000
> +
> +enum brcm_sata_phy_version {
> +	BRCM_SATA_PHY_28NM,
> +};

    So an uninitialized .data field would mean the same?

[...]
> @@ -126,7 +135,8 @@ static const struct phy_ops phy_ops_28nm = {
>   };
>
>   static const struct of_device_id brcm_sata_phy_of_match[] = {
> -	{ .compatible	= "brcm,bcm7445-sata-phy" },
> +	{ .compatible	= "brcm,bcm7445-sata-phy",
> +	  .data = (void *)BRCM_SATA_PHY_28NM },
>   	{},
>   };
>   MODULE_DEVICE_TABLE(of, brcm_sata_phy_of_match);
> @@ -135,6 +145,7 @@ static int brcm_sata_phy_probe(struct platform_device *pdev)
>   {
>   	struct device *dev = &pdev->dev;
>   	struct device_node *dn = dev->of_node, *child;
> +	const struct of_device_id *of_id;
>   	struct brcm_sata_phy *priv;
>   	struct resource *res;
>   	struct phy_provider *provider;
> @@ -154,6 +165,12 @@ static int brcm_sata_phy_probe(struct platform_device *pdev)
>   	if (IS_ERR(priv->phy_base))
>   		return PTR_ERR(priv->phy_base);
>
> +	of_id = of_match_node(brcm_sata_phy_of_match, dn);
> +	if (of_id)
> +		priv->version = (enum brcm_sata_phy_version)of_id->data;
> +	else
> +		priv->version = BRCM_SATA_PHY_28NM;
> +
>   	for_each_available_child_of_node(dn, child) {
>   		unsigned int id;
>   		struct brcm_sata_port *port;

MBR, Sergei



  reply	other threads:[~2015-11-26 11:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-26  2:56 [v6 0/7] add support SATA for BMIPS_GENERIC Jaedon Shin
2015-11-26  2:56 ` [v6 1/7] ata: ahci_brcmstb: add support for MIPS-based platforms Jaedon Shin
2015-11-26  2:56 ` [v6 2/7] ata: ahci_brcmstb: disable NCQ " Jaedon Shin
2015-11-26  2:56 ` [v6 3/7] ata: ahci_brcmstb: add a quirk " Jaedon Shin
2015-11-26  2:56 ` [v6 4/7] ata: ahci_brcmstb: remove unused definitions Jaedon Shin
2015-11-30 14:58   ` Tejun Heo
2015-11-26  2:56 ` [v6 5/7] phy: phy_brcmstb_sata: remove duplicate definitions Jaedon Shin
2015-11-26  2:56 ` [v6 6/7] phy: phy_brcmstb_sata: add data for phy version Jaedon Shin
2015-11-26 11:05   ` Sergei Shtylyov [this message]
2015-12-15 10:46     ` Kishon Vijay Abraham I
2015-12-15 11:23       ` Jaedon Shin
2015-12-17  0:46         ` Florian Fainelli
2015-11-26  2:56 ` [v6 7/7] phy: phy_brcmstb_sata: add support for MIPS-based platforms Jaedon Shin
2015-12-20 12:01 ` [v6 0/7] add support SATA for BMIPS_GENERIC Kishon Vijay Abraham I
2015-12-24 17:52   ` Florian Fainelli
2015-12-28 15:56     ` Tejun Heo
2016-01-01  2:21       ` Tejun Heo
2016-01-01  2:34         ` 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=5656E75F.9020701@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=computersforpeace@gmail.com \
    --cc=dragan.stancevic@gmail.com \
    --cc=f.fainelli@gmail.com \
    --cc=jaedon.shin@gmail.com \
    --cc=kishon@ti.com \
    --cc=linux-ide@vger.kernel.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).