All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] sata: xgene: add ACPI support for APM X-Gene SATA ports
@ 2015-03-19  0:03 Feng Kan
  2015-03-19  9:58 ` Mika Westerberg
  2015-03-19 18:22 ` Tejun Heo
  0 siblings, 2 replies; 4+ messages in thread
From: Feng Kan @ 2015-03-19  0:03 UTC (permalink / raw)
  To: patches, linux-ide, linux-kernel, linux-acpi, tj; +Cc: Feng Kan

This adds ACPI support for the APM X-Gene SATA ports. When the system
boots using ACPI table, the SATA ports are able to configure using the
values supplied by the ACPI table rather than the DTS.

Signed-off-by: Feng Kan <fkan@apm.com>
Reviewed-by: Hanjun Guo <hanjun.guo@linaro.org>
---
 drivers/ata/ahci_xgene.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c
index 2e8bb60..2b78510 100644
--- a/drivers/ata/ahci_xgene.c
+++ b/drivers/ata/ahci_xgene.c
@@ -22,6 +22,7 @@
  * NOTE: PM support is not currently available.
  *
  */
+#include <linux/acpi.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/ahci_platform.h>
@@ -718,6 +719,14 @@ disable_resources:
 	return rc;
 }
 
+#ifdef CONFIG_ACPI
+static const struct acpi_device_id xgene_ahci_acpi_match[] = {
+	{ "APMC0D0D", },
+	{ }
+};
+MODULE_DEVICE_TABLE(acpi, xgene_ahci_acpi_match);
+#endif
+
 static const struct of_device_id xgene_ahci_of_match[] = {
 	{.compatible = "apm,xgene-ahci"},
 	{},
@@ -730,6 +739,7 @@ static struct platform_driver xgene_ahci_driver = {
 	.driver = {
 		.name = DRV_NAME,
 		.of_match_table = xgene_ahci_of_match,
+		.acpi_match_table = ACPI_PTR(xgene_ahci_acpi_match),
 	},
 };
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH RESEND] sata: xgene: add ACPI support for APM X-Gene SATA ports
  2015-03-19  0:03 [PATCH RESEND] sata: xgene: add ACPI support for APM X-Gene SATA ports Feng Kan
@ 2015-03-19  9:58 ` Mika Westerberg
  2015-03-19 11:32   ` Rafael J. Wysocki
  2015-03-19 18:22 ` Tejun Heo
  1 sibling, 1 reply; 4+ messages in thread
From: Mika Westerberg @ 2015-03-19  9:58 UTC (permalink / raw)
  To: Feng Kan
  Cc: patches, linux-ide, linux-kernel, linux-acpi, tj, Rafael J. Wysocki

On Wed, Mar 18, 2015 at 05:03:55PM -0700, Feng Kan wrote:
> This adds ACPI support for the APM X-Gene SATA ports. When the system
> boots using ACPI table, the SATA ports are able to configure using the
> values supplied by the ACPI table rather than the DTS.
> 
> Signed-off-by: Feng Kan <fkan@apm.com>
> Reviewed-by: Hanjun Guo <hanjun.guo@linaro.org>

One minor comment, see below. Other than that this looks good to me:

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>

> ---
>  drivers/ata/ahci_xgene.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c
> index 2e8bb60..2b78510 100644
> --- a/drivers/ata/ahci_xgene.c
> +++ b/drivers/ata/ahci_xgene.c
> @@ -22,6 +22,7 @@
>   * NOTE: PM support is not currently available.
>   *
>   */
> +#include <linux/acpi.h>
>  #include <linux/module.h>
>  #include <linux/platform_device.h>
>  #include <linux/ahci_platform.h>
> @@ -718,6 +719,14 @@ disable_resources:
>  	return rc;
>  }
>  
> +#ifdef CONFIG_ACPI
> +static const struct acpi_device_id xgene_ahci_acpi_match[] = {
> +	{ "APMC0D0D", },

I think writing the above without comma would look better:

	{ "APMC0D0D" },


> +	{ }
> +};
> +MODULE_DEVICE_TABLE(acpi, xgene_ahci_acpi_match);
> +#endif
> +
>  static const struct of_device_id xgene_ahci_of_match[] = {
>  	{.compatible = "apm,xgene-ahci"},
>  	{},
> @@ -730,6 +739,7 @@ static struct platform_driver xgene_ahci_driver = {
>  	.driver = {
>  		.name = DRV_NAME,
>  		.of_match_table = xgene_ahci_of_match,
> +		.acpi_match_table = ACPI_PTR(xgene_ahci_acpi_match),
>  	},
>  };
>  
> -- 
> 1.9.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH RESEND] sata: xgene: add ACPI support for APM X-Gene SATA ports
  2015-03-19  9:58 ` Mika Westerberg
