All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Brian Norris <computersforpeace@gmail.com>,
	Tejun Heo <tj@kernel.org>, Kishon Vijay Abraham I <kishon@ti.com>
Cc: Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Gregory Fong <gregory.0xf0@gmail.com>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org
Subject: Re: [PATCH 3/5] ata: add Broadcom AHCI SATA3 driver for STB chips
Date: Fri, 20 Mar 2015 15:58:48 -0700	[thread overview]
Message-ID: <550CA628.3020704@gmail.com> (raw)
In-Reply-To: <1426728222-8197-3-git-send-email-computersforpeace@gmail.com>

On 18/03/15 18:23, Brian Norris wrote:
> Pretty straightforward driver, using the nice library-ization of the
> generic ahci_platform driver.
> 
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
> ---
>  drivers/ata/Kconfig        |   9 +++
>  drivers/ata/Makefile       |   1 +
>  drivers/ata/sata_brcmstb.c | 148 +++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 158 insertions(+)
>  create mode 100644 drivers/ata/sata_brcmstb.c
> 
> diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
> index 5f601553b9b0..33d4b3031705 100644
> --- a/drivers/ata/Kconfig
> +++ b/drivers/ata/Kconfig
> @@ -98,6 +98,15 @@ config SATA_AHCI_PLATFORM
>  
>  	  If unsure, say N.
>  
> +config SATA_BRCMSTB
> +	tristate "Broadcom STB AHCI SATA support"
> +	depends on ARCH_BRCMSTB

We would probably want a select PHY_BRCMSTB_SATA here?

[snip]

