From patchwork Thu Aug 20 19:38:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Duc Dang X-Patchwork-Id: 7046771 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 96E089F372 for ; Thu, 20 Aug 2015 19:42:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B3BD12058E for ; Thu, 20 Aug 2015 19:42:18 +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 5D94420585 for ; Thu, 20 Aug 2015 19:42:17 +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 1ZSVhE-0000a4-5t; Thu, 20 Aug 2015 19:40:20 +0000 Received: from mail-pa0-x232.google.com ([2607:f8b0:400e:c03::232]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZSVh2-0007kH-Op for linux-arm-kernel@lists.infradead.org; Thu, 20 Aug 2015 19:40:09 +0000 Received: by padfo6 with SMTP id fo6so28965618pad.0 for ; Thu, 20 Aug 2015 12:39:48 -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=qvBaqv/evkQvvT7ieFdlXXlqyMqgNWXAPTqwUZmY74U=; b=AgijiewHCR3VolE/g1LjDybm8EL+iHv5Sgkp9nMBvJ1MjhBnnKeKf8S/qQEdiCPhwY 3g6kwqfJMJ8z07ylKXMB7vD5gpuzBpEg68S9r3W2Dbyjii5m2DsdiHIcuUrT6FdKx/hz 6HC18C4prhhpQY8MWF8WdaeTk91BtAD4FIMo0= 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=qvBaqv/evkQvvT7ieFdlXXlqyMqgNWXAPTqwUZmY74U=; b=XMSUm1gp0OXDcaQK8y+PzhQSGirYSHSRwW2oQspyaohCcZVv3OEgjAA+G9zoMwoJeS BiiSppC8v3yFfJTPuS1VXOpGHJz6fxQHBn72NYzHVPUFeCdvxT3F9F38Q+rvkAbVApym QWLerRApO4JYqkeb6jXIprQlO2byGtCD9mvEkNmiIzOWEILWuuBqMHTUeIv1+HLCmDoK /le0WZD8tvuPlMHv84YaKC5fWN3O+Pss3IQEpZy8yKi+5pKhxOrWWLoJ94N6tIBeu+Ic +TNEHILBISwQgoAVQG9U/mTkZgrre2rSvW1NDouOik0taO66mRo7DiynTNNXBn2H6F7d 59kw== X-Gm-Message-State: ALoCoQlM1Tf3T1PuqU+Y/iAwQraaW9CXWHs8RPFNe6VkwMgPA3ZnAchKWpvKIZaGdJcVVFtr5c6g X-Received: by 10.66.186.39 with SMTP id fh7mr9516272pac.136.1440099587968; Thu, 20 Aug 2015 12:39:47 -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 fn1sm5265870pab.8.2015.08.20.12.39.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Aug 2015 12:39:45 -0700 (PDT) From: Duc Dang To: Greg KH , Russell King - ARM Linux , Loc Ho , Arnd Bergmann Subject: [PATCH v7 2/2] usb: Add support for ACPI identification to xhci-platform Date: Thu, 20 Aug 2015 12:38:54 -0700 Message-Id: <4535734cb286b1fcf2964838cb8f432899280db8.1440098398.git.dhdang@apm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <69e6f5bf693d02fba001d02047453bed0519499d.1440098398.git.dhdang@apm.com> References: <69e6f5bf693d02fba001d02047453bed0519499d.1440098398.git.dhdang@apm.com> In-Reply-To: <1522889.9kdnRk8vHo@wuerfel> References: <1522889.9kdnRk8vHo@wuerfel> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150820_124008_863567_58B40C57 X-CRM114-Status: GOOD ( 18.19 ) 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.7 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 and address new comments] Signed-off-by: Mark Langsdorf Signed-off-by: Duc Dang --- Changes from v6: -None Change from v5: -Change comment to "XHCI-compliant USB Controller" as "PNP0D10" ID is not X-Gene specific Changes from v4: -Remove #ifdef CONFIG_ACPI 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 | 9 +++++++++ 2 files changed, 15 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 e4c7f9d..6c03e1c 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" @@ -267,6 +268,13 @@ static const struct of_device_id usb_xhci_of_match[] = { MODULE_DEVICE_TABLE(of, usb_xhci_of_match); #endif +static const struct acpi_device_id usb_xhci_acpi_match[] = { + /* XHCI-compliant USB Controller */ + { "PNP0D10", }, + { } +}; +MODULE_DEVICE_TABLE(acpi, usb_xhci_acpi_match); + static struct platform_driver usb_xhci_driver = { .probe = xhci_plat_probe, .remove = xhci_plat_remove, @@ -274,6 +282,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");