devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Thomas Petazzoni
	<thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Cc: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	linux-ide-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Nadav Haklai <nadavh-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
	Lior Amsalem <alior-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
	Hanna Hawa <hannah-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
	Yehuda Yitschak <yehuday-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
	Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>,
	Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>,
	Sebastian Hesselbarth
	<sebastian.hesselbarth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Gregory Clement
	<gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Subject: Re: [PATCH 1/5] ata: ahci: add support for non-standard port offset/length
Date: Fri, 22 Apr 2016 13:59:36 -0400	[thread overview]
Message-ID: <20160422175936.GU7822@mtj.duckdns.org> (raw)
In-Reply-To: <1461335561-18363-2-git-send-email-thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>

Hello,

On Fri, Apr 22, 2016 at 04:32:37PM +0200, Thomas Petazzoni wrote:
> @@ -1714,10 +1714,11 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
>  
>  	for (i = 0; i < host->n_ports; i++) {
>  		struct ata_port *ap = host->ports[i];
> +		unsigned int offset =
> +			hpriv->port_offset + ap->port_no * hpriv->port_length;
>  
>  		ata_port_pbar_desc(ap, ahci_pci_bar, -1, "abar");
> -		ata_port_pbar_desc(ap, ahci_pci_bar,
> -				   0x100 + ap->port_no * 0x80, "port");
> +		ata_port_pbar_desc(ap, ahci_pci_bar, offset, "port");

Doesn't this just affect ahci_platform?  Why is ahci_init_one() being
updated?  Also, who's setting port_offet and port_length for
non-platform ahci drivers?

> @@ -556,10 +559,12 @@ int ahci_platform_init_host(struct platform_device *pdev,
>  
>  	for (i = 0; i < host->n_ports; i++) {
>  		struct ata_port *ap = host->ports[i];
> +		unsigned int offset =
> +			hpriv->port_offset + ap->port_no * hpriv->port_length;
>  
>  		ata_port_desc(ap, "mmio %pR",
>  			      platform_get_resource(pdev, IORESOURCE_MEM, 0));
> -		ata_port_desc(ap, "port 0x%x", 0x100 + ap->port_no * 0x80);
> +		ata_port_desc(ap, "port 0x%x", offset);

If this needs to be configurable, wouldn't it be better to just let it
be specified per port?

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-04-22 17:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-22 14:32 [PATCH 0/5] ata: add support for Marvell Armada 7K/8K AHCI Thomas Petazzoni
2016-04-22 14:32 ` [PATCH 1/5] ata: ahci: add support for non-standard port offset/length Thomas Petazzoni
     [not found]   ` <1461335561-18363-2-git-send-email-thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2016-04-22 17:59     ` Tejun Heo [this message]
2016-04-27 12:22       ` Thomas Petazzoni
     [not found]         ` <20160427142250.12764279-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2016-05-02 16:38           ` Tejun Heo
2016-04-22 14:32 ` [PATCH 2/5] ata: acard-ahci: use the new port_{offset,length} members Thomas Petazzoni
2016-04-22 14:32 ` [PATCH 3/5] ata: ahci_ceva: " Thomas Petazzoni
2016-04-22 14:32 ` [PATCH 4/5] ata: ahci_mvebu: add support for Armada 8K Thomas Petazzoni
2016-04-22 14:32 ` [PATCH 5/5] dt-bindings: ata: add compatible string for Armada 8K to ahci-platform Thomas Petazzoni
2016-04-25 12:47   ` Rob Herring
2016-05-19  8:19 ` [PATCH 0/5] ata: add support for Marvell Armada 7K/8K AHCI Thomas Petazzoni

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=20160422175936.GU7822@mtj.duckdns.org \
    --to=tj-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=alior-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org \
    --cc=andrew-g2DYL2Zd6BY@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
    --cc=hannah-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org \
    --cc=hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org \
    --cc=linux-ide-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=nadavh-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=sebastian.hesselbarth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
    --cc=yehuday-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.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).