All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Mikko Perttunen
	<mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org,
	thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-ide-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v2 6/7] ata: Add support for the Tegra124 SATA controller
Date: Mon, 14 Jul 2014 15:36:48 +0200	[thread overview]
Message-ID: <53C3DCF0.3030001@redhat.com> (raw)
In-Reply-To: <20140708132216.GA4979-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>

Hi,

On 07/08/2014 03:22 PM, Tejun Heo wrote:
> (cc'ing Hans)
> 
> Hans, can you please review this patch?

Done.

Mikko, it looks like you are doing a lot of stuff
the DIY way. I can see there are good reasons for
that though.

Still it would be nice if you could use a little bit
more of the helper functions provided by libahci_platform.c

Specifically I think it would be better if you used
ahci_platform_get_resources, that would remove a lot of
duplicate code from the new driver.

To be specific I would like to suggest that you
raise AHCI_MAX_CLKS to 4, and then specify an order
in which the clks must be listed in the devicetree
binding. Then you can put that order in an enum
and use hpriv->clks[CLK_FOO] in your driver, where
CLK_FOO comes from the enum.

This way you should be able to use ahci_platform_get_resources
and drop doing the iomap of the base registers, all the
clk_gets and the phy_get yourself.

You could then also use ahci_platform_disable_clks() in
tegra_ahci_power_off

Regards,

Hans

WARNING: multiple messages have this Message-ID (diff)
From: Hans de Goede <hdegoede@redhat.com>
To: Tejun Heo <tj@kernel.org>, Mikko Perttunen <mperttunen@nvidia.com>
Cc: swarren@wwwdotorg.org, thierry.reding@gmail.com,
	pdeschrijver@nvidia.com, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-ide@vger.kernel.org
Subject: Re: [PATCH v2 6/7] ata: Add support for the Tegra124 SATA controller
Date: Mon, 14 Jul 2014 15:36:48 +0200	[thread overview]
Message-ID: <53C3DCF0.3030001@redhat.com> (raw)
In-Reply-To: <20140708132216.GA4979@htj.dyndns.org>

Hi,

On 07/08/2014 03:22 PM, Tejun Heo wrote:
> (cc'ing Hans)
> 
> Hans, can you please review this patch?

Done.

Mikko, it looks like you are doing a lot of stuff
the DIY way. I can see there are good reasons for
that though.

Still it would be nice if you could use a little bit
more of the helper functions provided by libahci_platform.c

Specifically I think it would be better if you used
ahci_platform_get_resources, that would remove a lot of
duplicate code from the new driver.

To be specific I would like to suggest that you
raise AHCI_MAX_CLKS to 4, and then specify an order
in which the clks must be listed in the devicetree
binding. Then you can put that order in an enum
and use hpriv->clks[CLK_FOO] in your driver, where
CLK_FOO comes from the enum.

This way you should be able to use ahci_platform_get_resources
and drop doing the iomap of the base registers, all the
clk_gets and the phy_get yourself.

You could then also use ahci_platform_disable_clks() in
tegra_ahci_power_off

Regards,

Hans

WARNING: multiple messages have this Message-ID (diff)
From: hdegoede@redhat.com (Hans de Goede)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 6/7] ata: Add support for the Tegra124 SATA controller
Date: Mon, 14 Jul 2014 15:36:48 +0200	[thread overview]
Message-ID: <53C3DCF0.3030001@redhat.com> (raw)
In-Reply-To: <20140708132216.GA4979@htj.dyndns.org>

Hi,

On 07/08/2014 03:22 PM, Tejun Heo wrote:
> (cc'ing Hans)
> 
> Hans, can you please review this patch?

Done.

Mikko, it looks like you are doing a lot of stuff
the DIY way. I can see there are good reasons for
that though.

Still it would be nice if you could use a little bit
more of the helper functions provided by libahci_platform.c

Specifically I think it would be better if you used
ahci_platform_get_resources, that would remove a lot of
duplicate code from the new driver.

To be specific I would like to suggest that you
raise AHCI_MAX_CLKS to 4, and then specify an order
in which the clks must be listed in the devicetree
binding. Then you can put that order in an enum
and use hpriv->clks[CLK_FOO] in your driver, where
CLK_FOO comes from the enum.

This way you should be able to use ahci_platform_get_resources
and drop doing the iomap of the base registers, all the
clk_gets and the phy_get yourself.

You could then also use ahci_platform_disable_clks() in
tegra_ahci_power_off

Regards,

Hans

  parent reply	other threads:[~2014-07-14 13:36 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-18 14:23 [PATCH v2 0/7] Serial ATA support for NVIDIA Tegra124 Mikko Perttunen
2014-06-18 14:23 ` Mikko Perttunen
2014-06-18 14:23 ` Mikko Perttunen
2014-06-18 14:23 ` [PATCH v2 1/7] of: Add NVIDIA Tegra SATA controller binding Mikko Perttunen
2014-06-18 14:23   ` Mikko Perttunen
2014-06-18 14:23   ` Mikko Perttunen
2014-06-18 14:23 ` [PATCH v2 2/7] ARM: tegra: Add SATA controller to Tegra124 device tree Mikko Perttunen
2014-06-18 14:23   ` Mikko Perttunen
2014-06-18 14:23   ` Mikko Perttunen
2014-06-18 14:23 ` [PATCH v2 3/7] ARM: tegra: Add SATA and SATA power to Jetson TK1 " Mikko Perttunen
2014-06-18 14:23   ` Mikko Perttunen
2014-06-18 14:23   ` Mikko Perttunen
2014-06-18 14:23 ` [PATCH v2 4/7] clk: tegra: Enable hardware control of SATA PLL Mikko Perttunen
2014-06-18 14:23   ` Mikko Perttunen
2014-06-18 14:23   ` Mikko Perttunen
2014-07-08  1:26   ` Andrew Bresticker
2014-07-08  1:26     ` Andrew Bresticker
2014-07-08  1:26     ` Andrew Bresticker
2014-07-08  7:30     ` [PATCH] clk: tegra: Use XUSB-compatible SATA PLL sequence Mikko Perttunen
2014-07-08  7:30       ` Mikko Perttunen
2014-07-08  7:30       ` Mikko Perttunen
2014-07-08  8:16       ` Peter De Schrijver
2014-07-08  8:16         ` Peter De Schrijver
2014-07-08  8:16         ` Peter De Schrijver
2014-06-18 14:23 ` [PATCH v2 5/7] clk: tegra: Add SATA clocks to Tegra124 initialization table Mikko Perttunen
2014-06-18 14:23   ` Mikko Perttunen
2014-06-18 14:23   ` Mikko Perttunen
2014-06-24 19:32   ` Stephen Warren
2014-06-24 19:32     ` Stephen Warren
2014-06-18 14:23 ` [PATCH v2 6/7] ata: Add support for the Tegra124 SATA controller Mikko Perttunen
2014-06-18 14:23   ` Mikko Perttunen
2014-06-18 14:23   ` Mikko Perttunen
     [not found]   ` <1403101406-15439-7-git-send-email-mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-06-24 19:35     ` Stephen Warren
2014-06-24 19:35       ` Stephen Warren
2014-06-24 19:35       ` Stephen Warren
2014-06-26 11:18       ` Mikko Perttunen
2014-06-26 11:18         ` Mikko Perttunen
2014-06-26 11:18         ` Mikko Perttunen
2014-07-08  8:20         ` Mikko Perttunen
2014-07-08  8:20           ` Mikko Perttunen
2014-07-08  8:20           ` Mikko Perttunen
2014-07-09  6:49     ` Thierry Reding
2014-07-09  6:49       ` Thierry Reding
2014-07-09  6:49       ` Thierry Reding
2014-07-09 13:45       ` Mikko Perttunen
2014-07-09 13:45         ` Mikko Perttunen
2014-07-09 13:45         ` Mikko Perttunen
2014-07-08 13:22   ` Tejun Heo
2014-07-08 13:22     ` Tejun Heo
2014-07-08 13:38     ` Mikko Perttunen
2014-07-08 13:38       ` Mikko Perttunen
2014-07-08 13:38       ` Mikko Perttunen
2014-07-14  6:21     ` Mikko Perttunen
2014-07-14  6:21       ` Mikko Perttunen
2014-07-14  6:21       ` Mikko Perttunen
     [not found]       ` <53C376FF.3060509-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-07-14  6:25         ` Hans de Goede
2014-07-14  6:25           ` Hans de Goede
2014-07-14  6:25           ` Hans de Goede
2014-07-14  6:28           ` Mikko Perttunen
2014-07-14  6:28             ` Mikko Perttunen
2014-07-14  6:28             ` Mikko Perttunen
     [not found]     ` <20140708132216.GA4979-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2014-07-14 13:36       ` Hans de Goede [this message]
2014-07-14 13:36         ` Hans de Goede
2014-07-14 13:36         ` Hans de Goede
2014-07-15  7:12         ` Mikko Perttunen
2014-07-15  7:12           ` Mikko Perttunen
2014-07-15  7:12           ` Mikko Perttunen
2014-07-15  8:55           ` Hans de Goede
2014-07-15  8:55             ` Hans de Goede
2014-07-15  8:55             ` Hans de Goede
     [not found]             ` <53C4EC81.1040304-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-07-15  9:03               ` Mikko Perttunen
2014-07-15  9:03                 ` Mikko Perttunen
2014-07-15  9:03                 ` Mikko Perttunen
2014-07-15  9:31             ` Thierry Reding
2014-07-15  9:31               ` Thierry Reding
2014-07-15  9:31               ` Thierry Reding
2014-06-18 14:23 ` [PATCH v2 7/7] ARM: tegra: Add options for Tegra AHCI support to tegra_defconfig Mikko Perttunen
2014-06-18 14:23   ` Mikko Perttunen
2014-06-18 14:23   ` Mikko Perttunen

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=53C3DCF0.3030001@redhat.com \
    --to=hdegoede-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-ide-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
    --cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=tj-DgEjT+Ai2ygdnm+yROfE0A@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 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.