From patchwork Fri May 6 06:31:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jung Daehwan X-Patchwork-Id: 12840629 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A2BAC433EF for ; Fri, 6 May 2022 06:33:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348886AbiEFGhJ (ORCPT ); Fri, 6 May 2022 02:37:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232954AbiEFGhI (ORCPT ); Fri, 6 May 2022 02:37:08 -0400 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9E0265D37 for ; Thu, 5 May 2022 23:33:24 -0700 (PDT) Received: from epcas2p3.samsung.com (unknown [182.195.41.55]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20220506063320epoutp041e55278c957c7a4fdbc80ae39f476bd6~scHKEP14V2014720147epoutp04F for ; Fri, 6 May 2022 06:33:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20220506063320epoutp041e55278c957c7a4fdbc80ae39f476bd6~scHKEP14V2014720147epoutp04F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1651818800; bh=UoxbgRPuhct4Fhd+B8dwdlXh1yYrD6h+9jGksHt8h7Q=; h=From:To:Cc:Subject:Date:References:From; b=aS97B2EpHqW7kEoKwTU2+BsasVflCNHrpQs2jefSuhdHcjZgWnISVtsi3+CSopauv mk2rj/M/sOb7T28w0NDFVN+L+ArwXNPRsD5WoVqXHREbV8JL3NBadPiiK1dpS1h7Nl RtHjQznVO3LP3kwxRazdR62PL/V2C4F8MXGXSZ30= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20220506063319epcas2p4305144f9691321ff51ed8191f9608f0f~scHJUZcNL0959509595epcas2p4D; Fri, 6 May 2022 06:33:19 +0000 (GMT) Received: from epsmges2p4.samsung.com (unknown [182.195.36.92]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4Kvgk44LnXz4x9Q2; Fri, 6 May 2022 06:33:16 +0000 (GMT) Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id F2.03.09694.C21C4726; Fri, 6 May 2022 15:33:16 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p1.samsung.com (KnoxPortal) with ESMTPA id 20220506063316epcas2p197ed75070ed4f4ba29439f5c0def90b4~scHGEUzQX1116211162epcas2p1X; Fri, 6 May 2022 06:33:16 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20220506063316epsmtrp156daa5c81d0585df92d070d0918eeb4d~scHGDXeDn3084030840epsmtrp1g; Fri, 6 May 2022 06:33:16 +0000 (GMT) X-AuditID: b6c32a48-47fff700000025de-5f-6274c12c394a Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 4B.45.11276.B21C4726; Fri, 6 May 2022 15:33:15 +0900 (KST) Received: from ubuntu.dsn.sec.samsung.com (unknown [10.229.95.128]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20220506063315epsmtip2764ef37fc2119eecc5bae8928032a0c7~scHFyLbbR0424804248epsmtip2b; Fri, 6 May 2022 06:33:15 +0000 (GMT) From: Daehwan Jung To: Felipe Balbi , Greg Kroah-Hartman , Krzysztof Kozlowski , Alim Akhtar , Mathias Nyman , Lukas Bulwahn , Tony Lindgren , Juergen Gross , Arnd Bergmann , Matthias Kaehlcke Cc: linux-kernel@vger.kernel.org (open list), linux-usb@vger.kernel.org (open list:DESIGNWARE USB3 DRD IP DRIVER), linux-arm-kernel@lists.infradead.org (moderated list:ARM/SAMSUNG S3C, S5P AND EXYNOS ARM ARCHITECTURES), linux-samsung-soc@vger.kernel.org (open list:ARM/SAMSUNG S3C, S5P AND EXYNOS ARM ARCHITECTURES), sc.suh@samsung.com, taehyun.cho@samsung.com, jh0801.jung@samsung.com, eomji.oh@samsung.com, Daehwan Jung Subject: [PATCH v5 0/6] Add xhci-exynos for Exynos SOC Date: Fri, 6 May 2022 15:31:13 +0900 Message-Id: <1651818679-10594-1-git-send-email-dh10.jung@samsung.com> X-Mailer: git-send-email 2.7.4 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrDJsWRmVeSWpSXmKPExsWy7bCmua7OwZIkg8fbFS0ezNvGZvF30jF2 i2NtT9gt7iyYxmRxavlCJovmxevZLObcNLK4+/AHi8Xe11vZLTY9vsZqcXnXHDaLGef3MVks WtbKbNFytJ3FonnTFFaLzxseM1p03b3BaDHpoKjF/iteDsIev39NYvT49nUSi8fshossHjtn 3WX3WLznJZPHplWdbB53ru1h89g/dw27x+Yl9R59W1YxeqzfcpXF4/MmuQCeqGybjNTElNQi hdS85PyUzLx0WyXv4HjneFMzA0NdQ0sLcyWFvMTcVFslF58AXbfMHKAPlRTKEnNKgUIBicXF Svp2NkX5pSWpChn5xSW2SqkFKTkF5gV6xYm5xaV56Xp5qSVWhgYGRqZAhQnZGa/frGIsOCZS se35T5YGxq0CXYycHBICJhJn+maydDFycQgJ7GCUOLv2CxOE84lR4vXt91DON0aJ2efvM8G0 LN+wnRUisZdR4vmKDijnB6PEnf6v7F2MHBxsAloS3xcygsRFBKYzS5xc08sG4jALnGSWuLxn ETvIKGEBM4kZiw4ygtgsAqoSUzY3s4DYvAKuEhd+zGGHW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EgInE8g3bWUFsIYHdjBKd+2wg4pISS+feYIew hSXutxyBqvnGKPFlRmwXIwcHm4CWxPeFjCBhEYG5zBJbtxZ1MXJxMAucZZb483Q1G0hCWMBM Ysaig2BFLAKqElM2N7OA2LwCrhIXfsyBmi8ncfNcJ/MERp4FjAyrGCVTC4pz03OLDQsM81LL 9YoTc4tL89L1kvNzNzGCw15Lcwfj9lUf9A4xMnEwHmKU4GBWEuEVnlWSJMSbklhZlVqUH19U mpNafIhRmoNFSZz3QtfJeCGB9MSS1OzU1ILUIpgsEwenVAPTYUuu5P7aeLM1K9UZqo/rWqbd M5Ld3e3+8hWD9PrDX0QmBa996JEoE50y2UBm5sGp8a9WBQZsLl73a9GBruzIrhTW5UKt5TLF Wj8DBI5bqKov+p6X+E/N6AbfbyOfzi3/+tff9PbWf6O024np8+/4WvHlEy7t/dusHjXDnfvx cWNxrri2NQ3v7UIDnn8oPRRg2HxUkmH5Dc6LNn7qy7blb9n7cv6nm7nn9vVExDvubXt5TjPm g969cy92PfXj8FzTNEH4MPMPtmvfOa/uXbJn6/SnU2U+Rll6cs8W0tnCybck5ny14aO+ipka 3ZYC4Y+3b7Rezta2dtPc6x9X1mXN6VXZOn2rTcbqpd+WPjt+VImlOCPRUIu5qDgRACOopwjq AgAA X-CMS-MailID: 20220506063316epcas2p197ed75070ed4f4ba29439f5c0def90b4 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220506063316epcas2p197ed75070ed4f4ba29439f5c0def90b4 References: Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org This patchset is for Samsung Exynos xHCI host conroller. It uses xhci platform driver and extends some functions by xhci hooks and overrides. This driver supports USB offload which makes Co-processor to use some memories of xhci. Especially it's useful for USB Audio scenario. Audio stream would get shortcut because Co-processor directly write/read data in xhci memories. It could get speed-up using faster memory like SRAM. That's why this gives vendors flexibilty of memory management. This feature is done with xhci hooks and overrides. It supports USB offload only for first connected device. It follows normal sequence from 2nd device. Changes in v2 : - Fix commit message by adding Signed-off-by in each patch. - Fix conflict on latest. Changes in v3 : - Remove export symbols and xhci hooks which xhci-exynos don't need. - Modify commit message to clarify why it needs to export symbols. - Check compiling of xhci-exynos. Changes in v4 : - Modify commit message to clarify why it needs to export symbols. - Add a function for override of hc driver in xhci-plat. - Make xhci-exynos extending xhci-plat by xhci hooks and overrides. (vendor_init / vendor_cleanup hooks are useful from here v4) - Change the term (USB offload -> xhci-exynos) on subject of patches. Changes in v5 : - Rename subject of cover-letter. - Add code in xhci_alloc_segments_for_uram. - Add code for supporting several devices. - Move adding xhci_address_device to other commit. (usb: host: add some to xhci overrides for xhci-exynos -> usb: host: export symbols for xhci-exynos to use xhci hooks) - Add new commit (usb: dwc3: dwc3-exynos: add host init) Daehwan Jung (6): usb: host: export symbols for xhci-exynos to use xhci hooks usb: host: add xhci hooks for xhci-exynos usb: host: xhci-plat: support override of hc driver usb: host: add some to xhci overrides for xhci-exynos usb: host: add xhci-exynos driver usb: dwc3: dwc3-exynos: add host init drivers/usb/dwc3/dwc3-exynos.c | 100 ++++- drivers/usb/host/Kconfig | 8 + drivers/usb/host/Makefile | 1 + drivers/usb/host/xhci-exynos.c | 775 +++++++++++++++++++++++++++++++++ drivers/usb/host/xhci-hub.c | 7 + drivers/usb/host/xhci-mem.c | 150 ++++++- drivers/usb/host/xhci-plat.c | 50 ++- drivers/usb/host/xhci-plat.h | 9 + drivers/usb/host/xhci-ring.c | 1 + drivers/usb/host/xhci.c | 90 +++- drivers/usb/host/xhci.h | 57 +++ 11 files changed, 1222 insertions(+), 26 deletions(-) create mode 100644 drivers/usb/host/xhci-exynos.c