Message ID | 1414692989-23128-3-git-send-email-mlangsdo@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thursday 30 October 2014 13:16:29 Mark Langsdorf wrote: > Applied Micro's X-Gene platform uses the xhci-platform for USB. > Add the glue to decode it from ACPI and change the Kconfig files > so the xhci-plat.o file gets built. > > Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com> I don't see anything x-gene specific in this patch, the PNP0D10 ID should work on any platform. > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 042f785..07549ec 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -149,6 +149,7 @@ config ARCH_XGENE > bool "AppliedMicro X-Gene SOC Family" > select MFD_SYSCON > select POWER_RESET_SYSCON > + select USB_XHCI_XGENE > help > This enables support for AppliedMicro X-Gene SOC Family > > diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig > index 82800a7..9fd52db 100644 > --- a/drivers/usb/host/Kconfig > +++ b/drivers/usb/host/Kconfig > @@ -45,6 +45,14 @@ config USB_XHCI_RCAR > Say 'Y' to enable the support for the xHCI host controller > found in Renesas R-Car ARM SoCs. > > +config USB_XHCI_XGENE > + tristate "xHCI support for Applied Micro X-Gene SoCs" > + select USB_XHCI_PLATFORM > + depends on ARCH_XGENE || COMPILE_TEST > + ---help--- > + Say 'Y' to enable the support for the xHCI host controller > + found in Applied Micro X-Gene ARM SoCs. > + So just remove this symbol and let the user select USB_XHCI_PLATFORM > @@ -290,6 +291,15 @@ static const struct of_device_id usb_xhci_of_match[] = { > MODULE_DEVICE_TABLE(of, usb_xhci_of_match); > #endif > > +#ifdef CONFIG_ACPI > +static const struct acpi_device_id usb_xhci_acpi_match[] = { > + /* APM X-Gene USB Controller */ > + { "PNP0D10", }, > + { } > +}; > +MODULE_DEVICE_TABLE(acpi, usb_xhci_acpi_match); > +#endif > + > static struct platform_driver usb_xhci_driver = { > .probe = xhci_plat_probe, > .remove = xhci_plat_remove, > @@ -297,6 +307,7 @@ static struct platform_driver usb_xhci_driver = { > .name = "xhci-hcd", > .pm = DEV_PM_OPS, > .of_match_table = of_match_ptr(usb_xhci_of_match), > + .acpi_match_table = ACPI_PTR(usb_xhci_acpi_match), > }, > }; > MODULE_ALIAS("platform:xhci-hcd"); This change looks good, just the comment is a bit misleading. Arnd
On 10/30/2014 02:07 PM, Arnd Bergmann wrote: > On Thursday 30 October 2014 13:16:29 Mark Langsdorf wrote: >> Applied Micro's X-Gene platform uses the xhci-platform for USB. >> Add the glue to decode it from ACPI and change the Kconfig files >> so the xhci-plat.o file gets built. >> >> Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com> > > I don't see anything x-gene specific in this patch, the PNP0D10 > ID should work on any platform. Okay. >> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig >> index 042f785..07549ec 100644 >> --- a/arch/arm64/Kconfig >> +++ b/arch/arm64/Kconfig >> @@ -149,6 +149,7 @@ config ARCH_XGENE >> bool "AppliedMicro X-Gene SOC Family" >> select MFD_SYSCON >> select POWER_RESET_SYSCON >> + select USB_XHCI_XGENE >> help >> This enables support for AppliedMicro X-Gene SOC Family >> >> diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig >> index 82800a7..9fd52db 100644 >> --- a/drivers/usb/host/Kconfig >> +++ b/drivers/usb/host/Kconfig >> @@ -45,6 +45,14 @@ config USB_XHCI_RCAR >> Say 'Y' to enable the support for the xHCI host controller >> found in Renesas R-Car ARM SoCs. >> >> +config USB_XHCI_XGENE >> + tristate "xHCI support for Applied Micro X-Gene SoCs" >> + select USB_XHCI_PLATFORM >> + depends on ARCH_XGENE || COMPILE_TEST >> + ---help--- >> + Say 'Y' to enable the support for the xHCI host controller >> + found in Applied Micro X-Gene ARM SoCs. >> + > > So just remove this symbol and let the user select USB_XHCI_PLATFORM USB_XHCI_PLATFORM isn't currently user selectable since it doesn't have a string after the tristate. It gets automatically selected by USB_XHCI_RCAR and USB_XHCI_MVEBU and I was continuing the pattern. Do you want me to make it user selectable instead? >> @@ -290,6 +291,15 @@ static const struct of_device_id usb_xhci_of_match[] = { >> MODULE_DEVICE_TABLE(of, usb_xhci_of_match); >> #endif >> >> +#ifdef CONFIG_ACPI >> +static const struct acpi_device_id usb_xhci_acpi_match[] = { >> + /* APM X-Gene USB Controller */ >> + { "PNP0D10", }, >> + { } >> +}; >> +MODULE_DEVICE_TABLE(acpi, usb_xhci_acpi_match); >> +#endif >> + >> static struct platform_driver usb_xhci_driver = { >> .probe = xhci_plat_probe, >> .remove = xhci_plat_remove, >> @@ -297,6 +307,7 @@ static struct platform_driver usb_xhci_driver = { >> .name = "xhci-hcd", >> .pm = DEV_PM_OPS, >> .of_match_table = of_match_ptr(usb_xhci_of_match), >> + .acpi_match_table = ACPI_PTR(usb_xhci_acpi_match), >> }, >> }; >> MODULE_ALIAS("platform:xhci-hcd"); > > This change looks good, just the comment is a bit misleading. I'll change the comment in the resubmit. --Mark Langsdorf
On Thursday 30 October 2014 15:12:37 Mark Langsdorf wrote: > > So just remove this symbol and let the user select USB_XHCI_PLATFORM > > USB_XHCI_PLATFORM isn't currently user selectable since it doesn't > have a string after the tristate. It gets automatically selected by > USB_XHCI_RCAR and USB_XHCI_MVEBU and I was continuing the pattern. > Do you want me to make it user selectable instead? Yes, please do. The difference is that the two you mentioned have separate driver files that you may or may not want to have built into your kernel. The APM support apparently doesn't need any of that and just works with the common parts of the driver. I expect to see more of those in the future. Arnd
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 042f785..07549ec 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -149,6 +149,7 @@ config ARCH_XGENE bool "AppliedMicro X-Gene SOC Family" select MFD_SYSCON select POWER_RESET_SYSCON + select USB_XHCI_XGENE help This enables support for AppliedMicro X-Gene SOC Family diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 82800a7..9fd52db 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -45,6 +45,14 @@ config USB_XHCI_RCAR Say 'Y' to enable the support for the xHCI host controller found in Renesas R-Car ARM SoCs. +config USB_XHCI_XGENE + tristate "xHCI support for Applied Micro X-Gene SoCs" + select USB_XHCI_PLATFORM + depends on ARCH_XGENE || COMPILE_TEST + ---help--- + Say 'Y' to enable the support for the xHCI host controller + found in Applied Micro X-Gene ARM SoCs. + endif # USB_XHCI_HCD config USB_EHCI_HCD diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index 3045e77..5012c68 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -18,6 +18,7 @@ #include <linux/platform_device.h> #include <linux/slab.h> #include <linux/usb/xhci_pdriver.h> +#include <linux/acpi.h> #include "xhci.h" #include "xhci-mvebu.h" @@ -290,6 +291,15 @@ static const struct of_device_id usb_xhci_of_match[] = { MODULE_DEVICE_TABLE(of, usb_xhci_of_match); #endif +#ifdef CONFIG_ACPI +static const struct acpi_device_id usb_xhci_acpi_match[] = { + /* APM X-Gene USB Controller */ + { "PNP0D10", }, + { } +}; +MODULE_DEVICE_TABLE(acpi, usb_xhci_acpi_match); +#endif + static struct platform_driver usb_xhci_driver = { .probe = xhci_plat_probe, .remove = xhci_plat_remove, @@ -297,6 +307,7 @@ static struct platform_driver usb_xhci_driver = { .name = "xhci-hcd", .pm = DEV_PM_OPS, .of_match_table = of_match_ptr(usb_xhci_of_match), + .acpi_match_table = ACPI_PTR(usb_xhci_acpi_match), }, }; MODULE_ALIAS("platform:xhci-hcd");
Applied Micro's X-Gene platform uses the xhci-platform for USB. Add the glue to decode it from ACPI and change the Kconfig files so the xhci-plat.o file gets built. Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com> --- arch/arm64/Kconfig | 1 + drivers/usb/host/Kconfig | 8 ++++++++ drivers/usb/host/xhci-plat.c | 11 +++++++++++ 3 files changed, 20 insertions(+)