From patchwork Tue Jul 3 19:57:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pawel Laszczak X-Patchwork-Id: 10505101 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D1DAB6035E for ; Tue, 3 Jul 2018 20:00:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEEF528C27 for ; Tue, 3 Jul 2018 20:00:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B345628C77; Tue, 3 Jul 2018 20:00:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4105928C27 for ; Tue, 3 Jul 2018 20:00:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753339AbeGCT7y (ORCPT ); Tue, 3 Jul 2018 15:59:54 -0400 Received: from mail-sn1nam01on0074.outbound.protection.outlook.com ([104.47.32.74]:12721 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753067AbeGCT6i (ORCPT ); Tue, 3 Jul 2018 15:58:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OXCHFXAy54Pfc2pgTIc/s26DsWRkbLHiWa48VtFfq48=; b=cUowWJcWWJS4HVGFjIqe2l3PA8EBqeCx4lV8mVUTDr9sJ91S57rEdMZgQePhYSBl+xOh9pZCCzBA3XKl3cK7ZOTuXp411StHKZ4gCGu5dHzApu6oYMiphzefuZcxXxX5nJtRpxxKt/3IugrMHYnuRTfFavMrLk8XZNJsUwKI9Ew= Received: from CY1PR07CA0027.namprd07.prod.outlook.com (2a01:111:e400:c60a::37) by CY1PR0701MB1338.namprd07.prod.outlook.com (2a01:111:e400:4c1b::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.19; Tue, 3 Jul 2018 19:58:34 +0000 Received: from CO1NAM05FT039.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e50::203) by CY1PR07CA0027.outlook.office365.com (2a01:111:e400:c60a::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.906.24 via Frontend Transport; Tue, 3 Jul 2018 19:58:34 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning cadence.com discourages use of 199.43.4.28 as permitted sender) Received: from rmmaillnx1.cadence.com (199.43.4.28) by CO1NAM05FT039.mail.protection.outlook.com (10.152.96.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.930.2 via Frontend Transport; Tue, 3 Jul 2018 19:58:33 +0000 Received: from maileu3.global.cadence.com (maileu3.cadence.com [10.160.88.99]) by rmmaillnx1.cadence.com (8.14.4/8.14.4) with ESMTP id w63JwMsC006991 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Tue, 3 Jul 2018 15:58:32 -0400 X-CrossPremisesHeadersFilteredBySendConnector: maileu3.global.cadence.com Received: from maileu3.global.cadence.com (10.160.88.99) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 3 Jul 2018 21:58:43 +0200 Received: from lvlogina.cadence.com (10.165.176.102) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Tue, 3 Jul 2018 21:58:43 +0200 Received: from lvlogina.cadence.com (localhost.localdomain [127.0.0.1]) by lvlogina.cadence.com (8.14.4/8.14.4) with ESMTP id w63JwQd8012416; Tue, 3 Jul 2018 20:58:26 +0100 Received: (from pawell@localhost) by lvlogina.cadence.com (8.14.4/8.14.4/Submit) id w63JwQYQ012403; Tue, 3 Jul 2018 20:58:26 +0100 From: Pawel Laszczak To: Greg Kroah-Hartman , , Felipe Balbi CC: , , Subject: [PATCH 14/15] Introduce Cadence USBSSP DRD Driver - added Kconfig and Makefile files. Date: Tue, 3 Jul 2018 20:57:58 +0100 Message-ID: <1530647879-10007-15-git-send-email-pawell@cadence.com> X-Mailer: git-send-email 1.7.11.2 In-Reply-To: <1530647879-10007-1-git-send-email-pawell@cadence.com> References: <1530647879-10007-1-git-send-email-pawell@cadence.com> MIME-Version: 1.0 X-OrganizationHeadersPreserved: maileu3.global.cadence.com X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:199.43.4.28; IPV:CAL; SCL:-1; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(346002)(376002)(396003)(39860400002)(136003)(2980300002)(199004)(189003)(36092001)(50226002)(36756003)(2616005)(426003)(48376002)(4326008)(69596002)(5660300001)(87636003)(8936002)(446003)(478600001)(76176011)(51416003)(186003)(356003)(6346003)(26826003)(476003)(50466002)(11346002)(26005)(336012)(126002)(4720700003)(81156014)(6666003)(81166006)(107886003)(53936002)(47776003)(106466001)(86362001)(2906002)(486006)(105596002)(8676002)(97736004)(54906003)(305945005)(16586007)(42186006)(68736007)(316002)(110136005)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0701MB1338; H:rmmaillnx1.cadence.com; FPR:; SPF:SoftFail; LANG:en; PTR:InfoDomainNonexistent; A:1; MX:1; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM05FT039; 1:TPkrnYuXFk0ZhhZcI8S7Eg2taeMVb9I5Ju02l7opimirHBkYh5xd6lILN1wdndJVp7EpHKeqst0ImwXRQNVFO+d1Ili9RT2dNhlWr5mE4f/PWDHmnM2MxLBP97knWCU0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4462dfa5-1e90-4ed8-9117-08d5e11f5bae X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060); SRVR:CY1PR0701MB1338; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1338; 3:MNzC+rdWgwfVsYs3zBvUj3OrHBTmHhWeYPiObax43H7U6hxIZhqHQyeLp/z1qWUJ03aKrJax7OdBTptBji0nvtnB9TeQTFrgqNEbT65BE3mpP7keJCBsQb/iOm+27MwWO8UfBPcXvjiZz4WOI4ubnjnAcPdUc6Y1xLTajyb6+BOQb+ImvopzPscL0o2VdCWW/WxJ7/6nDjnx7s/9E54GFvoWrOQhVm+/V3hVmWS7KQLBUu1EpkouisQFpP0dmRzcWlpNDoxiEC3YBCuCzFDWCB55ex73uMxI4AuPgC6G7jerVnIUYZIl4jsINL3Mn3aXvEaHbz9QHVOjWdmvf/mZAg==; 25:s46gyezrJxjJgEKgmMF8Wmuez1U4IlP8yOvasHyqlzRZ3+ualkfV4wLNBuAOTE4s5k4JP5Rasaf3bZEElpSqXeAHZUTeHbiZdP88Z5O9+l3cG6AUkvQpwjtH8sgHNuT0o9bILGAtxd8wXv2yXEPAIFr8ixpsgF0oYnkvo/t9d/T3MrHbWfc9WBWMW4uP4snMtQvfAhQiK+QoHaaSFSw91+sGki0c8QAQ02vYx7uMKrK2eaBsJRY4UyvM/1AnJ9xHnVip0bRbzc1Q8fRXrljUp5AMYWpegwqxFuaHO3k/ByCme0mrlVnj0HK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TgxHSPB//9tcuD9CIHyQbVWHWrs741FpO+rQuzsG7W3FhzZf7PQiUSwe4FL/m3mSN3+815djsxKSYEly7aIioYIhLuqJxpEl42s X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(72806322054110); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231280)(944501410)(52105095)(3002001)(10201501046)(93006095)(93003095)(149027)(150027)(6041310)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:CY1PR0701MB1338; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0701MB1338; X-Forefront-PRVS: 0722981D2A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0701MB1338; 23:Y+IaCcBAKkoRzAEzuGozE0fQqE1dbfGRQtScZW2?= =?us-ascii?Q?8rH3tfQF6lK9RJCI+xvcWlWMkW3zd1YDPjYSomLHsvR+GuJ9VZELf1rLnrWF?= =?us-ascii?Q?fqlbXBaz6bjuBj4mQr43pe1YfYUTBYI/OjiUcaCfmT00m8a1q53I52f8/g7u?= =?us-ascii?Q?K8yZun1fdEoi9A4VMwCECHWWno1vSCl/ubtOyucLulguHbJuDRil8oYqebvF?= =?us-ascii?Q?3dl1Htk/iWyHuah1/CgEQPAzB3d3GLZ0LlUrayzHBH9tCw3LWlp8w29ColFb?= =?us-ascii?Q?R4aVCL6xRokT8QrstcR8nPPoQCttYhKlOw0rHDAvxWaJPaMS8A2IgQdKrnPB?= =?us-ascii?Q?1x6/3s/6pE8tCaDuHDyedkmufCprgAYu5y+5xhzwjGVzMVLLgdj2wBRrIfxH?= =?us-ascii?Q?6rugXKJMgwAwIkalAL2RMdvdPyKc8ApQFRZSmAB8kX/5R0Nqac7ks6c48LUA?= =?us-ascii?Q?EMUGhiWGWSW8Ag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vEoJcmxb1XkJG1Ow/hkaKBXlCcpRFO97cro= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1338; 7:m2hwJSlu8iR3GhWPAimXoypzm1LASuTkIcwsXGrV2DxNhkpD8WctiF2F7P4fZhoXgRPWl8ZT0fLFb7vehE1fu6MwzO2YJGftpQth/vbgcknkl1eI7J0TzUpqreDn31zTPxBn2ONu6OehEUwBo6fnIi0HK4fBP9TgWUwzrSsWsaH5a3JVSV2JNTEk1b8zHHIJYk64HvjUSDPDLTobd4UBnw5gnWY7E/dYRIdXIV4p0ZYvNbQfmjugu58+Ruo7Irea; 20:3gsC59o30NfjKxi4eSAf4zUW/6Ut3xV+HLSYNnokpV+zIDiE/Gfe3Cj2vS4bZGXm8u6zgYb7a9hpuKE9+iwN1p1gVcN6BnxOYSqBnsn85UoSJzQZjUDmu6fbJKl7v2abV3l5+NSxwWpNPyN6tPEOyvIPFibs6PabMS7CGl/Ldy2HqYOk1f3UkO8r+atmMQWbgh0P103EqzGHTZKH7YnhTlrc51UmL85/xGNXCpZOqcIT7knADsbBvXnqEgNrvRc8 X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2018 19:58:33.8383 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4462dfa5-1e90-4ed8-9117-08d5e11f5bae X-MS-Exchange-CrossTenant-Id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d36035c5-6ce6-4662-a3dc-e762e61ae4c9; Ip=[199.43.4.28]; Helo=[rmmaillnx1.cadence.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1338 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Laszczak Pawel --- drivers/usb/usbssp/Kconfig | 29 +++++++++++++++++++++++++++++ drivers/usb/usbssp/Makefile | 17 +++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 drivers/usb/usbssp/Kconfig create mode 100644 drivers/usb/usbssp/Makefile diff --git a/drivers/usb/usbssp/Kconfig b/drivers/usb/usbssp/Kconfig new file mode 100644 index 000000000000..e55c97a2da5f --- /dev/null +++ b/drivers/usb/usbssp/Kconfig @@ -0,0 +1,29 @@ +config USB_USBSSP + tristate "Cadence USBSSP DRD Controller" + depends on (USB || USB_GADGET) && HAS_DMA + select USB_USBSSP_GADGET + help + Say Y here if your system has a cadence USBSSP dual-role controller. + It supports: dual-role switch Host-only, and Peripheral-only. + + If you choose to build this driver is a dynamically linked + module, the module will be called usbssp.ko. + +if USB_USBSSP + +config USB_USBSSP_GADGET + bool "Gadget only mode" + depends on USB_GADGET=y || USB_GADGET=USB_USBSSP + help + Select this when you want to use USBSSP in gadget mode only, + +config USB_USBSSP_PCI + tristate "PCIe-based Platforms" + depends on USB_PCI && ACPI + default USB_USBSSP + help + If you're using the USBSSP Core IP with a PCIe, please say + 'Y' or 'M' here. + +endif + diff --git a/drivers/usb/usbssp/Makefile b/drivers/usb/usbssp/Makefile new file mode 100644 index 000000000000..b6d5fabc3571 --- /dev/null +++ b/drivers/usb/usbssp/Makefile @@ -0,0 +1,17 @@ +# SPDX-License-Identifier: GPL-2.0 +# define_trace.h needs to know how to find our header +CFLAGS_trace.o := -I$(src) + +obj-$(CONFIG_USB_USBSSP_GADGET) += usbssp-plat.o gadget-dbg.o \ + gadget-mem.o gadget-ring.o \ + gadget.o gadget-ep0.o gadget-port.o + +ifneq ($(CONFIG_TRACING),) + usbssp-y += trace.o +endif + +ifneq ($(CONFIG_DEBUG_FS),) + usbssp-y += gadget-debugfs.o +endif + +obj-$(CONFIG_USB_USBSSP_PCI) +=usbssp-pci-of-wrap.o