Linux-ARM-MSM Archive mirror
 help / color / mirror / Atom feed
* [PATCH] pci, acpi: QDF2xxx 32 bit config space accessors
       [not found] <1452691267-32240-21-git-send-email-tn@semihalf.com>
@ 2016-01-19 19:54 ` Christopher Covington
  2016-01-19 20:19   ` Christopher Covington
  2016-02-05 16:00   ` [PATCH v2] acpi: pci: QDF2432 " Christopher Covington
  0 siblings, 2 replies; 3+ messages in thread
From: Christopher Covington @ 2016-01-19 19:54 UTC (permalink / raw
  To: Tomasz Nowicki, Rafael J. Wysocki, Len Brown, linux-acpi,
	linux-kernel
  Cc: linux-arm-msm, Timur Tabi, Jon Masters, Mark Langsdorf,
	Sinan Kaya, Christopher Covington

Qualcomm Technologies QDF2xxx SoCs require 32 bit accessors to be used
for the PCI configuration space. Register the appropriate quirk.

Signed-off-by: Christopher Covington <cov@codeaurora.org>
---
This patch depends on Tomasz Nowicki's ACPI support for PCI:

http://lists.infradead.org/pipermail/linux-arm-kernel/2016-January/thread.html#399200

 drivers/acpi/mcfg.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/drivers/acpi/mcfg.c b/drivers/acpi/mcfg.c
index ec5fe7b..dee4964 100644
--- a/drivers/acpi/mcfg.c
+++ b/drivers/acpi/mcfg.c
@@ -78,6 +78,29 @@ static struct pci_ops default_pci_mcfg_ops = {
 	.write = pci_generic_config_write,
 };
 
+static const struct dmi_system_id qcom_qdf2xxx[] = {
+	{
+		.ident = "Qualcomm Technologies QDF2xxx",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Qualcomm"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "QDF2"),
+		},
+	},
+	{ }
+};
+
+static struct pci_ops qcom_qdf2xxx_pci_mcfg_ops = {
+	.map_bus = pci_mcfg_dev_base,
+	.read = pci_generic_config_read32,
+	.write = pci_generic_config_write32,
+};
+
+DECLARE_ACPI_MCFG_FIXUP(qcom_qdf2xxx,
+			NULL,
+			&qcom_qdf2xxx_pci_mcfg_ops,
+			PCI_MCFG_DOMAIN_ANY,
+			PCI_MCFG_BUS_ANY);
+
 struct pci_ops *pci_mcfg_get_ops(struct acpi_pci_root *root)
 {
 	struct pci_ops *pci_mcfg_ops_quirk;
-- 
Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project


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

* Re: [PATCH] pci, acpi: QDF2xxx 32 bit config space accessors
  2016-01-19 19:54 ` [PATCH] pci, acpi: QDF2xxx 32 bit config space accessors Christopher Covington
@ 2016-01-19 20:19   ` Christopher Covington
  2016-02-05 16:00   ` [PATCH v2] acpi: pci: QDF2432 " Christopher Covington
  1 sibling, 0 replies; 3+ messages in thread