@ 2015-03-19 11:32   ` Rafael J. Wysocki
  0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2015-03-19 11:32 UTC (permalink / raw)
  To: Mika Westerberg, Feng Kan, tj
  Cc: patches, linux-ide, linux-kernel, linux-acpi, Rafael J. Wysocki

On Thursday, March 19, 2015 11:58:50 AM Mika Westerberg wrote:
> On Wed, Mar 18, 2015 at 05:03:55PM -0700, Feng Kan wrote:
> > This adds ACPI support for the APM X-Gene SATA ports. When the system
> > boots using ACPI table, the SATA ports are able to configure using the
> > values supplied by the ACPI table rather than the DTS.
> > 
> > Signed-off-by: Feng Kan <fkan@apm.com>
> > Reviewed-by: Hanjun Guo <hanjun.guo@linaro.org>
> 
> One minor comment, see below. Other than that this looks good to me:
> 
> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>

Thanks Mika!

So for the patch

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

> > ---
> >  drivers/ata/ahci_xgene.c | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> > 
> > diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c
> > index 2e8bb60..2b78510 100644
> > --- a/drivers/ata/ahci_xgene.c
> > +++ b/drivers/ata/ahci_xgene.c
> > @@ -22,6 +22,7 @@
> >   * NOTE: PM support is not currently available.
> >   *
> >   */
> > +#include <linux/acpi.h>
> >  #include <linux/module.h>
> >  #include <linux/platform_device.h>
> >  #include <linux/ahci_platform.h>
> > @@ -718,6 +719,14 @@ disable_resources:
> >  	return rc;
> >  }
> >  
> > +#ifdef CONFIG_ACPI
> > +static const struct acpi_device_id xgene_ahci_acpi_match[] = {
> > +	{ "APMC0D0D", },
> 
> I think writing the above without comma would look better:
> 
> 	{ "APMC0D0D" },
> 
> 
> > +	{ }
> > +};
> > +MODULE_DEVICE_TABLE(acpi, xgene_ahci_acpi_match);
> > +#endif
> > +
> >  static const struct of_device_id xgene_ahci_of_match[] = {
> >  	{.compatible = "apm,xgene-ahci"},
> >  	{},
> > @@ -730,6 +739,7 @@ static struct platform_driver xgene_ahci_driver = {
> >  	.driver = {
> >  		.name = DRV_NAME,
> >  		.of_match_table = xgene_ahci_of_match,
> > +		.acpi_match_table = ACPI_PTR(xgene_ahci_acpi_match),
> >  	},
> >  };
> >  
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH RESEND] sata: xgene: add ACPI support for APM X-Gene SATA ports
  2015-03-19  0:03 [PATCH RESEND] sata: xgene: add ACPI support for APM X-Gene SATA ports Feng Kan
  2015-03-19  9:58 ` Mika Westerberg
@ 2015-03-19 18:22 ` Tejun Heo
  1 sibling, 0 replies; 4+ messages in thread
From: Tejun Heo @ 2015-03-19 18:22 UTC (permalink / raw)
  To: Feng Kan; +Cc: patches, linux-ide, linux-kernel, linux-acpi

On Wed, Mar 18, 2015 at 05:03:55PM -0700, Feng Kan wrote:
> This adds ACPI support for the APM X-Gene SATA ports. When the system
> boots using ACPI table, the SATA ports are able to configure using the
> values supplied by the ACPI table rather than the DTS.
> 
> Signed-off-by: Feng Kan <fkan@apm.com>
> Reviewed-by: Hanjun Guo <hanjun.guo@linaro.org>

Applied to libata/for-4.1.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-19 18:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-19  0:03 [PATCH RESEND] sata: xgene: add ACPI support for APM X-Gene SATA ports Feng Kan
2015-03-19  9:58 ` Mika Westerberg
2015-03-19 11:32   ` Rafael J. Wysocki
2015-03-19 18:22 ` Tejun Heo

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.