From patchwork Tue Nov 4 16:50:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Langsdorf X-Patchwork-Id: 5229491 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8B11AC11AC for ; Tue, 4 Nov 2014 16:53:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8029920172 for ; Tue, 4 Nov 2014 16:53:35 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AC8E020166 for ; Tue, 4 Nov 2014 16:53:34 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XlhKH-0005P7-Qa; Tue, 04 Nov 2014 16:51:25 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XlhK8-0005MF-PD for linux-arm-kernel@lists.infradead.org; Tue, 04 Nov 2014 16:51:17 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sA4Goq4w025453 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 4 Nov 2014 11:50:52 -0500 Received: from redhatnow.redhat.com.com (vpn-57-122.rdu2.redhat.com [10.10.57.122]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sA4Golk8003255; Tue, 4 Nov 2014 11:50:50 -0500 From: Mark Langsdorf To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 2/2] [usb] add support for ACPI identification to xhci-platform Date: Tue, 4 Nov 2014 10:50:33 -0600 Message-Id: <1415119833-9135-2-git-send-email-mlangsdo@redhat.com> In-Reply-To: <1415119833-9135-1-git-send-email-mlangsdo@redhat.com> References: <1414692989-23128-2-git-send-email-mlangsdo@redhat.com> <1415119833-9135-1-git-send-email-mlangsdo@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141104_085116_857405_19D24855 X-CRM114-Status: GOOD ( 14.04 ) X-Spam-Score: -5.6 (-----) Cc: Mark Langsdorf , catalin.marinas@arm.com, linux-usb@vger.kernel.org, will.deacon@arm.com, mathias.nyman@intel.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Provide the methods to let ACPI identify the need to use xhci-platform. Change the Kconfig files so the xhci-plat.o file is selectable during kernel config. Signed-off-by: Mark Langsdorf --- Changes from v1 Renamed from "add support for APM X-Gene to xhci-platform" Removed changes to arm64/Kconfig Made CONFIG_USB_XHCI_PLATFORM a user selectable config option drivers/usb/host/Kconfig | 7 ++++++- drivers/usb/host/xhci-plat.c | 11 +++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 82800a7..060a2361 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -27,7 +27,12 @@ config USB_XHCI_HCD if USB_XHCI_HCD config USB_XHCI_PLATFORM - tristate + tristate "xHCI platform driver support" + --help-- + Say 'Y' to enable the support for the xHCI host controller + as a platform device. Many ARM SoCs provide USB this way. + + If unsure, say 'Y'. config USB_XHCI_MVEBU tristate "xHCI support for Marvell Armada 375/38x" diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index 91c7557..3db47ea 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -18,6 +18,7 @@ #include #include #include +#include #include "xhci.h" #include "xhci-mvebu.h" @@ -287,6 +288,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, @@ -294,6 +304,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");