* [PATCHv2 0/2] USB: Enable EHCI-platform driver for use with ACPI
@ 2015-08-19 21:36 Jeremy Linton
2015-08-19 21:36 ` [PATCH 1/2] USB: ehci-platform: Display a DMA configuration error message Jeremy Linton
2015-08-19 21:36 ` [PATCH 2/2] USB: ehci-platform: Add ACPI bindings for the EHCI platform driver Jeremy Linton
0 siblings, 2 replies; 3+ messages in thread
From: Jeremy Linton @ 2015-08-19 21:36 UTC (permalink / raw)
To: linux-arm-kernel
This patch set enables USB on the ARM Juno development platform when
using an ACPI kernel.
First it adds an error message if the device cannot be configured with
the current DMA settings (missing/unsupported CCA attribute). It then
adds the ACPI PNP id to the acpi_match_table entry.
Tested-by: Huang Shijie <shijie.huang@arm.com>
Reviewed-by: Graeme Gregory <graeme.gregory@linaro.org>
Reviewed-by: Hanjun Guo <hanjun.guo@linaro.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Jeremy Linton (2):
USB: ehci-platform: Display a DMA configuration error message
USB: ehci-platform: Add ACPI bindings for the EHCI platform driver.
drivers/usb/host/ehci-platform.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
--
2.4.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] USB: ehci-platform: Display a DMA configuration error message
2015-08-19 21:36 [PATCHv2 0/2] USB: Enable EHCI-platform driver for use with ACPI Jeremy Linton
@ 2015-08-19 21:36 ` Jeremy Linton
2015-08-19 21:36 ` [PATCH 2/2] USB: ehci-platform: Add ACPI bindings for the EHCI platform driver Jeremy Linton
1 sibling, 0 replies; 3+ messages in thread
From: Jeremy Linton @ 2015-08-19 21:36 UTC (permalink / raw)
To: linux-arm-kernel
If the ehci driver fails to configure the dma settings then display
a dev error instead of simply failing. This is triggered in an
ACPI world if the user fails to set the _CCA on the device.
Tested-by: Huang Shijie <shijie.huang@arm.com>
Reviewed-by: Graeme Gregory <graeme.gregory@linaro.org>
Reviewed-by: Hanjun Guo <hanjun.guo@linaro.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
---
drivers/usb/host/ehci-platform.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
index 2593def..3ce38c3 100644
--- a/drivers/usb/host/ehci-platform.c
+++ b/drivers/usb/host/ehci-platform.c
@@ -162,8 +162,10 @@ static int ehci_platform_probe(struct platform_device *dev)
err = dma_coerce_mask_and_coherent(&dev->dev,
pdata->dma_mask_64 ? DMA_BIT_MASK(64) : DMA_BIT_MASK(32));
- if (err)
+ if (err) {
+ dev_err(&dev->dev, "Error: DMA mask configuration failed\n");
return err;
+ }
irq = platform_get_irq(dev, 0);
if (irq < 0) {
--
2.4.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] USB: ehci-platform: Add ACPI bindings for the EHCI platform driver.
2015-08-19 21:36 [PATCHv2 0/2] USB: Enable EHCI-platform driver for use with ACPI Jeremy Linton
2015-08-19 21:36 ` [PATCH 1/2] USB: ehci-platform: Display a DMA configuration error message Jeremy Linton
@ 2015-08-19 21:36 ` Jeremy Linton
1 sibling, 0 replies; 3+ messages in thread
From: Jeremy Linton @ 2015-08-19 21:36 UTC (permalink / raw)
To: linux-arm-kernel
This enables USB on the ARM juno board when booted with
an ACPI kernel. The PNP id comes from the PNP/ACPI registry
and describes an EHCI controller without debug.
Tested-by: Huang Shijie <shijie.huang@arm.com>
Reviewed-by: Graeme Gregory <graeme.gregory@linaro.org>
Reviewed-by: Hanjun Guo <hanjun.guo@linaro.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
---
drivers/usb/host/ehci-platform.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
index 3ce38c3..9680a5d 100644
--- a/drivers/usb/host/ehci-platform.c
+++ b/drivers/usb/host/ehci-platform.c
@@ -19,6 +19,7 @@
*
* Licensed under the GNU/GPL. See COPYING for details.
*/
+#include <linux/acpi.h>
#include <linux/clk.h>
#include <linux/dma-mapping.h>
#include <linux/err.h>
@@ -382,6 +383,12 @@ static const struct of_device_id vt8500_ehci_ids[] = {
};
MODULE_DEVICE_TABLE(of, vt8500_ehci_ids);
+static const struct acpi_device_id ehci_acpi_match[] = {
+ { "PNP0D20", 0 }, /* EHCI controller without debug */
+ { }
+};
+MODULE_DEVICE_TABLE(acpi, ehci_acpi_match);
+
static const struct platform_device_id ehci_platform_table[] = {
{ "ehci-platform", 0 },
{ }
@@ -400,6 +407,7 @@ static struct platform_driver ehci_platform_driver = {
.name = "ehci-platform",
.pm = &ehci_platform_pm_ops,
.of_match_table = vt8500_ehci_ids,
+ .acpi_match_table = ACPI_PTR(ehci_acpi_match),
}
};
--
2.4.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-08-19 21:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-19 21:36 [PATCHv2 0/2] USB: Enable EHCI-platform driver for use with ACPI Jeremy Linton
2015-08-19 21:36 ` [PATCH 1/2] USB: ehci-platform: Display a DMA configuration error message Jeremy Linton
2015-08-19 21:36 ` [PATCH 2/2] USB: ehci-platform: Add ACPI bindings for the EHCI platform driver Jeremy Linton
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).