diff mbox

ata: ahci_platform: Add ACPI support for APM X-Gene AHCI controller v3 hardware.

Message ID 1466034240-22694-1-git-send-email-stripathi@apm.com
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Suman Tripathi June 15, 2016, 11:44 p.m. UTC
This patch adds ACPI support for APM X-Gene AHCI controller in
ahci_platform driver for v3 hardware. APM X-Gene AHCI controller
v3 hardware is fully compliant with ahci_platform driver and requires
no workaround quirk.

Signed-off-by: Suman Tripathi <stripathi@apm.com>
---
 drivers/ata/ahci_platform.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

--
1.7.1

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

Comments

Arnd Bergmann June 16, 2016, 6:54 a.m. UTC | #1
On Wednesday, June 15, 2016 5:44:00 PM CEST suman-tripathi wrote:
> This patch adds ACPI support for APM X-Gene AHCI controller in
> ahci_platform driver for v3 hardware. APM X-Gene AHCI controller
> v3 hardware is fully compliant with ahci_platform driver and requires
> no workaround quirk.
> 
> Signed-off-by: Suman Tripathi <stripathi@apm.com>
> ---
>  drivers/ata/ahci_platform.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
> index 62a04c8..3395baf 100644
> --- a/drivers/ata/ahci_platform.c
> +++ b/drivers/ata/ahci_platform.c
> @@ -86,6 +86,7 @@ MODULE_DEVICE_TABLE(of, ahci_of_match);
> 
>  static const struct acpi_device_id ahci_acpi_match[] = {
>         { ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
> +       { "APMC0D33", 0},
>         {},
>  };
>  MODULE_DEVICE_TABLE(acpi, ahci_acpi_match);
> 

Doesn't the ACPI_DEVICE_CLASS entry take care of this? I thought it had been
added specifically for this purpose. It doesn't seem right to add vendor
specific entries for generic hardware in each generic driver.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Suman Tripathi June 21, 2016, 6:08 p.m. UTC | #2
On Wed, Jun 15, 2016 at 11:54 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Wednesday, June 15, 2016 5:44:00 PM CEST suman-tripathi wrote:
> > This patch adds ACPI support for APM X-Gene AHCI controller in
> > ahci_platform driver for v3 hardware. APM X-Gene AHCI controller
> > v3 hardware is fully compliant with ahci_platform driver and requires
> > no workaround quirk.
> >
> > Signed-off-by: Suman Tripathi <stripathi@apm.com>
> > ---
> >  drivers/ata/ahci_platform.c |    1 +
> >  1 files changed, 1 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
> > index 62a04c8..3395baf 100644
> > --- a/drivers/ata/ahci_platform.c
> > +++ b/drivers/ata/ahci_platform.c
> > @@ -86,6 +86,7 @@ MODULE_DEVICE_TABLE(of, ahci_of_match);
> >
> >  static const struct acpi_device_id ahci_acpi_match[] = {
> >         { ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
> > +       { "APMC0D33", 0},
> >         {},
> >  };
> >  MODULE_DEVICE_TABLE(acpi, ahci_acpi_match);
> >
>
> Doesn't the ACPI_DEVICE_CLASS entry take care of this? I thought it had been


yeah it also works. Just thought that we need something different as
our's is a non-PCI SATA.
>
> added specifically for this purpose. It doesn't seem right to add vendor
> specific entries for generic hardware in each generic driver.
>
>         Arnd
Suman Tripathi June 21, 2016, 11:31 p.m. UTC | #3
Hi Arnd,

On Tue, Jun 21, 2016 at 11:08 AM, Suman Tripathi <stripathi@apm.com> wrote:
> On Wed, Jun 15, 2016 at 11:54 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>>
>> On Wednesday, June 15, 2016 5:44:00 PM CEST suman-tripathi wrote:
>> > This patch adds ACPI support for APM X-Gene AHCI controller in
>> > ahci_platform driver for v3 hardware. APM X-Gene AHCI controller
>> > v3 hardware is fully compliant with ahci_platform driver and requires
>> > no workaround quirk.
>> >
>> > Signed-off-by: Suman Tripathi <stripathi@apm.com>
>> > ---
>> >  drivers/ata/ahci_platform.c |    1 +
>> >  1 files changed, 1 insertions(+), 0 deletions(-)
>> >
>> > diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
>> > index 62a04c8..3395baf 100644
>> > --- a/drivers/ata/ahci_platform.c
>> > +++ b/drivers/ata/ahci_platform.c
>> > @@ -86,6 +86,7 @@ MODULE_DEVICE_TABLE(of, ahci_of_match);
>> >
>> >  static const struct acpi_device_id ahci_acpi_match[] = {
>> >         { ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
>> > +       { "APMC0D33", 0},
>> >         {},
>> >  };
>> >  MODULE_DEVICE_TABLE(acpi, ahci_acpi_match);
>> >
>>
>> Doesn't the ACPI_DEVICE_CLASS entry take care of this? I thought it had been
>
>
> yeah it also works. Just thought that we need something different as
> our's is a non-PCI SATA.

Are you suggesting to introduce a new class ACPI_DEVICE_CLASS for
non-pci ahci ? or to reuse the existing PCI_CLASS_STORAGE_SATA_AHCI ?
>>
>> added specifically for this purpose. It doesn't seem right to add vendor
>> specific entries for generic hardware in each generic driver.
>>
>>         Arnd
>
>
>
>
> --
> Thanks,
> with regards,
> Suman Tripathi
Arnd Bergmann June 22, 2016, 10:18 a.m. UTC | #4
On Tuesday, June 21, 2016 4:31:38 PM CEST Suman Tripathi wrote:
> On Tue, Jun 21, 2016 at 11:08 AM, Suman Tripathi <stripathi@apm.com> wrote:
> > On Wed, Jun 15, 2016 at 11:54 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> >>
> >> On Wednesday, June 15, 2016 5:44:00 PM CEST suman-tripathi wrote:
> >> > This patch adds ACPI support for APM X-Gene AHCI controller in
> >> > ahci_platform driver for v3 hardware. APM X-Gene AHCI controller
> >> > v3 hardware is fully compliant with ahci_platform driver and requires
> >> > no workaround quirk.
> >> >
> >> > Signed-off-by: Suman Tripathi <stripathi@apm.com>
> >> > ---
> >> >  drivers/ata/ahci_platform.c |    1 +
> >> >  1 files changed, 1 insertions(+), 0 deletions(-)
> >> >
> >> > diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
> >> > index 62a04c8..3395baf 100644
> >> > --- a/drivers/ata/ahci_platform.c
> >> > +++ b/drivers/ata/ahci_platform.c
> >> > @@ -86,6 +86,7 @@ MODULE_DEVICE_TABLE(of, ahci_of_match);
> >> >
> >> >  static const struct acpi_device_id ahci_acpi_match[] = {
> >> >         { ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
> >> > +       { "APMC0D33", 0},
> >> >         {},
> >> >  };
> >> >  MODULE_DEVICE_TABLE(acpi, ahci_acpi_match);
> >> >
> >>
> >> Doesn't the ACPI_DEVICE_CLASS entry take care of this? I thought it had been
> >
> >
> > yeah it also works. Just thought that we need something different as
> > our's is a non-PCI SATA.
> 
> Are you suggesting to introduce a new class ACPI_DEVICE_CLASS for
> non-pci ahci ? or to reuse the existing PCI_CLASS_STORAGE_SATA_AHCI ?

This was specifically introduced for non-PCI devices, so it should
just work.

	Arnd

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Graeme Gregory July 5, 2016, 9:07 a.m. UTC | #5
On Tue, Jun 21, 2016 at 04:31:38PM -0700, Suman Tripathi wrote:
> Hi Arnd,
> 
> On Tue, Jun 21, 2016 at 11:08 AM, Suman Tripathi <stripathi@apm.com> wrote:
> > On Wed, Jun 15, 2016 at 11:54 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> >>
> >> On Wednesday, June 15, 2016 5:44:00 PM CEST suman-tripathi wrote:
> >> > This patch adds ACPI support for APM X-Gene AHCI controller in
> >> > ahci_platform driver for v3 hardware. APM X-Gene AHCI controller
> >> > v3 hardware is fully compliant with ahci_platform driver and requires
> >> > no workaround quirk.
> >> >
> >> > Signed-off-by: Suman Tripathi <stripathi@apm.com>
> >> > ---
> >> >  drivers/ata/ahci_platform.c |    1 +
> >> >  1 files changed, 1 insertions(+), 0 deletions(-)
> >> >
> >> > diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
> >> > index 62a04c8..3395baf 100644
> >> > --- a/drivers/ata/ahci_platform.c
> >> > +++ b/drivers/ata/ahci_platform.c
> >> > @@ -86,6 +86,7 @@ MODULE_DEVICE_TABLE(of, ahci_of_match);
> >> >
> >> >  static const struct acpi_device_id ahci_acpi_match[] = {
> >> >         { ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
> >> > +       { "APMC0D33", 0},
> >> >         {},
> >> >  };
> >> >  MODULE_DEVICE_TABLE(acpi, ahci_acpi_match);
> >> >
> >>
> >> Doesn't the ACPI_DEVICE_CLASS entry take care of this? I thought it had been
> >
> >
> > yeah it also works. Just thought that we need something different as
> > our's is a non-PCI SATA.
> 
> Are you suggesting to introduce a new class ACPI_DEVICE_CLASS for
> non-pci ahci ? or to reuse the existing PCI_CLASS_STORAGE_SATA_AHCI ?

This was discussed when AMD Seattle SoC had the same issue and it was
decided in standards body and on LKML that using PCI device classes for
non PCI devices was fine.

Example from Overdrive DSDT

Device (AHC0)
{
  Name (_HID, "AMDI0600")  // _HID: Hardware ID
  Name (_UID, 0x00)  // _UID: Unique ID
  Name (_CCA, 0x01) // _CCA: Cache Coherency Attribute
  Name (_CLS,
    Package (0x03) // _CLS: Class Code
    {
      0x01,
      0x06,
      0x01
    })
  ...

Graeme

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Suman Tripathi July 5, 2016, 6:01 p.m. UTC | #6
On Tue, Jul 5, 2016 at 2:07 AM, Graeme Gregory <gg@slimlogic.co.uk> wrote:
>
> On Tue, Jun 21, 2016 at 04:31:38PM -0700, Suman Tripathi wrote:
> > Hi Arnd,
> >
> > On Tue, Jun 21, 2016 at 11:08 AM, Suman Tripathi <stripathi@apm.com> wrote:
> > > On Wed, Jun 15, 2016 at 11:54 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> > >>
> > >> On Wednesday, June 15, 2016 5:44:00 PM CEST suman-tripathi wrote:
> > >> > This patch adds ACPI support for APM X-Gene AHCI controller in
> > >> > ahci_platform driver for v3 hardware. APM X-Gene AHCI controller
> > >> > v3 hardware is fully compliant with ahci_platform driver and requires
> > >> > no workaround quirk.
> > >> >
> > >> > Signed-off-by: Suman Tripathi <stripathi@apm.com>
> > >> > ---
> > >> >  drivers/ata/ahci_platform.c |    1 +
> > >> >  1 files changed, 1 insertions(+), 0 deletions(-)
> > >> >
> > >> > diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
> > >> > index 62a04c8..3395baf 100644
> > >> > --- a/drivers/ata/ahci_platform.c
> > >> > +++ b/drivers/ata/ahci_platform.c
> > >> > @@ -86,6 +86,7 @@ MODULE_DEVICE_TABLE(of, ahci_of_match);
> > >> >
> > >> >  static const struct acpi_device_id ahci_acpi_match[] = {
> > >> >         { ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
> > >> > +       { "APMC0D33", 0},
> > >> >         {},
> > >> >  };
> > >> >  MODULE_DEVICE_TABLE(acpi, ahci_acpi_match);
> > >> >
> > >>
> > >> Doesn't the ACPI_DEVICE_CLASS entry take care of this? I thought it had been
> > >
> > >
> > > yeah it also works. Just thought that we need something different as
> > > our's is a non-PCI SATA.
> >
> > Are you suggesting to introduce a new class ACPI_DEVICE_CLASS for
> > non-pci ahci ? or to reuse the existing PCI_CLASS_STORAGE_SATA_AHCI ?
>
> This was discussed when AMD Seattle SoC had the same issue and it was
> decided in standards body and on LKML that using PCI device classes for
> non PCI devices was fine.
>
> Example from Overdrive DSDT
>
> Device (AHC0)
> {
>   Name (_HID, "AMDI0600")  // _HID: Hardware ID
>   Name (_UID, 0x00)  // _UID: Unique ID
>   Name (_CCA, 0x01) // _CCA: Cache Coherency Attribute
>   Name (_CLS,
>     Package (0x03) // _CLS: Class Code
>     {
>       0x01,
>       0x06,
>       0x01
>     })


Got it. Will do the same. Thanks !!
>
>   ...
>
> Graeme
>
diff mbox

Patch

diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index 62a04c8..3395baf 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -86,6 +86,7 @@  MODULE_DEVICE_TABLE(of, ahci_of_match);

 static const struct acpi_device_id ahci_acpi_match[] = {
 	{ ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
+	{ "APMC0D33", 0},
 	{},
 };
 MODULE_DEVICE_TABLE(acpi, ahci_acpi_match);