From patchwork Sat Aug 8 01:03:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Duc Dang X-Patchwork-Id: 6973621 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EDB53C05AE for ; Sat, 8 Aug 2015 01:06:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A6B072068E for ; Sat, 8 Aug 2015 01:06:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 818812069E for ; Sat, 8 Aug 2015 01:06:44 +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 1ZNsZE-0003bb-Km; Sat, 08 Aug 2015 01:04:56 +0000 Received: from mail-pa0-x231.google.com ([2607:f8b0:400e:c03::231]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZNsZ8-0003Xg-SC for linux-arm-kernel@lists.infradead.org; Sat, 08 Aug 2015 01:04:52 +0000 Received: by pacrr5 with SMTP id rr5so63130633pac.3 for ; Fri, 07 Aug 2015 18:04:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apm.com; s=apm; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=a5V8rDkIoUnRsRO4J3xOYGAfnFuKN93VKnK5HUakR94=; b=Wk7zmoVxlkFtOzFnIZz4Q9gt0VfxaQaYS/epxtmCp0rRkYWrT0Q0KFC1KvFN3ZgLvJ /mWSR+xbDBD3hcI4rvdLzrvqTA2U0/7TdHfW2z7oeRLThAV0SfgsWmDUOmv6KVjbaDwJ NLzKNVMogh50XiZyHwq12tNhxtQdoc1atheVM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=a5V8rDkIoUnRsRO4J3xOYGAfnFuKN93VKnK5HUakR94=; b=IIzZol37aM83Syfc50AfnroYgkH+yJq/F7PZtro4EWf/bzc1zuaL3cQafntyspwUgE y7gjm7v1LGODYtYeLJo4aKIZGSvKP5a7a/yPOJIRoQW3f8Y0NkXz9q5YAZuthlmzh0uz 5k5uzdDrxxNcubee6S4jEDg20ZCgK5TUBsOATBQkJs8SosNSJTJB0vk27Ol5AgPaFOiw UHgcmPYbS99zQTKHROF0dkuhDbr5gbj/v+iKRcW0GPlNO1T1E1CvxrwWPmzlPBVYcqFg lfqPY0/UgAfsv8kH3sL+fSTbmtD1sM4MfTI25eh9xSIaGvbJjz6S4YuMvAg8NDACaWL6 jO0Q== X-Gm-Message-State: ALoCoQmXeXF/3vqiFIkoDnjODTw6SxfjEI4siAf9IaLvegOBnRppmag1C/5V2J7ed5XFpEkjsDWN X-Received: by 10.68.205.232 with SMTP id lj8mr20711009pbc.116.1438995869981; Fri, 07 Aug 2015 18:04:29 -0700 (PDT) Received: from dhdang-Precision-WorkStation-T3400.amcc.com (70-35-53-82.static.wiline.com. [70.35.53.82]) by smtp.gmail.com with ESMTPSA id s7sm11479355pdn.85.2015.08.07.18.04.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Aug 2015 18:04:29 -0700 (PDT) From: Duc Dang To: Greg KH , Loc Ho Subject: [PATCH v4 2/2] usb: Add support for ACPI identification to xhci-platform Date: Fri, 7 Aug 2015 18:03:36 -0700 Message-Id: <5e302acb5b03c9bf61ecfb9b5b37e8b3b520bed9.1438994178.git.dhdang@apm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <07fb19170aa7c027f44af634aac7e7918daac7cd.1438994178.git.dhdang@apm.com> References: <07fb19170aa7c027f44af634aac7e7918daac7cd.1438994178.git.dhdang@apm.com> In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150807_180451_041995_7ABE2E33 X-CRM114-Status: GOOD ( 16.00 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Feng Kan , Mark Langsdorf , mathias.nyman@intel.com, Duc Dang , USB list , patches , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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=-4.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,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. This has been tested on an ARM64 machine with platform XHCI, an x86_64 machine with XHCI, and an x86_64 machine without XHCI. There were no regressions or error messages on the machines without platform XHCI. [dhdang: regenerate the patch over 4.2-rc5] Signed-off-by: Mark Langsdorf Signed-off-by: Duc Dang --- Changes from v3: Regenerate the patch over 4.2-rc5 No code change Changes from v2 Replaced tristate with a boolean as the driver doesn't compile as a module Correct --help-- to ---help--- 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 8afc3c1..96231ee 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -32,7 +32,12 @@ config USB_XHCI_PCI default y 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 5d03f8b..14b40d2 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -19,6 +19,7 @@ #include #include #include +#include #include "xhci.h" #include "xhci-mvebu.h" @@ -262,6 +263,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, @@ -269,6 +279,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");