From patchwork Fri Apr 3 23:59:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 11473895 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2CEFB1874 for ; Sat, 4 Apr 2020 00:00:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0901C20737 for ; Sat, 4 Apr 2020 00:00:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=rere.qmqm.pl header.i=@rere.qmqm.pl header.b="g96g/S/H" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726437AbgDDAAI (ORCPT ); Fri, 3 Apr 2020 20:00:08 -0400 Received: from rere.qmqm.pl ([91.227.64.183]:26382 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726269AbgDDAAH (ORCPT ); Fri, 3 Apr 2020 20:00:07 -0400 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 48vH445nXfzBh; Sat, 4 Apr 2020 02:00:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1585958405; bh=ZL1FnraQ0/rs6zSMOmrniVCYmeY3lor0j5mVDSLrkwQ=; h=Date:From:Subject:To:Cc:From; b=g96g/S/HMVqayegesKET2uy/rGUz5fVOTxMYhm6LLgpGPeyWJo+kzZJlxYzUg4GOu rbfz2yXiLRB0jQrSBF+cOmjussS0DlyAbPmRWxanmFsryVatBe17SPlI1vr9JrOedD Hv6ndl6700AAUjF0cySL/WfZIADP/j0eWZ7p+CbwckRXrNpIm0FS8F3saNKUQyu+lq HKBqSHGuVPHMfePnha96KnV9SODP/TOzuRz7/P/zKHQwVwYPTgCxyQkV0FPWR4/0SK v/FaCCCITgKpiDSTkXRLiD2dMQU+FnZXpwRWl8U79RuIxr2C49fsqZ6VCWC3vercGS wueAzHUFwrm9g== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.2 at mail Date: Sat, 04 Apr 2020 01:59:58 +0200 Message-Id: <2b6d70595475a3ddbd5bb8ae1765868a98c404b6.1585958250.git.mirq-linux@rere.qmqm.pl> From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH 1/5] usb: chipidea: usb2: constify zynq_pdata MIME-Version: 1.0 To: Peter Chen , Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org pdata is copied anyway to allow setting device name. Make the source const. Signed-off-by: Michał Mirosław --- drivers/usb/chipidea/ci_hdrc_usb2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/ci_hdrc_usb2.c b/drivers/usb/chipidea/ci_hdrc_usb2.c index c044fba463e4..62cf8a99cf78 100644 --- a/drivers/usb/chipidea/ci_hdrc_usb2.c +++ b/drivers/usb/chipidea/ci_hdrc_usb2.c @@ -28,7 +28,7 @@ static const struct ci_hdrc_platform_data ci_default_pdata = { .flags = CI_HDRC_DISABLE_STREAMING, }; -static struct ci_hdrc_platform_data ci_zynq_pdata = { +static const struct ci_hdrc_platform_data ci_zynq_pdata = { .capoffset = DEF_CAPOFFSET, }; From patchwork Sat Apr 4 00:00:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 11473897 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 638AB913 for ; Sat, 4 Apr 2020 00:00:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 386FB2074B for ; Sat, 4 Apr 2020 00:00:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=rere.qmqm.pl header.i=@rere.qmqm.pl header.b="rv1jB5t1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726395AbgDDAAI (ORCPT ); Fri, 3 Apr 2020 20:00:08 -0400 Received: from rere.qmqm.pl ([91.227.64.183]:40293 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726208AbgDDAAH (ORCPT ); Fri, 3 Apr 2020 20:00:07 -0400 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 48vH454MQJzWS; Sat, 4 Apr 2020 02:00:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1585958405; bh=rF9Azg0yoCvSWs6Gga3gO15qve4vsBHrMOl9X8Urzq0=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=rv1jB5t1iZLbK+mzmx5a3MMuCB8fobnQXVTL2JGZLKmN2Ah0/TASh+FoN/3usSH/G Q89dmpdn4+Jbp2bM8YyEFi6etGB1qfdY3Y65Q8+yIt9zA6exmNDPShnJmCi5JaRI6z 2MvXsUJeRDM7AhX3cLWkyRE86lZSfXyn4pqlkf5UAmgp7AX2rqgHoCi58twvgMLO6x 3I9nPc+4s63dalS9H4xnUC3WJ4S7ygptkPDZnc0ojMJrnlKrQwfRu9/+4+9empDgMh QTJQMRELun9g6Cd3UEndjlrjjkfRt+49yGNb9gMk2IXWhlJ1wOy55wXEcZUXZ/zcCy 2yxgTfHDStXvA== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.2 at mail Date: Sat, 04 Apr 2020 02:00:05 +0200 Message-Id: In-Reply-To: <2b6d70595475a3ddbd5bb8ae1765868a98c404b6.1585958250.git.mirq-linux@rere.qmqm.pl> References: <2b6d70595475a3ddbd5bb8ae1765868a98c404b6.1585958250.git.mirq-linux@rere.qmqm.pl> From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH 2/5] usb: chipidea: usb2: fix formatting MIME-Version: 1.0 To: Greg Kroah-Hartman , Peter Chen Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Add spaces before closing braces. Signed-off-by: Michał Mirosław --- drivers/usb/chipidea/ci_hdrc_usb2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/chipidea/ci_hdrc_usb2.c b/drivers/usb/chipidea/ci_hdrc_usb2.c index 62cf8a99cf78..bf300a234e64 100644 --- a/drivers/usb/chipidea/ci_hdrc_usb2.c +++ b/drivers/usb/chipidea/ci_hdrc_usb2.c @@ -33,8 +33,8 @@ static const struct ci_hdrc_platform_data ci_zynq_pdata = { }; static const struct of_device_id ci_hdrc_usb2_of_match[] = { - { .compatible = "chipidea,usb2"}, - { .compatible = "xlnx,zynq-usb-2.20a", .data = &ci_zynq_pdata}, + { .compatible = "chipidea,usb2" }, + { .compatible = "xlnx,zynq-usb-2.20a", .data = &ci_zynq_pdata }, { } }; MODULE_DEVICE_TABLE(of, ci_hdrc_usb2_of_match); From patchwork Sat Apr 4 00:00:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 11473899 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 42A05913 for ; Sat, 4 Apr 2020 00:00:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 213A32074B for ; Sat, 4 Apr 2020 00:00:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=rere.qmqm.pl header.i=@rere.qmqm.pl header.b="qqv8Kbke" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726594AbgDDAAX (ORCPT ); Fri, 3 Apr 2020 20:00:23 -0400 Received: from rere.qmqm.pl ([91.227.64.183]:63113 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726283AbgDDAAI (ORCPT ); Fri, 3 Apr 2020 20:00:08 -0400 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 48vH460RsJzZ1; Sat, 4 Apr 2020 02:00:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1585958406; bh=bsuHw8Ua60Zcsxk1TaxSYtB0ZG8LffLBdTMIriUnQtU=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=qqv8Kbke4XES/OprUqpvcBcKa+2kWVztnOkChuBCY+GzgApBs9guztJRZRILkulxK 4KTBtS8fLoak0BVk9HoQUqkHnOUJcdTOORummtngH57DFwKS8t4+ruf3AkhL4cItHL 6i4fbMsLX1emHaMjgbMTOckkCu3Pk1YEI2PNcB7afAUGle12Sc/cd3Uzf/PyhLaT94 5tVNihITgYobI5tLXgAHpgtgtxG9fnIY6IX+imLFeklhKLMNDCzT57kOkDHQgZQ0pU jwY5oJoq/l1DvkKQWv+gX8EkHQOBJXZGU0mcjzFiT9JN4voqL9d182RWwoXcuQ7EHc HtjA9kOnkZu6w== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.2 at mail Date: Sat, 04 Apr 2020 02:00:05 +0200 Message-Id: In-Reply-To: <2b6d70595475a3ddbd5bb8ae1765868a98c404b6.1585958250.git.mirq-linux@rere.qmqm.pl> References: <2b6d70595475a3ddbd5bb8ae1765868a98c404b6.1585958250.git.mirq-linux@rere.qmqm.pl> From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH 3/5] usb: chipidea: usb2: make clock optional MIME-Version: 1.0 To: Greg Kroah-Hartman , Peter Chen Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Allow clock to be missing from DT (assume it's enabled then). Signed-off-by: Michał Mirosław --- drivers/usb/chipidea/ci_hdrc_usb2.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/usb/chipidea/ci_hdrc_usb2.c b/drivers/usb/chipidea/ci_hdrc_usb2.c index bf300a234e64..9086514840ed 100644 --- a/drivers/usb/chipidea/ci_hdrc_usb2.c +++ b/drivers/usb/chipidea/ci_hdrc_usb2.c @@ -64,13 +64,14 @@ static int ci_hdrc_usb2_probe(struct platform_device *pdev) if (!priv) return -ENOMEM; - priv->clk = devm_clk_get(dev, NULL); - if (!IS_ERR(priv->clk)) { - ret = clk_prepare_enable(priv->clk); - if (ret) { - dev_err(dev, "failed to enable the clock: %d\n", ret); - return ret; - } + priv->clk = devm_clk_get_optional(dev, NULL); + if (IS_ERR(priv->clk)) + return PTR_ERR(priv->clk);; + + ret = clk_prepare_enable(priv->clk); + if (ret) { + dev_err(dev, "failed to enable the clock: %d\n", ret); + return ret; } ci_pdata->name = dev_name(dev); @@ -94,8 +95,7 @@ static int ci_hdrc_usb2_probe(struct platform_device *pdev) return 0; clk_err: - if (!IS_ERR(priv->clk)) - clk_disable_unprepare(priv->clk); + clk_disable_unprepare(priv->clk); return ret; } From patchwork Sat Apr 4 00:00:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 11473891 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D9D70913 for ; Sat, 4 Apr 2020 00:00:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B52A020737 for ; Sat, 4 Apr 2020 00:00:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=rere.qmqm.pl header.i=@rere.qmqm.pl header.b="GetNmysi" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726481AbgDDAAJ (ORCPT ); Fri, 3 Apr 2020 20:00:09 -0400 Received: from rere.qmqm.pl ([91.227.64.183]:53768 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726297AbgDDAAI (ORCPT ); Fri, 3 Apr 2020 20:00:08 -0400 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 48vH463jZhzpX; Sat, 4 Apr 2020 02:00:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1585958406; bh=8/z3OJqgrWtCMOo2sXfQJgsdpXMe6hRzbfTaYY95jtc=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=GetNmysilR8dQtbOKFH+tS3RSXNSdlMcS/ur/FLnDiA/eiI747DNN/du3ZIAw3BD2 UHLYWtwl8EKYYn3jSsE6YYl1sLXtNFTcRsar67IuTtRFquqHZBSf+9WPdI5rxJ6ut9 Djcfhf0XIIXqPL3waDIjExVqejAd+yJl0l8cS0DK1S+A6FuF6AvFtQBANkmeep+PS8 U1RP9aFzTW26GyLvlEvZM0Z7u5BDW4iEFz16SYE5q/3C5j6pX0wqgNNipxNpmu6WFM bN5YOOrYmGWf4UjJPdhTQA953/qMeL5jV9lwxanXb5nA2FX7u1QnYWb1AMWUM+wy/n YHtdOnYocWVUg== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.2 at mail Date: Sat, 04 Apr 2020 02:00:06 +0200 Message-Id: <5b7c0cdc715d1dbdfcc5f8b8217da6878bcc6b93.1585958250.git.mirq-linux@rere.qmqm.pl> In-Reply-To: <2b6d70595475a3ddbd5bb8ae1765868a98c404b6.1585958250.git.mirq-linux@rere.qmqm.pl> References: <2b6d70595475a3ddbd5bb8ae1765868a98c404b6.1585958250.git.mirq-linux@rere.qmqm.pl> From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH 4/5] usb: chipidea: usb2: absorb zevio glue driver MIME-Version: 1.0 To: Greg Kroah-Hartman , Peter Chen Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org ZEVIO glue code is is identical to generic binding now, but doesn't enable runtime PM. Let's squash the driver and get runtime PM for free. Signed-off-by: Michał Mirosław --- drivers/usb/chipidea/Makefile | 1 - drivers/usb/chipidea/ci_hdrc_usb2.c | 6 +++ drivers/usb/chipidea/ci_hdrc_zevio.c | 67 ---------------------------- 3 files changed, 6 insertions(+), 68 deletions(-) diff --git a/drivers/usb/chipidea/Makefile b/drivers/usb/chipidea/Makefile index 12df94f78f72..985663ba6e68 100644 --- a/drivers/usb/chipidea/Makefile +++ b/drivers/usb/chipidea/Makefile @@ -10,7 +10,6 @@ ci_hdrc-$(CONFIG_USB_OTG_FSM) += otg_fsm.o obj-$(CONFIG_USB_CHIPIDEA) += ci_hdrc_usb2.o obj-$(CONFIG_USB_CHIPIDEA) += ci_hdrc_msm.o -obj-$(CONFIG_USB_CHIPIDEA) += ci_hdrc_zevio.o obj-$(CONFIG_USB_CHIPIDEA_PCI) += ci_hdrc_pci.o diff --git a/drivers/usb/chipidea/ci_hdrc_usb2.c b/drivers/usb/chipidea/ci_hdrc_usb2.c index 9086514840ed..93c864759135 100644 --- a/drivers/usb/chipidea/ci_hdrc_usb2.c +++ b/drivers/usb/chipidea/ci_hdrc_usb2.c @@ -32,9 +32,15 @@ static const struct ci_hdrc_platform_data ci_zynq_pdata = { .capoffset = DEF_CAPOFFSET, }; +static const struct ci_hdrc_platform_data ci_zevio_pdata = { + .capoffset = DEF_CAPOFFSET, + .flags = CI_HDRC_REGS_SHARED | CI_HDRC_FORCE_FULLSPEED, +}; + static const struct of_device_id ci_hdrc_usb2_of_match[] = { { .compatible = "chipidea,usb2" }, { .compatible = "xlnx,zynq-usb-2.20a", .data = &ci_zynq_pdata }, + { .compatible = "lsi,zevio-usb", .data = &ci_zevio_pdata }, { } }; MODULE_DEVICE_TABLE(of, ci_hdrc_usb2_of_match); diff --git a/drivers/usb/chipidea/ci_hdrc_zevio.c b/drivers/usb/chipidea/ci_hdrc_zevio.c deleted file mode 100644 index e1634da4a4b1..000000000000 --- a/drivers/usb/chipidea/ci_hdrc_zevio.c +++ /dev/null @@ -1,67 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * Copyright (C) 2013 Daniel Tang - * - * Based off drivers/usb/chipidea/ci_hdrc_msm.c - */ - -#include -#include -#include -#include - -#include "ci.h" - -static struct ci_hdrc_platform_data ci_hdrc_zevio_platdata = { - .name = "ci_hdrc_zevio", - .flags = CI_HDRC_REGS_SHARED | CI_HDRC_FORCE_FULLSPEED, - .capoffset = DEF_CAPOFFSET, -}; - -static int ci_hdrc_zevio_probe(struct platform_device *pdev) -{ - struct platform_device *ci_pdev; - - dev_dbg(&pdev->dev, "ci_hdrc_zevio_probe\n"); - - ci_pdev = ci_hdrc_add_device(&pdev->dev, - pdev->resource, pdev->num_resources, - &ci_hdrc_zevio_platdata); - - if (IS_ERR(ci_pdev)) { - dev_err(&pdev->dev, "ci_hdrc_add_device failed!\n"); - return PTR_ERR(ci_pdev); - } - - platform_set_drvdata(pdev, ci_pdev); - - return 0; -} - -static int ci_hdrc_zevio_remove(struct platform_device *pdev) -{ - struct platform_device *ci_pdev = platform_get_drvdata(pdev); - - ci_hdrc_remove_device(ci_pdev); - - return 0; -} - -static const struct of_device_id ci_hdrc_zevio_dt_ids[] = { - { .compatible = "lsi,zevio-usb", }, - { /* sentinel */ } -}; - -static struct platform_driver ci_hdrc_zevio_driver = { - .probe = ci_hdrc_zevio_probe, - .remove = ci_hdrc_zevio_remove, - .driver = { - .name = "zevio_usb", - .of_match_table = ci_hdrc_zevio_dt_ids, - }, -}; - -MODULE_DEVICE_TABLE(of, ci_hdrc_zevio_dt_ids); -module_platform_driver(ci_hdrc_zevio_driver); - -MODULE_LICENSE("GPL v2"); From patchwork Sat Apr 4 00:00:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 11473893 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6EAD21874 for ; Sat, 4 Apr 2020 00:00:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4C06920787 for ; Sat, 4 Apr 2020 00:00:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=rere.qmqm.pl header.i=@rere.qmqm.pl header.b="T0YSsb4j" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726297AbgDDAAN (ORCPT ); Fri, 3 Apr 2020 20:00:13 -0400 Received: from rere.qmqm.pl ([91.227.64.183]:2456 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726339AbgDDAAJ (ORCPT ); Fri, 3 Apr 2020 20:00:09 -0400 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 48vH465jf5zqB; Sat, 4 Apr 2020 02:00:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1585958406; bh=ERaR7ygM77SbTRq+ee9gcCX1NXRy6uMU4qvMkPRl8pk=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=T0YSsb4jOs8jPx/dRCcVRaaPL+VAs1GTk4ed+4c/4HbhcftgsFR0WcFvaxOam/jp1 CyEhpbfGmYOoWbNLX4E0zAGcD4UK5SIpBYZYZlqPuDxhUzR4YvYfefasta6eD6BjfV ZZECMM2LnpioEIDw+62+FGj95JRGg5TPuomH04jY+m/kLmbI5p6PR6W6MGzMu0FjYZ 7oLoSmFw3ivPVZR0wIWWU4X61jfKFV+72RM8kv5ea6ZJDS1ZRfzPb5BS9zeJ2H8KSA YqDMyA6IXPAxE6ncUnCJ7yV6iOqdlqXIQLVXDKrWcj58tHBopE2uVMFUdQ1BWdVVcF Oho3eV0ciBzeA== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.2 at mail Date: Sat, 04 Apr 2020 02:00:06 +0200 Message-Id: <1bf89d4301baa8632daf48b3e28858aff5371954.1585958250.git.mirq-linux@rere.qmqm.pl> In-Reply-To: <2b6d70595475a3ddbd5bb8ae1765868a98c404b6.1585958250.git.mirq-linux@rere.qmqm.pl> References: <2b6d70595475a3ddbd5bb8ae1765868a98c404b6.1585958250.git.mirq-linux@rere.qmqm.pl> From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH 5/5] usb: chipidea: allow disabling glue drivers if EMBEDDED MIME-Version: 1.0 To: Greg Kroah-Hartman , Peter Chen Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Allow to cut down on driver size for embedded config. Signed-off-by: Michał Mirosław --- drivers/usb/chipidea/Kconfig | 37 ++++++++++++++++++++++++----------- drivers/usb/chipidea/Makefile | 12 +++++------- 2 files changed, 31 insertions(+), 18 deletions(-) diff --git a/drivers/usb/chipidea/Kconfig b/drivers/usb/chipidea/Kconfig index d53db520e209..8bafcfc6080d 100644 --- a/drivers/usb/chipidea/Kconfig +++ b/drivers/usb/chipidea/Kconfig @@ -18,17 +18,6 @@ config USB_CHIPIDEA if USB_CHIPIDEA -config USB_CHIPIDEA_OF - tristate - depends on OF - default USB_CHIPIDEA - -config USB_CHIPIDEA_PCI - tristate - depends on USB_PCI - depends on NOP_USB_XCEIV - default USB_CHIPIDEA - config USB_CHIPIDEA_UDC bool "ChipIdea device controller" depends on USB_GADGET @@ -43,4 +32,30 @@ config USB_CHIPIDEA_HOST help Say Y here to enable host controller functionality of the ChipIdea driver. + +config USB_CHIPIDEA_PCI + tristate "Enable PCI glue driver" if EMBEDDED + depends on USB_PCI + depends on NOP_USB_XCEIV + default USB_CHIPIDEA + +config USB_CHIPIDEA_MSM + tristate "Enable MSM hsusb glue driver" if EMBEDDED + default USB_CHIPIDEA + +config USB_CHIPIDEA_IMX + tristate "Enable i.MX USB glue driver" if EMBEDDED + depends on OF + default USB_CHIPIDEA + +config USB_CHIPIDEA_GENERIC + tristate "Enable generic USB2 glue driver" if EMBEDDED + default USB_CHIPIDEA + +config USB_CHIPIDEA_TEGRA + tristate "Enable Tegra UDC glue driver" if EMBEDDED + depends on OF + depends on USB_CHIPIDEA_UDC + default USB_CHIPIDEA + endif diff --git a/drivers/usb/chipidea/Makefile b/drivers/usb/chipidea/Makefile index 985663ba6e68..fae779a23866 100644 --- a/drivers/usb/chipidea/Makefile +++ b/drivers/usb/chipidea/Makefile @@ -8,10 +8,8 @@ ci_hdrc-$(CONFIG_USB_OTG_FSM) += otg_fsm.o # Glue/Bridge layers go here -obj-$(CONFIG_USB_CHIPIDEA) += ci_hdrc_usb2.o -obj-$(CONFIG_USB_CHIPIDEA) += ci_hdrc_msm.o - -obj-$(CONFIG_USB_CHIPIDEA_PCI) += ci_hdrc_pci.o - -obj-$(CONFIG_USB_CHIPIDEA_OF) += usbmisc_imx.o ci_hdrc_imx.o -obj-$(CONFIG_USB_CHIPIDEA_OF) += ci_hdrc_tegra.o +obj-$(CONFIG_USB_CHIPIDEA_GENERIC) += ci_hdrc_usb2.o +obj-$(CONFIG_USB_CHIPIDEA_MSM) += ci_hdrc_msm.o +obj-$(CONFIG_USB_CHIPIDEA_PCI) += ci_hdrc_pci.o +obj-$(CONFIG_USB_CHIPIDEA_IMX) += ci_hdrc_imx.o usbmisc_imx.o +obj-$(CONFIG_USB_CHIPIDEA_TEGRA) += ci_hdrc_tegra.o