> +
> +static void brcm_sata3_init_config(struct brcm_ahci_priv *priv)
> +{
> +	/* Configure endianness */
> +	writel((DATA_ENDIAN << 4) | (DATA_ENDIAN << 2) | (MMIO_ENDIAN << 0),
> +		priv->top_ctrl + SATA_TOP_CTRL_BUS_CTRL);

AFAIR, this portion of the initialization must be done in the host-CPU
native endianness, so __raw_writel() would be more appropriate, or we
could use Kevin's conditional I/O accessors and do either ioread32() or
ioread32be() based on the absence/presence of the "big-endian" property?


[snip]

> +
> +static const struct of_device_id ahci_of_match[] = {
> +	{.compatible = "brcm,sata3-ahci"},

The binding specifies brcm,bcm7445-ahci as a valid compatible string,
such that we would probably want to match it here for consistency.
-- 
Florian

WARNING: multiple messages have this Message-ID (diff)
From: f.fainelli@gmail.com (Florian Fainelli)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/5] ata: add Broadcom AHCI SATA3 driver for STB chips
Date: Fri, 20 Mar 2015 15:58:48 -0700	[thread overview]
Message-ID: <550CA628.3020704@gmail.com> (raw)
In-Reply-To: <1426728222-8197-3-git-send-email-computersforpeace@gmail.com>

On 18/03/15 18:23, Brian Norris wrote:
> Pretty straightforward driver, using the nice library-ization of the
> generic ahci_platform driver.
> 
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
> ---
>  drivers/ata/Kconfig        |   9 +++
>  drivers/ata/Makefile       |   1 +
>  drivers/ata/sata_brcmstb.c | 148 +++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 158 insertions(+)
>  create mode 100644 drivers/ata/sata_brcmstb.c
> 
> diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
> index 5f601553b9b0..33d4b3031705 100644
> --- a/drivers/ata/Kconfig
> +++ b/drivers/ata/Kconfig
> @@ -98,6 +98,15 @@ config SATA_AHCI_PLATFORM
>  
>  	  If unsure, say N.
>  
> +config SATA_BRCMSTB
> +	tristate "Broadcom STB AHCI SATA support"
> +	depends on ARCH_BRCMSTB

We would probably want a select PHY_BRCMSTB_SATA here?

[snip]

> +
> +static void brcm_sata3_init_config(struct brcm_ahci_priv *priv)
> +{
> +	/* Configure endianness */
> +	writel((DATA_ENDIAN << 4) | (DATA_ENDIAN << 2) | (MMIO_ENDIAN << 0),
> +		priv->top_ctrl + SATA_TOP_CTRL_BUS_CTRL);

AFAIR, this portion of the initialization must be done in the host-CPU
native endianness, so __raw_writel() would be more appropriate, or we
could use Kevin's conditional I/O accessors and do either ioread32() or
ioread32be() based on the absence/presence of the "big-endian" property?


[snip]

> +
> +static const struct of_device_id ahci_of_match[] = {
> +	{.compatible = "brcm,sata3-ahci"},

The binding specifies brcm,bcm7445-ahci as a valid compatible string,
such that we would probably want to match it here for consistency.
-- 
Florian

  reply	other threads:[~2015-03-20 22:59 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-19  1:23 [PATCH 1/5] Documentation: devicetree: add Broadcom SATA binding Brian Norris
2015-03-19  1:23 ` Brian Norris
2015-03-19  1:23 ` [PATCH 2/5] Documentation: devicetree: add Broadcom SATA PHY binding Brian Norris
2015-03-19  1:23   ` Brian Norris
2015-03-19  1:23 ` [PATCH 3/5] ata: add Broadcom AHCI SATA3 driver for STB chips Brian Norris
2015-03-19  1:23   ` Brian Norris
2015-03-20 22:58   ` Florian Fainelli [this message]
2015-03-20 22:58     ` Florian Fainelli
2015-03-19  1:23 ` [PATCH 4/5] phy: add Broadcom SATA3 PHY driver for Broadcom STB SoCs Brian Norris
2015-03-19  1:23   ` Brian Norris
2015-03-20 23:02   ` Florian Fainelli
2015-03-20 23:02     ` Florian Fainelli
2015-03-21  9:09     ` Hans de Goede
2015-03-21  9:09       ` Hans de Goede
2015-03-25 21:59   ` Kishon Vijay Abraham I
2015-03-25 21:59     ` Kishon Vijay Abraham I
2015-03-25 21:59     ` Kishon Vijay Abraham I
2015-03-28  0:28     ` Brian Norris
2015-03-28  0:28       ` Brian Norris
2015-03-31  6:01       ` Kishon Vijay Abraham I
2015-03-31  6:01         ` Kishon Vijay Abraham I
2015-03-31  6:01         ` Kishon Vijay Abraham I
2015-04-02  2:28         ` Brian Norris
2015-04-02  2:28           ` Brian Norris
2015-04-07  6:07           ` Kishon Vijay Abraham I
2015-04-07  6:07             ` Kishon Vijay Abraham I
2015-04-07  6:07             ` Kishon Vijay Abraham I
2015-04-07 18:35             ` Brian Norris
2015-04-07 18:35               ` Brian Norris
2015-03-19  1:23 ` [PATCH 5/5] ARM: dts: brcmstb: add nodes for SATA controller and PHY Brian Norris
2015-03-19  1:23   ` Brian Norris
     [not found]   ` <1426728222-8197-5-git-send-email-computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-03-19 11:10     ` Hans de Goede
2015-03-19 11:10       ` Hans de Goede
2015-03-19 11:10       ` Hans de Goede
     [not found]       ` <550AAEA1.5080301-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-03-19 15:53         ` Brian Norris
2015-03-19 15:53           ` Brian Norris
2015-03-19 15:53           ` Brian Norris
2015-03-19 17:02           ` Hans de Goede
2015-03-19 17:02             ` Hans de Goede
2015-03-19 17:02             ` Hans de Goede
2015-03-19 17:36             ` Brian Norris
2015-03-19 17:36               ` Brian Norris
2015-03-19 19:11               ` Brian Norris
2015-03-19 19:11                 ` Brian Norris
2015-03-20  8:48                 ` Hans de Goede
2015-03-20  8:48                   ` Hans de Goede
2015-03-19 11:33     ` Sergei Shtylyov
2015-03-19 11:33       ` Sergei Shtylyov
2015-03-19 11:33       ` Sergei Shtylyov
2015-03-19 15:58       ` Brian Norris
2015-03-19 15:58         ` Brian Norris

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=550CA628.3020704@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=computersforpeace@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=gregory.0xf0@gmail.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=kishon@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.