From patchwork Mon Jul 19 22:21:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 480265 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 659E2C07E95 for ; Mon, 19 Jul 2021 23:11:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3554260FE9 for ; Mon, 19 Jul 2021 23:11:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350964AbhGSWSx (ORCPT ); Mon, 19 Jul 2021 18:18:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359373AbhGSVnw (ORCPT ); Mon, 19 Jul 2021 17:43:52 -0400 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E282BC0613B4 for ; Mon, 19 Jul 2021 15:21:37 -0700 (PDT) Received: by mail-pj1-x1033.google.com with SMTP id o3-20020a17090a6783b0290173ce472b8aso746060pjj.2 for ; Mon, 19 Jul 2021 15:21:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=g1VUsyo7cljMbwFDieYIV5JeeNR2RlcZC3D27A3qHS0=; b=kRPPvmFXE5Mgwv6tfnWkE5muTpKYOVG1GPrtHQPkNg2Uq0mHyjN4wTBe/SvY0sQ5mr KOdfbofNj2wonIXBN43Pd7ACr4mRptJj5t/etiPE7pqSGb7BS5oMCCWb6K1/kFb8FaaR MHpVWaFE87Fz4kpxPfwaO09iOE9M8MaFvBue4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=g1VUsyo7cljMbwFDieYIV5JeeNR2RlcZC3D27A3qHS0=; b=Ecm6nNjeSsxPNe2azvf8GtC0JxMJw6jEt0V+5PZ5DyinfypN8jIErfxDRKfkXQNeQo sSB/IXn9EZ1ha6N/T8OqMEiA2+dhKJNy9n/Zx4918eGVwECojs9A4NoIvojMa8cEUm4e WcqNT+534hepO4BN34h8LRvTTZLm0/9Zesmf3iel3iAERLmwAkkeVvJo+WjcHmD9NMlS toEXgRCWRjH8fTtBTFx2PXj3fkuS0sRCMaZTstq79jB+TztPBKmJVrqvhUGwt8obiGj+ 7/uOlLFJHlCJ+G1dwtBzZEKH0CqBVuGTvzQx2JjJH6m2atX/PfNbMtv49vHrazIDmMUB j1Eg== X-Gm-Message-State: AOAM532UJSQtrKW6C2TNdP0sJUGw0Zk7Lmyj+5DUdMlO8NuYXvR6MRVJ 98BPV0zTCUTqqFywigPBiH2yPQ== X-Google-Smtp-Source: ABdhPJxNEIIx43kLmIxC13TtCzAy+cwH4DSRv1ugrH0M+JFDIXzpmvYBZJWXHwJo/0jMChy783KZ4g== X-Received: by 2002:a17:90a:8c9:: with SMTP id 9mr31381363pjn.58.1626733297505; Mon, 19 Jul 2021 15:21:37 -0700 (PDT) Received: from localhost ([2620:15c:202:201:4d0:bf5f:b8cd:2d67]) by smtp.gmail.com with UTF8SMTPSA id nl2sm17351924pjb.10.2021.07.19.15.21.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Jul 2021 15:21:37 -0700 (PDT) From: Matthias Kaehlcke To: Greg Kroah-Hartman , Alan Stern , Rob Herring , Frank Rowand , Mathias Nyman , Felipe Balbi Cc: Michal Simek , linux-usb@vger.kernel.org, Peter Chen , Bastien Nocera , Douglas Anderson , Stephen Boyd , devicetree@vger.kernel.org, Krzysztof Kozlowski , linux-kernel@vger.kernel.org, Ravi Chandra Sadineni , Matthias Kaehlcke , Rob Herring Subject: [PATCH v14 2/6] of/platform: Add stubs for of_platform_device_create/destroy() Date: Mon, 19 Jul 2021 15:21:24 -0700 Message-Id: <20210719152055.v14.2.I08fd2e1c775af04f663730e9fb4d00e6bbb38541@changeid> X-Mailer: git-send-email 2.32.0.402.g57bb445576-goog In-Reply-To: <20210719222128.4122837-1-mka@chromium.org> References: <20210719222128.4122837-1-mka@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Code for platform_device_create() and of_platform_device_destroy() is only generated if CONFIG_OF_ADDRESS=y. Add stubs to avoid unresolved symbols when CONFIG_OF_ADDRESS is not set. Signed-off-by: Matthias Kaehlcke Acked-by: Rob Herring --- Changes in v14: - none Changes in v13: - none Changes in v12: - none Changes in v11: - none Changes in v10: - none Changes in v9: - added Rob's 'Acked-by' tag Changes in v8: - fixed C&P error in commit message Changes in v7: - none Changes in v6: - patch added to the series include/linux/of_platform.h | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index 84a966623e78..d15b6cd5e1c3 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h @@ -61,16 +61,18 @@ static inline struct platform_device *of_find_device_by_node(struct device_node } #endif +extern int of_platform_bus_probe(struct device_node *root, + const struct of_device_id *matches, + struct device *parent); + +#ifdef CONFIG_OF_ADDRESS /* Platform devices and busses creation */ extern struct platform_device *of_platform_device_create(struct device_node *np, const char *bus_id, struct device *parent); extern int of_platform_device_destroy(struct device *dev, void *data); -extern int of_platform_bus_probe(struct device_node *root, - const struct of_device_id *matches, - struct device *parent); -#ifdef CONFIG_OF_ADDRESS + extern int of_platform_populate(struct device_node *root, const struct of_device_id *matches, const struct of_dev_auxdata *lookup, @@ -84,6 +86,18 @@ extern int devm_of_platform_populate(struct device *dev); extern void devm_of_platform_depopulate(struct device *dev); #else +/* Platform devices and busses creation */ +static inline struct platform_device *of_platform_device_create(struct device_node *np, + const char *bus_id, + struct device *parent) +{ + return NULL; +} +static inline int of_platform_device_destroy(struct device *dev, void *data) +{ + return -ENODEV; +} + static inline int of_platform_populate(struct device_node *root, const struct of_device_id *matches, const struct of_dev_auxdata *lookup, From patchwork Mon Jul 19 22:21:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 480264 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05505C6377B for ; Mon, 19 Jul 2021 23:11:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E7AFA61166 for ; Mon, 19 Jul 2021 23:11:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354490AbhGSWUA (ORCPT ); Mon, 19 Jul 2021 18:20:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359446AbhGSVpx (ORCPT ); Mon, 19 Jul 2021 17:45:53 -0400 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D39CC0613BE for ; Mon, 19 Jul 2021 15:21:40 -0700 (PDT) Received: by mail-pl1-x633.google.com with SMTP id d1so10490452plg.0 for ; Mon, 19 Jul 2021 15:21:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kr2j9CaXxciS53UTRehcKMdcqK5/tdAVzDNwoCD+H6E=; b=fTccJfOsHh6JMWpILS6FHigeaL6i0nuLan+ze4Zs14B0LIdha0N696hFpe8xig0wCH AFtOWI+QIQIMUgYGlhKQtPnEBrRAIAUog0LKxAaA4xheGykQyK7RS8fJ2w2FgDS9qZwN Win8zqC2Nz3Mak8+pF4MbYfEhfmsrv45UEbKQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kr2j9CaXxciS53UTRehcKMdcqK5/tdAVzDNwoCD+H6E=; b=ppSaA8Z0FaMpTaq5h2nwMwqla7whkQrv7o/KO86nt5VFWWizU42rAOre3pP762rWaY WDIVr9Sg7lZ9xJGFmJh9qEE2+rHiROH5DXSjFeCUYPhvNkMkp0Nc/oG6W1PDf4hjZeFP BvPMcKIqAEhvz0Awkdtxb4r+/RZKzs33vaJ77ztW0OlBW0fV2Vek5R8+9djoyJIBNY7x vEnHoWiPmrjuN7uzLKKqhniZwiTnD1NdB+lSm2ppLPnZheUJuIS9udJH2mjT75JPN8e9 356tHNUsO9RZr/ZcT7S5KnkwhyQFzGTMhq2xoy6fWkzEwyKMN6c9o8w+RXdZKCEX/2sP RiUA== X-Gm-Message-State: AOAM531j4Y/b2BYNq6GfnUCeut6yv64z2ZDwE0hKRuGQZAi3i9nsLsx2 4eLYSbogor9NIliFRDvMfAnT+A== X-Google-Smtp-Source: ABdhPJwTwZotNkoksctnaCDVBY4TNTimpPmvP3pvsoZWqhlNur1wkrLjA5vmWpxUE59ImGQVEg/JmA== X-Received: by 2002:a17:90a:4d04:: with SMTP id c4mr31533425pjg.148.1626733300231; Mon, 19 Jul 2021 15:21:40 -0700 (PDT) Received: from localhost ([2620:15c:202:201:4d0:bf5f:b8cd:2d67]) by smtp.gmail.com with UTF8SMTPSA id x10sm13438641pfh.56.2021.07.19.15.21.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Jul 2021 15:21:39 -0700 (PDT) From: Matthias Kaehlcke To: Greg Kroah-Hartman , Alan Stern , Rob Herring , Frank Rowand , Mathias Nyman , Felipe Balbi Cc: Michal Simek , linux-usb@vger.kernel.org, Peter Chen , Bastien Nocera , Douglas Anderson , Stephen Boyd , devicetree@vger.kernel.org, Krzysztof Kozlowski , linux-kernel@vger.kernel.org, Ravi Chandra Sadineni , Matthias Kaehlcke , Andrey Zhizhikin , Bjorn Andersson , Catalin Marinas , Dmitry Baryshkov , Enric Balletbo i Serra , Fabio Estevam , =?utf-8?q?Guido_G=C3=BCnther?= , Jagan Teki , Nishanth Menon , Shawn Guo , Vinod Koul , Will Deacon , linux-arm-kernel@lists.infradead.org Subject: [PATCH v14 3/6] arm64: defconfig: Explicitly enable USB_XHCI_PLATFORM Date: Mon, 19 Jul 2021 15:21:25 -0700 Message-Id: <20210719152055.v14.3.Id45138610b749ff775186ac10b3d01c504ddf4f3@changeid> X-Mailer: git-send-email 2.32.0.402.g57bb445576-goog In-Reply-To: <20210719222128.4122837-1-mka@chromium.org> References: <20210719222128.4122837-1-mka@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The dependency of USB_DWC3 on USB_XHCI_PLATFORM is being changed from 'select' to 'depends on' by another patch. The defconfig selects USB_DWC3 and implicitly USB_DWC3_DUAL_ROLE, to keep this unchanged USB_XHCI_PLATFORM now needs to be selected explicitly. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson --- Changes in v14: - rebased on v5.14-rc1 (with the rest of the series) - added 'Reviewed-by' tag from Doug Changes in v13: - patch added to the series arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index f423d08b9a71..b243bd11a4ed 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -802,6 +802,7 @@ CONFIG_USB_OTG=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_PCI=m CONFIG_USB_XHCI_PCI_RENESAS=m +CONFIG_USB_XHCI_PLATFORM=y CONFIG_USB_XHCI_TEGRA=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_EXYNOS=y From patchwork Mon Jul 19 22:21:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 480263 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F866C63797 for ; Mon, 19 Jul 2021 23:11:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 47AFD6121F for ; Mon, 19 Jul 2021 23:11:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354510AbhGSWUL (ORCPT ); Mon, 19 Jul 2021 18:20:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359472AbhGSVp4 (ORCPT ); Mon, 19 Jul 2021 17:45:56 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43653C06129B for ; Mon, 19 Jul 2021 15:21:45 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id cu14so12576326pjb.0 for ; Mon, 19 Jul 2021 15:21:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=S0E50vcDQ5/3rJ3kXF34GumRVKL95Ji+mTNRN6BDGn8=; b=kISOISGqmkz+hSUgkf7mFQO3NmnYmb/ExZWhrzfUO2ZxcpDSCnOZpplBVZSj9JGjlb OYD5xaWTp1/26f2dMTuAR0Jq2rCrkEEMC/0dCY8UJy9rbnKnxPGc3/W80vWhP6dfTm8I eZsSDmaIE0v/xR6jVV9U5RbaUU51k6dQ0W808= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=S0E50vcDQ5/3rJ3kXF34GumRVKL95Ji+mTNRN6BDGn8=; b=WtdfYnetUP5uSaPkZXDDeW4hD8xAgp9F0DhF4d8IGo0ALbgoZMu7hqD9uco9y597pZ oMWyZk3OsynL4dVC5OPH944harcD/+WP5uBHDAacbzGDewwiLkus8PCef7xIcYKeDWpW 1TOXh7ttVgXmr38+PMRoKbnNyTtlYnrwDySpNxIsGdeO6vrtzG5c6Fy4st8/OcMiN0qy O662+oRbaOptj7hp7cvrG3f+jpOKrbcjhWNXCKNgHhKRP0zw2oPzRFCSUtFYDPSisVNU rXLIkvgmDTBb0HIfjEOXCGcQ+lxbIEkhSyZH6mCImYC9JmpAnFJdMXXlU85IrsEPEshU KLZw== X-Gm-Message-State: AOAM533xMiju7U1F5wmrt639kHPDoA2qPWCiET0qekb/9WdGeO80jvti 7KdZSReCQ22Gv3c36X4QhlccSQ== X-Google-Smtp-Source: ABdhPJySdFAUVZqOu4I5OaHpbvTw7xC86bzc+yY5zZ44IniClMxnRr8ujQFlGeNxe5FY+QyBBteYGg== X-Received: by 2002:a17:903:22ca:b029:12b:9109:4097 with SMTP id y10-20020a17090322cab029012b91094097mr3030486plg.54.1626733304838; Mon, 19 Jul 2021 15:21:44 -0700 (PDT) Received: from localhost ([2620:15c:202:201:4d0:bf5f:b8cd:2d67]) by smtp.gmail.com with UTF8SMTPSA id l7sm10102799pfd.164.2021.07.19.15.21.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Jul 2021 15:21:44 -0700 (PDT) From: Matthias Kaehlcke To: Greg Kroah-Hartman , Alan Stern , Rob Herring , Frank Rowand , Mathias Nyman , Felipe Balbi Cc: Michal Simek , linux-usb@vger.kernel.org, Peter Chen , Bastien Nocera , Douglas Anderson , Stephen Boyd , devicetree@vger.kernel.org, Krzysztof Kozlowski , linux-kernel@vger.kernel.org, Ravi Chandra Sadineni , Matthias Kaehlcke , Dmitry Osipenko , Fabio Estevam Subject: [PATCH v14 5/6] usb: host: xhci-plat: Create platform device for onboard hubs in probe() Date: Mon, 19 Jul 2021 15:21:27 -0700 Message-Id: <20210719152055.v14.5.I7a3a7d9d2126c34079b1cab87aa0b2ec3030f9b7@changeid> X-Mailer: git-send-email 2.32.0.402.g57bb445576-goog In-Reply-To: <20210719222128.4122837-1-mka@chromium.org> References: <20210719222128.4122837-1-mka@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Call onboard_hub_create/destroy_pdevs() from _probe()/_remove() to create/destroy platform devices for onboard USB hubs that may be connected to the root hub of the controller. These functions are a NOP unless CONFIG_USB_ONBOARD_HUB=y/m. Also add a field to struct xhci_hcd to keep track of the onboard hub platform devices that are owned by the xHCI. Signed-off-by: Matthias Kaehlcke --- Changes in v14: - none Changes in v13: - added comment for 'depends on USB_ONBOARD_HUB || !USB_ONBOARD_HUB' construct Changes in v12: - none Changes in v11: - use onboard_hub_create/destroy_pdevs() to support multiple onboard hubs that are connected to the same root hub - moved field/list to keep track of platform devices from struct usb_hcd to struct xhci_hcd - updated commit message Changes in v10: - none Changes in v9: - added dependency on USB_ONBOARD_HUB (or !!USB_ONBOARD_HUB) to USB_XHCI_PLATFORM Changes in v8: - none Changes in v7: - none Changes in v6: - none Changes in v5: - patch added to the series drivers/usb/host/Kconfig | 1 + drivers/usb/host/xhci-plat.c | 6 ++++++ drivers/usb/host/xhci.h | 2 ++ 3 files changed, 9 insertions(+) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 518c2312ef0c..099e9615919c 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -54,6 +54,7 @@ config USB_XHCI_PCI_RENESAS config USB_XHCI_PLATFORM tristate "Generic xHCI driver for a platform device" select USB_XHCI_RCAR if ARCH_RENESAS + depends on USB_ONBOARD_HUB || !USB_ONBOARD_HUB # if USB_ONBOARD_HUB=m, this can't be 'y' help Adds an xHCI host driver for a generic platform device, which provides a memory space and an irq. diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index c1edcc9b13ce..ee98a3671619 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -374,6 +375,9 @@ static int xhci_plat_probe(struct platform_device *pdev) */ pm_runtime_forbid(&pdev->dev); + INIT_LIST_HEAD(&xhci->onboard_hub_devs); + onboard_hub_create_pdevs(hcd->self.root_hub, &xhci->onboard_hub_devs); + return 0; @@ -420,6 +424,8 @@ static int xhci_plat_remove(struct platform_device *dev) usb_remove_hcd(hcd); usb_put_hcd(shared_hcd); + onboard_hub_destroy_pdevs(&xhci->onboard_hub_devs); + clk_disable_unprepare(clk); clk_disable_unprepare(reg_clk); usb_put_hcd(hcd); diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index 3c7d281672ae..5ba01d5ccab8 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -1923,6 +1923,8 @@ struct xhci_hcd { struct dentry *debugfs_slots; struct list_head regset_list; + struct list_head onboard_hub_devs; + void *dbc; /* platform-specific data -- must come last */ unsigned long priv[] __aligned(sizeof(s64));