From: Christopher Covington @ 2016-01-19 20:19 UTC (permalink / raw
  To: Jon Masters
  Cc: Tomasz Nowicki, Rafael J. Wysocki, Len Brown, linux-acpi,
	linux-kernel, linux-arm-msm, Timur Tabi, Mark Langsdorf,
	Sinan Kaya

[Fixing Jon's email; sorry for the typo.]

On 01/19/2016 02:54 PM, Christopher Covington wrote:
> Qualcomm Technologies QDF2xxx SoCs require 32 bit accessors to be used
> for the PCI configuration space. Register the appropriate quirk.
> 
> Signed-off-by: Christopher Covington <cov@codeaurora.org>
> ---
> This patch depends on Tomasz Nowicki's ACPI support for PCI:
> 
> http://lists.infradead.org/pipermail/linux-arm-kernel/2016-January/thread.html#399200
> 
>  drivers/acpi/mcfg.c | 23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)
> 
> diff --git a/drivers/acpi/mcfg.c b/drivers/acpi/mcfg.c
> index ec5fe7b..dee4964 100644
> --- a/drivers/acpi/mcfg.c
> +++ b/drivers/acpi/mcfg.c
> @@ -78,6 +78,29 @@ static struct pci_ops default_pci_mcfg_ops = {
>  	.write = pci_generic_config_write,
>  };
>  
> +static const struct dmi_system_id qcom_qdf2xxx[] = {
> +	{
> +		.ident = "Qualcomm Technologies QDF2xxx",
> +		.matches = {
> +			DMI_MATCH(DMI_SYS_VENDOR, "Qualcomm"),
> +			DMI_MATCH(DMI_PRODUCT_NAME, "QDF2"),
> +		},
> +	},
> +	{ }
> +};
> +
> +static struct pci_ops qcom_qdf2xxx_pci_mcfg_ops = {
> +	.map_bus = pci_mcfg_dev_base,
> +	.read = pci_generic_config_read32,
> +	.write = pci_generic_config_write32,
> +};
> +
> +DECLARE_ACPI_MCFG_FIXUP(qcom_qdf2xxx,
> +			NULL,
> +			&qcom_qdf2xxx_pci_mcfg_ops,
> +			PCI_MCFG_DOMAIN_ANY,
> +			PCI_MCFG_BUS_ANY);
> +
>  struct pci_ops *pci_mcfg_get_ops(struct acpi_pci_root *root)
>  {
>  	struct pci_ops *pci_mcfg_ops_quirk;
> 


-- 
Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

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

* [PATCH v2] acpi: pci: QDF2432 32 bit config space accessors
  2016-01-19 19:54 ` [PATCH] pci, acpi: QDF2xxx 32 bit config space accessors Christopher Covington
  2016-01-19 20:19   ` Christopher Covington
@ 2016-02-05 16:00   ` Christopher Covington
  1 sibling, 0 replies; 3+ messages in thread
From: Christopher Covington @ 2016-02-05 16:00 UTC (permalink / raw
  To: Rafael J. Wysocki, Len Brown, linux-acpi, linux-kernel
  Cc: Tomasz Nowicki, linux-arm-msm, Timur Tabi, Jon Masters,
	Mark Langsdorf, Christopher Covington

Qualcomm Technologies QDF2432 SoCs require 32 bit accessors to be used
for the PCI configuration space. Register the appropriate quirk.

Signed-off-by: Christopher Covington <cov@codeaurora.org>
---
Dependent on Tomasz Nowicki's ACPI support for PCI:
http://lists.infradead.org/pipermail/linux-arm-kernel/2016-February/thread.html#405148

v1 -> v2: Rebase and use full product name

 drivers/acpi/mcfg.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/drivers/acpi/mcfg.c b/drivers/acpi/mcfg.c
index 4663f70..18e792b 100644
--- a/drivers/acpi/mcfg.c
+++ b/drivers/acpi/mcfg.c
@@ -78,6 +78,29 @@ static struct pci_ops default_pci_mcfg_ops = {
 	.write = pci_generic_config_write,
 };
 
+static const struct dmi_system_id qcom_qdf2432[] = {
+	{
+		.ident = "Qualcomm Technologies QDF2432",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Qualcomm"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "QDF2432"),
+		},
+	},
+	{ }
+};
+
+static struct pci_ops qcom_qdf2432_pci_mcfg_ops = {
+	.map_bus = pci_mcfg_dev_base,
+	.read = pci_generic_config_read32,
+	.write = pci_generic_config_write32,
+};
+
+DECLARE_ACPI_MCFG_FIXUP(qcom_qdf2432,
+			NULL,
+			&qcom_qdf2432_pci_mcfg_ops,
+			PCI_MCFG_DOMAIN_ANY,
+			PCI_MCFG_BUS_ANY);
+
 struct pci_ops *pci_mcfg_get_ops(struct acpi_pci_root *root)
 {
 	struct pci_ops *pci_mcfg_ops_quirk;
-- 
Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

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

end of thread, other threads:[~2016-02-05 16:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1452691267-32240-21-git-send-email-tn@semihalf.com>
2016-01-19 19:54 ` [PATCH] pci, acpi: QDF2xxx 32 bit config space accessors Christopher Covington
2016-01-19 20:19   ` Christopher Covington
2016-02-05 16:00   ` [PATCH v2] acpi: pci: QDF2432 " Christopher Covington

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 read-only IMAP folder(s) and NNTP newsgroup(s).