From patchwork Sat Aug 8 03:18:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Duc Dang X-Patchwork-Id: 6973881 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 5254A9F38B for ; Sat, 8 Aug 2015 03:22:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6A64C206A1 for ; Sat, 8 Aug 2015 03:22:31 +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 8AAC2206DB for ; Sat, 8 Aug 2015 03:22:30 +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 1ZNufW-00044t-KC; Sat, 08 Aug 2015 03:19:34 +0000 Received: from mail-pd0-x22c.google.com ([2607:f8b0:400e:c02::22c]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZNufT-00041L-Hm for linux-arm-kernel@lists.infradead.org; Sat, 08 Aug 2015 03:19:32 +0000 Received: by pdco4 with SMTP id o4so51506458pdc.3 for ; Fri, 07 Aug 2015 20:19:11 -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=zesDSB4ogVj81+8W9vsAht0vym6Xy+O57BGkt81K6KI=; b=LU+Req9HmNkyyEKg4+RAULVFe+DIHCseMxloSx9nrNWs8NoZ0XnAhzEYhq3X+7Olsr Nqp5B48JpnljXty/p2KfGK5mFLdwg5uyKdiiee61z/mFt971mGp9rVwAZoZTwPytjrWv knpXUcOcn32KcaXXFJ51LBBJuSYRI1ReGyzV0= 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=zesDSB4ogVj81+8W9vsAht0vym6Xy+O57BGkt81K6KI=; b=LkbjuEAK+QVS0ep94x7vbf7IbXfMXuc8tEf6en/e4ebpDV8X19nsrDAqLitfZp48ts bBrrLOBQQa+43SdIR49skkBbUyNTHJMtkQVrUPqv/QkylieTGjWYLo81EehHATgKNdDL PvDEjdQtEHG7LWfzHGTVtCzmWsBdgL1FjzOq7BPUWJvOznaaSF5rAVA1OuyaRPIMrRTj lofPIs+ljMs6Mu9xi5D+ypgLE8FQVInVzgqQyj9z+/OkiG5xGbYtfGdpphbx4TEhW3xK b6b/4cU4AqARSeWb6imrZqAm67m6YMjqkvmDw8X7bspvBAn3bCNRpB3tXekkn97ezTye Ifkw== X-Gm-Message-State: ALoCoQnvPJvDprTSvZWl3/Wmj3rhZSLHyCYMGDat2TlKWYIRKgqpjSF1j1Ek7EPD71Bg+ir2Jocn X-Received: by 10.70.50.3 with SMTP id y3mr21637953pdn.90.1439003951144; Fri, 07 Aug 2015 20:19:11 -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 rl15sm11675294pbb.44.2015.08.07.20.19.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Aug 2015 20:19:10 -0700 (PDT) From: Duc Dang To: Greg KH , Loc Ho Subject: [PATCH v5 2/2] usb: Add support for ACPI identification to xhci-platform Date: Fri, 7 Aug 2015 20:18:49 -0700 Message-Id: <651f91b3efbba4b4f5ff8f531f353a4855b9e9d9.1439002338.git.dhdang@apm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <74fe0b014334a5ac1db90dec46bdbf6c30c07895.1439002338.git.dhdang@apm.com> References: <74fe0b014334a5ac1db90dec46bdbf6c30c07895.1439002338.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_201931_747857_1E8FAD3E X-CRM114-Status: GOOD ( 15.60 ) 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. Signed-off-by: Mark Langsdorf Signed-off-by: Duc Dang --- 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 5d03f8b..bd282cd 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,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[] = { + /* APM X-Gene 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, @@ -269,6 +277,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");