From patchwork Thu Dec 1 02:13:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jung Daehwan X-Patchwork-Id: 13060912 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 62D9EC47089 for ; Thu, 1 Dec 2022 02:20:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230024AbiLACUL (ORCPT ); Wed, 30 Nov 2022 21:20:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229959AbiLACUA (ORCPT ); Wed, 30 Nov 2022 21:20:00 -0500 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 044319FAA1 for ; Wed, 30 Nov 2022 18:19:46 -0800 (PST) Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20221201021943epoutp02d91cada58cba25e6a1e4eecde8dfccbe~sieYlVp4o2719027190epoutp023 for ; Thu, 1 Dec 2022 02:19:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20221201021943epoutp02d91cada58cba25e6a1e4eecde8dfccbe~sieYlVp4o2719027190epoutp023 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1669861183; bh=l1If9qevrdgPMTnDZvKYFeo3U9Zroo6SmdbsNrjgols=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sPKMhG9DeNXMx5JigZvNGgY0UOMzAHvuUxvPvEjFJiMw6k/Ubv8V5uiBFThLNmLJ6 VBmBgxQf/oXlFFQHANncgfHPN+49J+njHwBrUg28Rdh1eZ6N2cpszE0HR1KgyRnJj+ IjZlDUOPGzTtzJ7MVtR9Nk30XTpoiEN1SflFkIZo= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20221201021942epcas2p1e1acaf3c4e6d875572e0cf2e21032495~sieX6t7eC0927609276epcas2p1i; Thu, 1 Dec 2022 02:19:42 +0000 (GMT) Received: from epsmges2p4.samsung.com (unknown [182.195.36.98]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4NN0C22k8jz4x9Q3; Thu, 1 Dec 2022 02:19:42 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id 76.CC.18762.E3F08836; Thu, 1 Dec 2022 11:19:42 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p4.samsung.com (KnoxPortal) with ESMTPA id 20221201021941epcas2p4a536a9eb029a990fcb9f27f2b4668d07~sieXLmuXf2464024640epcas2p4l; Thu, 1 Dec 2022 02:19:41 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20221201021941epsmtrp2f5d9a4da7d63fcac65127172340d3019~sieXKkCQy1711217112epsmtrp2J; Thu, 1 Dec 2022 02:19:41 +0000 (GMT) X-AuditID: b6c32a48-64bff7000001494a-07-63880f3ec91e Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 15.D6.14392.D3F08836; Thu, 1 Dec 2022 11:19:41 +0900 (KST) Received: from ubuntu.dsn.sec.samsung.com (unknown [10.229.95.128]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20221201021941epsmtip245fc816685679eede3eff0351f5f8bd5~sieW9QbBW2761727617epsmtip2h; Thu, 1 Dec 2022 02:19:41 +0000 (GMT) From: Daehwan Jung To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Alim Akhtar , Mathias Nyman , Arnd Bergmann , Linus Walleij , Colin Ian King , Daehwan Jung , Artur Bujdoso , Juergen Gross , Tomer Maimon Cc: linux-usb@vger.kernel.org (open list:USB SUBSYSTEM), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), 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), linux-kernel@vger.kernel.org (open list), sc.suh@samsung.com, taehyun.cho@samsung.com, jh0801.jung@samsung.com, eomji.oh@samsung.com Subject: [RFC PATCH v1 1/2] dt-bindings: usb: samsung,exynos-xhci: support Samsung Exynos xHCI Controller Date: Thu, 1 Dec 2022 11:13:30 +0900 Message-Id: <1669860811-171746-2-git-send-email-dh10.jung@samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1669860811-171746-1-git-send-email-dh10.jung@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrOJsWRmVeSWpSXmKPExsWy7bCmqa4df0eyQc9jYYsH87axWfyddIzd 4uaENYwWk9q/sFrMP3KO1eLOgmlMFqeWL2SyaF68ns1izk0ji7sPf7BY9L14yGwx5c9yJotN j6+xWlzeNYfNYsb5fUwWi5a1Mls0b5rCatG69wi7RdfdG0DjDopa/NryitFB1OP3r0mMHjtn 3WX3WLznJZPHplWdbB53ru1h89g/dw27x+Yl9R59W1YxeqzfcpXF4/MmuQCuqGybjNTElNQi hdS85PyUzLx0WyXv4HjneFMzA0NdQ0sLcyWFvMTcVFslF58AXbfMHKAXlRTKEnNKgUIBicXF Svp2NkX5pSWpChn5xSW2SqkFKTkF5gV6xYm5xaV56Xp5qSVWhgYGRqZAhQnZGXf6j7AWtHNW TD3QzNzAeIO9i5GTQ0LARGLP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vxkNliyp/lTBab Hl9jtbi8aw6bxYzz+5gsFi1rZbZo3jSF1aJ17xF2i667N4DGHRS1+LXlFaODqMfvX5MYPXbO usvusXjPSyaPTas62TzuXNvD5rF/7hp2j81L6j36tqxi9Fi/5SqLx+dNcgFcUVw2Kak5mWWp Rfp2CVwZd/qPsBa0c1ZMPdDM3MB4g72LkZNDQsBEonXHK9YuRi4OIYHdjBJNvUvZIBKSEkvn whQJS9xvOQJV9I1RYteFVsYuRg4ONgEtie8LGUHiIgK/mCVe/G5mBnGYBT4wSxzp3MAGUiQs kClx/0EeyCAWAVWJjZteMoGEeQXcJG5+VICYLydx81wnM4jNKeAusXXPBTBbCKikbdsUxgmM fAsYGVYxSqYWFOem5xYbFhjmpZbrFSfmFpfmpesl5+duYgRHi5bmDsbtqz7oHWJk4mA8xCjB wawkwtvxuS1ZiDclsbIqtSg/vqg0J7X4EKM0B4uSOO+FrpPxQgLpiSWp2ampBalFMFkmDk6p BqbQHWd5HS/o33W8/mb1zY7dO7+/dm2Wn7Tx+5Hnug/1vEVXdey3uzn3Xn47V2mCapQyq4xA WEPJfuF1WX+1uDprr8TI3TdLCz/J8Mh9xcODamVtU0V425Xdu2Iy9xW/9OVovbbm/KPyOx+n 6fhIvTV65Rqy2OPkDNOovqcVxbmRqtG1O3dbet/yUZlrd6mKt/iGQKl10a7Ak+FPl9ufP8bw 1ELQn/sHV+oHxy9m9z7PuP3C6E/8+v3r3M7m32rZ+1fW+pXzpnt1Bz3XFN9kOVQZPKGtNbFq fomb5eEf/lKn/x2WnJDGujuOycOtZ8p6lvr9860zNGf9aohTW3x1nb/h5rtGmxsEUmc9vRhl EqjEUpyRaKjFXFScCADLkdGZBQMAAA== X-CMS-MailID: 20221201021941epcas2p4a536a9eb029a990fcb9f27f2b4668d07 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20221201021941epcas2p4a536a9eb029a990fcb9f27f2b4668d07 References: <1669860811-171746-1-git-send-email-dh10.jung@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Add the Samsung Exynos xHCI Controller bindings with DT schema format. Signed-off-by: Daehwan Jung --- .../bindings/usb/samsung,exynos-xhci.yaml | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/samsung,exynos-xhci.yaml diff --git a/Documentation/devicetree/bindings/usb/samsung,exynos-xhci.yaml b/Documentation/devicetree/bindings/usb/samsung,exynos-xhci.yaml new file mode 100644 index 000000000000..c5dde53b6491 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/samsung,exynos-xhci.yaml @@ -0,0 +1,25 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/samsung,exynos-xhci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Samsung Exynos xHCI + +maintainers: + - Daehwan Jung + +properties: + compatible: + const: samsung,exynos-xhci + +required: + - compatible + +additionalProperties: false + +examples: + - | + xhci { + compatible = "samsung,exynos-xhci"; + }; From patchwork Thu Dec 1 02:13:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jung Daehwan X-Patchwork-Id: 13060913 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 944F9C352A1 for ; Thu, 1 Dec 2022 02:20:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229924AbiLACUO (ORCPT ); Wed, 30 Nov 2022 21:20:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229958AbiLACUA (ORCPT ); Wed, 30 Nov 2022 21:20:00 -0500 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06C699FEEB for ; Wed, 30 Nov 2022 18:19:46 -0800 (PST) Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20221201021944epoutp04f4f1a8104bbb922735b034dd46095549~sieZszgTR0829508295epoutp04J for ; Thu, 1 Dec 2022 02:19:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20221201021944epoutp04f4f1a8104bbb922735b034dd46095549~sieZszgTR0829508295epoutp04J DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1669861184; bh=iEjC8lqfpO01Q1ZmjgLYl5Rtgr4U6xZPWxnHQDK8+h4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HHK0iJPjeJ3k93pY4FZN3zSISOzH7/bdPNoHeE02KnFsO0V8+9p3NBgrRnd677lbG gaZc8xzrF2/kbyS90fWWneEnf3A7QGxVY6YcuzrkDnW0wTZUfrWlHPBDbfsYLJNVCo R16BJivK7rE6TyhEU/oXTg5mEG2XTFTxs2FFnh78= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20221201021943epcas2p1f666f32e944c382c8e0acf87d84c1b48~sieZDt8-P0927609276epcas2p1o; Thu, 1 Dec 2022 02:19:43 +0000 (GMT) Received: from epsmges2p4.samsung.com (unknown [182.195.36.88]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4NN0C32fzDz4x9Q9; Thu, 1 Dec 2022 02:19:43 +0000 (GMT) Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id D8.CC.18762.F3F08836; Thu, 1 Dec 2022 11:19:43 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p2.samsung.com (KnoxPortal) with ESMTPA id 20221201021942epcas2p2429ed37e1f6146b6e1a5bef23141b3f7~sieX-mfgg1899818998epcas2p25; Thu, 1 Dec 2022 02:19:42 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20221201021942epsmtrp2b45672dc9682ee05553ff112c19919ed~sieX_M6uV1711217112epsmtrp2L; Thu, 1 Dec 2022 02:19:42 +0000 (GMT) X-AuditID: b6c32a48-64bff7000001494a-0d-63880f3f144c Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id E6.D6.14392.E3F08836; Thu, 1 Dec 2022 11:19:42 +0900 (KST) Received: from ubuntu.dsn.sec.samsung.com (unknown [10.229.95.128]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20221201021942epsmtip231d6b221d1988c3dbfa9a501f7dda92f~sieXwKZz-2761727617epsmtip2i; Thu, 1 Dec 2022 02:19:42 +0000 (GMT) From: Daehwan Jung To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Alim Akhtar , Mathias Nyman , Arnd Bergmann , Linus Walleij , Colin Ian King , Daehwan Jung , Artur Bujdoso , Juergen Gross , Tomer Maimon Cc: linux-usb@vger.kernel.org (open list:USB SUBSYSTEM), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), 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), linux-kernel@vger.kernel.org (open list), sc.suh@samsung.com, taehyun.cho@samsung.com, jh0801.jung@samsung.com, eomji.oh@samsung.com Subject: [RFC PATCH v1 2/2] usb: host: add xhci-exynos to support Exynos SOCs Date: Thu, 1 Dec 2022 11:13:31 +0900 Message-Id: <1669860811-171746-3-git-send-email-dh10.jung@samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1669860811-171746-1-git-send-email-dh10.jung@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrOJsWRmVeSWpSXmKPExsWy7bCmua49f0eyQfcRQYsH87axWfyddIzd 4uaENYwWk9q/sFrMP3KO1eLOgmlMFqeWL2SyaF68ns1izk0ji7sPf7BY9L14yGwx5c9yJotN j6+xWlzeNYfNYsb5fUwWi5a1Mls0b5rCatG69wi7RdfdG0DjDopa/NryitFB1OP3r0mMHjtn 3WX3WLznJZPHplWdbB53ru1h89g/dw27x+Yl9R59W1YxeqzfcpXF4/MmuQCuqGybjNTElNQi hdS85PyUzLx0WyXv4HjneFMzA0NdQ0sLcyWFvMTcVFslF58AXbfMHKAXlRTKEnNKgUIBicXF Svp2NkX5pSWpChn5xSW2SqkFKTkF5gV6xYm5xaV56Xp5qSVWhgYGRqZAhQnZGX9nPmcqWOVa 0XViEWMD43OrLkYODgkBE4lPX9O6GLk4hAR2MErs7l3CCuF8YpTYuHMWC4TzjVFiyoNLzF2M nGAdV9a+YINI7GWUuDx5OlTVD0aJC1/3MYPMZRPQkvi+kBEkLiLwiVniXuc9RpBuZoF3zBL9 W6JBbGEBf4lJb76xgNgsAqoSXy4/BNvAK+AmsXj9f3aIbXISN891gsU5Bdwltu65wAwyVELg AofE+S3rWCCKXCRWvWuFahCWeHV8C5QtJfH53V42CDtb4vq3bqj6CokVe2FsY4lZz9oZQY5m FtCUWL9LHxIuyhJHbrFAnMwn0XH4LztEmFeio00IolFZYvrlCawQtqTEwdfnoOHjIXFr8Wx2 SJDMYpS4eWo20wRGuVkICxYwMq5iFEstKM5NTy02KjCBR1hyfu4mRnAK1vLYwTj77Qe9Q4xM HIyHGCU4mJVEeDs+tyUL8aYkVlalFuXHF5XmpBYfYjQFht1EZinR5HxgF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jBcSSE8sSc1OTS1ILYLJMnFw SjUwLYnkLVg6TbFwnqvLfr23p5OO/+2M1N7m67/qoNlxn8vVxWzOzJN7+gULTRKvzNw91fvH 5FOBjwzK7n7Z9e5jS9nn0BJPdSE5i+NMUlfbvuR8ijtd2/0r89gW3fn/Gd45XvSZ3n1kItOD HWtvu5XXMv7696w2oG8do58886XzF5wLXPf/CGDykLrlZrNS8OjZKVkOL1LqQ79Gr8kMOjvd 1NfoOsu9TdO+ey46/YmZ52TEqgf8k5zSrcN3TvNg/LQwpeD+yW3ZMck/mE8dubjTdL+7Rp+E wfr8XWa31i1me7SH9bxryZewozNCX4Vcdnozrc5B5o/xvArHLZYCNruVCsVX14lxZrQzbZB7 vPtFjRJLcUaioRZzUXEiABmDt+UGAwAA X-CMS-MailID: 20221201021942epcas2p2429ed37e1f6146b6e1a5bef23141b3f7 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20221201021942epcas2p2429ed37e1f6146b6e1a5bef23141b3f7 References: <1669860811-171746-1-git-send-email-dh10.jung@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org This driver works with xhci platform driver. It needs to override functions of xhci_plat_hc_driver. Wakelocks are used for sleep/wakeup scenario of system. Signed-off-by: Daehwan Jung --- drivers/usb/host/Kconfig | 8 ++ drivers/usb/host/Makefile | 1 + drivers/usb/host/xhci-exynos.c | 154 +++++++++++++++++++++++++++++++++ drivers/usb/host/xhci-hub.c | 2 + drivers/usb/host/xhci-plat.c | 6 ++ drivers/usb/host/xhci-plat.h | 2 + drivers/usb/host/xhci.c | 4 + drivers/usb/host/xhci.h | 2 + 8 files changed, 179 insertions(+) create mode 100644 drivers/usb/host/xhci-exynos.c diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 8d799d23c476..007c7706ddeb 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -104,6 +104,14 @@ config USB_XHCI_TEGRA Say 'Y' to enable the support for the xHCI host controller found in NVIDIA Tegra124 and later SoCs. +config USB_XHCI_EXYNOS + tristate "xHCI support for Samsung Exynos SoC Series" + depends on USB_XHCI_PLATFORM + depends on ARCH_EXYNOS || COMPILE_TEST + help + Say 'Y' to enable the support for the xHCI host controller + found in Samsung Exynos SoCs. + endif # USB_XHCI_HCD config USB_EHCI_BRCMSTB diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile index 6d8ee264c9b2..c682834f4260 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile @@ -86,3 +86,4 @@ obj-$(CONFIG_USB_HCD_BCMA) += bcma-hcd.o obj-$(CONFIG_USB_HCD_SSB) += ssb-hcd.o obj-$(CONFIG_USB_MAX3421_HCD) += max3421-hcd.o obj-$(CONFIG_USB_XEN_HCD) += xen-hcd.o +obj-$(CONFIG_USB_XHCI_EXYNOS) += xhci-exynos.o diff --git a/drivers/usb/host/xhci-exynos.c b/drivers/usb/host/xhci-exynos.c new file mode 100644 index 000000000000..5e2323aee996 --- /dev/null +++ b/drivers/usb/host/xhci-exynos.c @@ -0,0 +1,154 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * xhci-exynos.c - xHCI host controller driver platform Bus Glue for Exynos. + * + * Copyright (C) 2022 Samsung Electronics Incorporated - http://www.samsung.com + * Author: Daehwan Jung + * + */ +#include + +#include "xhci.h" +#include "xhci-plat.h" + +struct xhci_hcd_exynos { + struct wakeup_source *main_wakelock; /* Wakelock for HS HCD */ + struct wakeup_source *shared_wakelock; /* Wakelock for SS HCD */ +}; + +static struct xhci_hcd_exynos xhci_exynos_data; + +static int xhci_exynos_start(struct usb_hcd *hcd); +static int xhci_exynos_setup(struct usb_hcd *hcd); +static int xhci_exynos_bus_suspend(struct usb_hcd *hcd); +static int xhci_exynos_bus_resume(struct usb_hcd *hcd); + +static const struct xhci_driver_overrides xhci_exynos_overrides = { + .extra_priv_size = sizeof(struct xhci_plat_priv), + .reset = xhci_exynos_setup, + .start = xhci_exynos_start, + .bus_suspend = xhci_exynos_bus_suspend, + .bus_resume = xhci_exynos_bus_resume, +}; + +static void xhci_exynos_quirks(struct device *dev, struct xhci_hcd *xhci) +{ + xhci->quirks |= XHCI_PLAT; +} + +static int xhci_exynos_setup(struct usb_hcd *hcd) +{ + return xhci_gen_setup(hcd, xhci_exynos_quirks); +} + +static int xhci_exynos_start(struct usb_hcd *hcd) +{ + __pm_stay_awake(xhci_exynos_data.main_wakelock); + __pm_stay_awake(xhci_exynos_data.shared_wakelock); + + return xhci_run(hcd); +} + +static void xhci_exynos_wake_lock(struct xhci_hcd *xhci, int is_main_hcd, int is_lock) +{ + struct wakeup_source *main_wakelock, *shared_wakelock; + + main_wakelock = xhci_exynos_data.main_wakelock; + shared_wakelock = xhci_exynos_data.shared_wakelock; + + if (xhci->xhc_state & XHCI_STATE_REMOVING) + return; + + if (is_lock) { + if (is_main_hcd) + __pm_stay_awake(main_wakelock); + else + __pm_stay_awake(shared_wakelock); + } else { + if (is_main_hcd) + __pm_relax(main_wakelock); + else + __pm_relax(shared_wakelock); + } +} + +static int xhci_exynos_bus_suspend(struct usb_hcd *hcd) +{ + struct xhci_hcd *xhci = hcd_to_xhci(hcd); + int ret, main_hcd; + + ret = xhci_bus_suspend(hcd); + + if (!ret) { + main_hcd = (hcd == xhci->main_hcd) ? 1 : 0; + xhci_exynos_wake_lock(xhci, main_hcd, 0); + } + + return ret; +} + +static int xhci_exynos_bus_resume(struct usb_hcd *hcd) +{ + struct xhci_hcd *xhci = hcd_to_xhci(hcd); + int ret, main_hcd; + + ret = xhci_bus_resume(hcd); + + if (!ret) { + main_hcd = (hcd == xhci->main_hcd) ? 1 : 0; + xhci_exynos_wake_lock(xhci, main_hcd, 1); + } + + return ret; +} + +static int xhci_exynos_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + + xhci_exynos_data.main_wakelock = wakeup_source_register(dev, dev_name(dev)); + xhci_exynos_data.shared_wakelock = wakeup_source_register(dev, dev_name(dev)); + + xhci_plat_override_driver(&xhci_exynos_overrides); + + return 0; +} + +static int xhci_exynos_remove(struct platform_device *dev) +{ + wakeup_source_unregister(xhci_exynos_data.main_wakelock); + wakeup_source_unregister(xhci_exynos_data.shared_wakelock); + + return 0; +} + +static const struct of_device_id exynos_xhci_of_match[] = { + { .compatible = "samsung,exynos-xhci"}, + { }, +}; +MODULE_DEVICE_TABLE(of, exynos_xhci_of_match); + +static struct platform_driver exynos_xhci_driver = { + .probe = xhci_exynos_probe, + .remove = xhci_exynos_remove, + .driver = { + .name = "xhci-exynos", + .of_match_table = exynos_xhci_of_match, + }, +}; + +static int __init xhci_exynos_init(void) +{ + return platform_driver_register(&exynos_xhci_driver); +} +module_init(xhci_exynos_init); + +static void __exit xhci_exynos_exit(void) +{ + platform_driver_unregister(&exynos_xhci_driver); +} +module_exit(xhci_exynos_exit); + +MODULE_AUTHOR("Daehwan Jung "); +MODULE_DESCRIPTION("xHCI Exynos Host Controller Driver"); +MODULE_LICENSE("GPL"); diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 4619d5e89d5b..878c2c05055a 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c @@ -1824,6 +1824,7 @@ int xhci_bus_suspend(struct usb_hcd *hcd) return 0; } +EXPORT_SYMBOL_GPL(xhci_bus_suspend); /* * Workaround for missing Cold Attach Status (CAS) if device re-plugged in S3. @@ -1968,6 +1969,7 @@ int xhci_bus_resume(struct usb_hcd *hcd) spin_unlock_irqrestore(&xhci->lock, flags); return 0; } +EXPORT_SYMBOL_GPL(xhci_bus_resume); unsigned long xhci_get_resuming_ports(struct usb_hcd *hcd) { diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index 5fb55bf19493..1cb24f8e0153 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -173,6 +173,12 @@ static const struct of_device_id usb_xhci_of_match[] = { MODULE_DEVICE_TABLE(of, usb_xhci_of_match); #endif +void xhci_plat_override_driver(const struct xhci_driver_overrides *xhci_hc_driver_overrides) +{ + xhci_init_driver(&xhci_plat_hc_driver, xhci_hc_driver_overrides); +} +EXPORT_SYMBOL_GPL(xhci_plat_override_driver); + static int xhci_plat_probe(struct platform_device *pdev) { const struct xhci_plat_priv *priv_match; diff --git a/drivers/usb/host/xhci-plat.h b/drivers/usb/host/xhci-plat.h index 1fb149d1fbce..16436f72c5c4 100644 --- a/drivers/usb/host/xhci-plat.h +++ b/drivers/usb/host/xhci-plat.h @@ -21,4 +21,6 @@ struct xhci_plat_priv { #define hcd_to_xhci_priv(h) ((struct xhci_plat_priv *)hcd_to_xhci(h)->priv) #define xhci_to_priv(x) ((struct xhci_plat_priv *)(x)->priv) + +void xhci_plat_override_driver(const struct xhci_driver_overrides *xhci_hc_driver_overrides); #endif /* _XHCI_PLAT_H */ diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 79d7931c048a..693495054001 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -5502,6 +5502,10 @@ void xhci_init_driver(struct hc_driver *drv, drv->check_bandwidth = over->check_bandwidth; if (over->reset_bandwidth) drv->reset_bandwidth = over->reset_bandwidth; + if (over->bus_suspend) + drv->bus_suspend = over->bus_suspend; + if (over->bus_resume) + drv->bus_resume = over->bus_resume; } } EXPORT_SYMBOL_GPL(xhci_init_driver); diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index cc084d9505cd..30e60c752c28 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -1943,6 +1943,8 @@ struct xhci_driver_overrides { struct usb_host_endpoint *ep); int (*check_bandwidth)(struct usb_hcd *, struct usb_device *); void (*reset_bandwidth)(struct usb_hcd *, struct usb_device *); + int (*bus_suspend)(struct usb_hcd *hcd); + int (*bus_resume)(struct usb_hcd *hcd); }; #define XHCI_CFC_DELAY 10