From patchwork Fri Sep 17 06:54:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 12501279 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=-19.1 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, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 B1893C433F5 for ; Fri, 17 Sep 2021 06:55:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 97D446112E for ; Fri, 17 Sep 2021 06:55:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237633AbhIQG5I (ORCPT ); Fri, 17 Sep 2021 02:57:08 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:29074 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238174AbhIQG4x (ORCPT ); Fri, 17 Sep 2021 02:56:53 -0400 Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20210917065527epoutp04b7c977b36f2d6f3742963c3df65f7554~liZhXuZOX2950429504epoutp04M for ; Fri, 17 Sep 2021 06:55:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20210917065527epoutp04b7c977b36f2d6f3742963c3df65f7554~liZhXuZOX2950429504epoutp04M DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1631861727; bh=IXVj5Waay/hQadpvtal/iLGeiq/eGtXYjqtoTXuAkXs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WiNTgJwu4Qb8QnQaoT9lRQR22tGNugq0GNwupwgnqlIDY99OLRIchNsgMAM6qffz4 jHVDomedWcNx2u77BVyUueumIYyyT1/pvmQjDWYHttfTsIH3gAj4eG92cF0RjmhT6W 656XkecRi4uCQMqSUT7SkANPUjIkuffa3Y9X9/xw= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20210917065526epcas2p44e088ca420ba44f934abc5c413d0e909~liZgZ6rbM0164301643epcas2p4a; Fri, 17 Sep 2021 06:55:26 +0000 (GMT) Received: from epsmges2p4.samsung.com (unknown [182.195.40.189]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4H9l8C3sHnz4x9QJ; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id 32.DF.09472.BDB34416; Fri, 17 Sep 2021 15:55:23 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p4.samsung.com (KnoxPortal) with ESMTPA id 20210917065522epcas2p49ce06e9686c9b6f5cb1dd16ca9d82052~liZdBULDl1208812088epcas2p4d; Fri, 17 Sep 2021 06:55:22 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20210917065522epsmtrp2e333dddf0c5240ec1c4a6559823b89cb~liZc-8Cmw1373513735epsmtrp2A; Fri, 17 Sep 2021 06:55:22 +0000 (GMT) X-AuditID: b6c32a48-d5fff70000002500-43-61443bdbc118 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id EB.10.09091.ADB34416; Fri, 17 Sep 2021 15:55:22 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.51]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210917065522epsmtip239db9bfc3eaa35eb0e6ff15762bffe4a~liZcx0Jwr2199021990epsmtip2r; Fri, 17 Sep 2021 06:55:22 +0000 (GMT) From: Chanho Park To: Alim Akhtar , Avri Altman , "James E . J . Bottomley" , "Martin K . Petersen" , Krzysztof Kozlowski Cc: Bean Huo , Bart Van Assche , Adrian Hunter , Christoph Hellwig , Can Guo , Jaegeuk Kim , Gyunghoon Kwon , linux-samsung-soc@vger.kernel.org, linux-scsi@vger.kernel.org, jongmin jeong , Chanho Park Subject: [PATCH v3 01/17] scsi: ufs: add quirk to handle broken UIC command Date: Fri, 17 Sep 2021 15:54:20 +0900 Message-Id: <20210917065436.145629-2-chanho61.park@samsung.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210917065436.145629-1-chanho61.park@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA01Tf0xTVxTefa99FKTsUQTvSJzdc26jjB+tll02CjIIvghmJMsy45bgG7xQ ttI2fe2izmSA2/hRIRAcaBlOMRuKLh0MamUWGNQh0QgZjHU1IAIOZJGBoBNEXMurGf9955zv u985594rwiUuIlyUpzWyBi2joYgAga0nIi7q5lupTOxisQT1TV4g0NhJG4HuLv1OoF9ulwpQ zdwSju5bvxeiwc5IdPRSCrpW2YChSasFRw0uG4bODSPUfO8Rho73d2DI/IedQI29q9hOkh4c SqctBeUEPVhRjtE/nZXRZy7fxeiWplKCrmzoAvS/1hKCnr/jFtAVrU2AXmh5kS7uMmOZgfs0 CWqWyWENUlabrcvJ0+aqqPR3s1KylHGx8ih5PHqDkmqZfFZFpWZkRqXlaTwTUdJPGY3Jk8pk OI6KSUww6ExGVqrWcUYVxepzNHq5XB/NMfmcSZsbna3Lf1MeG6tQepj7NeozZpn+SdCBvvFO UADaA8uAvwiSO+B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ZPLYtKqTzWPCogOM Ht/Xd7B5fHx6i8Wjb8sqRo/Pm+Q82g90MwXwRHHZpKTmZJalFunbJXBlLO7WKvjLV3Hy0X7G BsZdPF2MnBwSAiYSx9fvYO1i5OIQEtjNKLF+00cWiISsxLN3O9ghbGGJ+y1HoIreM0psONfA BJJgE9CV2PL8FSOILSLwkVFizjctkCJmgRXMEksvbQeaxMEhLOAtcemID0gNi4CqxL2JJ5lB bF4Be4nLy79ALZOXOPKrEyzOKeAgcWvXf7CZQkA1EycvYoSoF5Q4OfMJWD0zUH3z1tnMExgF ZiFJzUKSWsDItIpRMrWgODc9t9iwwDAvtVyvODG3uDQvXS85P3cTIzjWtDR3MG5f9UHvECMT B+MhRgkOZiUR3gs1jolCvCmJlVWpRfnxRaU5qcWHGKU5WJTEeS90nYwXEkhPLEnNTk0tSC2C yTJxcEo1MHm+2ir/P5tdQVxn6+mw9GP8vgIrlxo93F1+MuBW5NPH72ZctQxRcy88u/ehZoZc sun7yWd/HZ+iedhVVnhaR5r1pns26ptvnBda+iHmsUOR7LuE2Bu5O0x7f01wW6i0LtXoQ0TR VeWHDu4/Ll8wk70o/n6Vc49QwSoOj+27+tl8P8U1Xa2Kiv4iEaZqGPWgTf6/sc33kkaFPhnt wKdfmp1kf5yVMPttaG2bPrOffwL3/7Lp0mtnztyYe1ecI/X9i6k1wu9fHejdtM7g0C1PyfMz PuXdm/UjetbeM4evJtZt+2jne/XT5RdpbyeeDmOpEa2rXvt1rnNDrIf3uqsTrijsbNl0z0om oZlf03ayl50SS3FGoqEWc1FxIgD0mycMJAMAAA== X-CMS-MailID: 20210917065522epcas2p49ce06e9686c9b6f5cb1dd16ca9d82052 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210917065522epcas2p49ce06e9686c9b6f5cb1dd16ca9d82052 References: <20210917065436.145629-1-chanho61.park@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: jongmin jeong samsung ExynosAuto9 SoC has two types of host controller interface to support the virtualization of UFS Device. One is the physical host(PH) that the same as conventaional UFSHCI, and the other is the virtual host(VH) that support data transfer function only. In this structure, the virtual host does not support UIC command. To support this, we add the quirk and return 0 when the UIC command send function is called. Cc: Alim Akhtar Cc: James E.J. Bottomley Cc: Martin K. Petersen Cc: Bart Van Assche Signed-off-by: jongmin jeong Signed-off-by: Chanho Park Reviewed-by: Alim Akhtar --- drivers/scsi/ufs/ufshcd.c | 3 +++ drivers/scsi/ufs/ufshcd.h | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 3841ab49f556..8a45e8c05965 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -2324,6 +2324,9 @@ int ufshcd_send_uic_cmd(struct ufs_hba *hba, struct uic_command *uic_cmd) int ret; unsigned long flags; + if (hba->quirks & UFSHCD_QUIRK_BROKEN_UIC_CMD) + return 0; + ufshcd_hold(hba, false); mutex_lock(&hba->uic_cmd_mutex); ufshcd_add_delay_before_dme_cmd(hba); diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h index 52ea6f350b18..e1d8fd432614 100644 --- a/drivers/scsi/ufs/ufshcd.h +++ b/drivers/scsi/ufs/ufshcd.h @@ -588,6 +588,12 @@ enum ufshcd_quirks { * This quirk allows only sg entries aligned with page size. */ UFSHCD_QUIRK_ALIGN_SG_WITH_PAGE_SIZE = 1 << 14, + + /* + * This quirk needs to be enabled if the host controller does not + * support UIC command + */ + UFSHCD_QUIRK_BROKEN_UIC_CMD = 1 << 15, }; enum ufshcd_caps { From patchwork Fri Sep 17 06:54:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 12501281 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=-19.1 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, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 5946DC433EF for ; Fri, 17 Sep 2021 06:55:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 49C726112E for ; Fri, 17 Sep 2021 06:55:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238441AbhIQG5K (ORCPT ); Fri, 17 Sep 2021 02:57:10 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:29088 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238177AbhIQG4w (ORCPT ); Fri, 17 Sep 2021 02:56:52 -0400 Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20210917065527epoutp0413c2337dfad04ddeba72a5b62497cac0~liZhiFc_82962429624epoutp04U for ; Fri, 17 Sep 2021 06:55:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20210917065527epoutp0413c2337dfad04ddeba72a5b62497cac0~liZhiFc_82962429624epoutp04U DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1631861727; bh=rIuVrlrXUj9RtoTnjlPUt8vvubenE93aaUi0KVtqszU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WfIvwRLUlyE/Uxq5+uYJylD1KvK6coYFfdAh/QJLZUbIEu71k0vU4iFE79Gm8g2Dz ULcTFuHI+9p/W2XwTXnWprgx/RDmlDtZnabvYr7n6iDDfOFHhcYzTWqAKlRPQcAiRd ett/Acg7MqlO8q72s31/zbR2TOCMj01V148NmEJA= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20210917065526epcas2p3d53320ff077a2978a38d7b1709463d00~liZgz6iRo0100601006epcas2p30; Fri, 17 Sep 2021 06:55:26 +0000 (GMT) Received: from epsmges2p3.samsung.com (unknown [182.195.40.189]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4H9l8C40s1z4x9QG; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id 46.ED.09749.BDB34416; Fri, 17 Sep 2021 15:55:23 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p4.samsung.com (KnoxPortal) with ESMTPA id 20210917065522epcas2p4ed13768faa6aa6d33116606e2601321e~liZdGtatW1927619276epcas2p44; Fri, 17 Sep 2021 06:55:22 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20210917065522epsmtrp1616a98d9d65e6f684a126c4d1eaff3b0~liZdFoNmj1045910459epsmtrp1A; Fri, 17 Sep 2021 06:55:22 +0000 (GMT) X-AuditID: b6c32a47-d29ff70000002615-ab-61443bdb1441 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id FB.10.09091.ADB34416; Fri, 17 Sep 2021 15:55:22 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.51]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210917065522epsmtip2de2aaebe6b4765056a69036c42d071da~liZc3AhfC2196221962epsmtip2b; Fri, 17 Sep 2021 06:55:22 +0000 (GMT) From: Chanho Park To: Alim Akhtar , Avri Altman , "James E . J . Bottomley" , "Martin K . Petersen" , Krzysztof Kozlowski Cc: Bean Huo , Bart Van Assche , Adrian Hunter , Christoph Hellwig , Can Guo , Jaegeuk Kim , Gyunghoon Kwon , linux-samsung-soc@vger.kernel.org, linux-scsi@vger.kernel.org, jongmin jeong , Chanho Park Subject: [PATCH v3 02/17] scsi: ufs: add quirk to enable host controller without ph configuration Date: Fri, 17 Sep 2021 15:54:21 +0900 Message-Id: <20210917065436.145629-3-chanho61.park@samsung.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210917065436.145629-1-chanho61.park@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrJJsWRmVeSWpSXmKPExsWy7bCmqe5ta5dEg2fdchYnn6xhs3gwbxub xcufV9ksDj7sZLGY9uEns8Wn9ctYLS7v17bo2elscXrCIiaLJ+tnMVssurGNyWLlNQuLjW9/ MFnMOL+PyaL7+g42i+XH/zE5CHhcvuLtMauhl83jcl8vk8fmFVoei/e8ZPLYtKqTzWPCogOM Ht/Xd7B5fHx6i8Wjb8sqRo/Pm+Q82g90MwXwROXYZKQmpqQWKaTmJeenZOal2yp5B8c7x5ua GRjqGlpamCsp5CXmptoqufgE6Lpl5gB9pKRQlphTChQKSCwuVtK3synKLy1JVcjILy6xVUot SMkpMDQs0CtOzC0uzUvXS87PtTI0MDAyBapMyMlY3/qXseA5X0XP7gtsDYyreLoYOTgkBEwk 3h5h7mLk4hAS2MEosXnxQxYI5xOjROfRz2wQzjdGiXfzdrJ3MXKCdRy/sI8RIrGXUWLDoktQ LR8ZJboeTwKrYhPQldjy/BVYlYjAe0aJJ4+nsIM4zALzmCVePGhhA6kSFkiW2L35AJjNIqAq cfXwWzCbV8Be4vOpxcwQ++QljvzqBLM5BRwkbu36zwhRIyhxcuYTFhCbGaimeet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Swm1Hi89fpLBAJWYln73awQ9jCEvdbjrCC2EIC7xkl zk60ArHZBHQltjx/xQhiiwh8ZJSY800LZBCzwApmiaWXtoMNEhZIlPhy5jYbiM0ioCpx9fBb MJtXwF7i86nFzBAL5CWO/OoEszkFHCRu7frPCLHMXmLi5EWMEPWCEidnPgGbyQxU37x1NvME RoFZSFKzkKQWMDKtYpRMLSjOTc8tNiwwzEst1ytOzC0uzUvXS87P3cQIjjYtzR2M21d90DvE yMTBeIhRgoNZSYT3Qo1johBvSmJlVWpRfnxRaU5q8SFGaQ4WJXHeC10n44UE0hNLUrNTUwtS i2CyTBycUg1Mu/OPRUjylT+ZrG8kxfY6csmy758Ws02YwaelFnqsanaSJPPfOctnudr38B7Y zHdiRp746a+2R/z19RW2ecvE7lV5ccAriMs8XfYQz9LZn3/O+33UukLwmcfno/3On3vMipaw N7DOf3JhmfUW5wuNfyONEvbocFwt0V6wMil97frlfU9b/2q8cWz+tGT9x4yKC0esJhyVtM9w tooIeK0tKxLy+5DMrfYbCh7GN/er6FVN2ar03rL7cRSbk6OqdMDULWoc9Wss1gnPyPRUEJA5 /e/X8dCOtuNy69+uzjovVxy1dPOd75Lckdcjtwjs9PieZdq0pPGRyf8gW0fON9bS/d2v2Nfu EZvUuPC18p6FSizFGYmGWsxFxYkA7bdsaSUDAAA= X-CMS-MailID: 20210917065522epcas2p4ed13768faa6aa6d33116606e2601321e X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210917065522epcas2p4ed13768faa6aa6d33116606e2601321e References: <20210917065436.145629-1-chanho61.park@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: jongmin jeong samsung ExynosAuto SoC has two types of host controller interface to support the virtualization of UFS Device. One is the physical host(PH) that the same as conventaional UFSHCI, and the other is the virtual host(VH) that support data transfer function only. In this structure, the virtual host does not support like device management. This patch skips the physical host interface configuration part that cannot be performed in the virtual host. Suggested-by: Alim Akhtar Cc: James E.J. Bottomley Cc: Martin K. Petersen Cc: Bart Van Assche Signed-off-by: jongmin jeong Signed-off-by: Chanho Park Reviewed-by: Alim Akhtar --- drivers/scsi/ufs/ufshcd.c | 3 +++ drivers/scsi/ufs/ufshcd.h | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 8a45e8c05965..628ef8e17531 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -8066,6 +8066,9 @@ static int ufshcd_probe_hba(struct ufs_hba *hba, bool init_dev_params) if (ret) goto out; + if (hba->quirks & UFSHCD_QUIRK_SKIP_PH_CONFIGURATION) + goto out; + /* Debug counters initialization */ ufshcd_clear_dbg_ufs_stats(hba); diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h index e1d8fd432614..e547fbd19d49 100644 --- a/drivers/scsi/ufs/ufshcd.h +++ b/drivers/scsi/ufs/ufshcd.h @@ -594,6 +594,12 @@ enum ufshcd_quirks { * support UIC command */ UFSHCD_QUIRK_BROKEN_UIC_CMD = 1 << 15, + + /* + * This quirk needs to be enabled if the host controller cannot + * support physical host configuration. + */ + UFSHCD_QUIRK_SKIP_PH_CONFIGURATION = 1 << 16, }; enum ufshcd_caps { From patchwork Fri Sep 17 06:54:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 12501273 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=-19.1 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, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 19190C4332F for ; Fri, 17 Sep 2021 06:55:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 035536112E for ; Fri, 17 Sep 2021 06:55:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238353AbhIQG5D (ORCPT ); Fri, 17 Sep 2021 02:57:03 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:41797 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237251AbhIQG4v (ORCPT ); Fri, 17 Sep 2021 02:56:51 -0400 Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20210917065526epoutp03385f8450da09772329ca04055ac1bb39~liZgIWrfO0358003580epoutp03P for ; Fri, 17 Sep 2021 06:55:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20210917065526epoutp03385f8450da09772329ca04055ac1bb39~liZgIWrfO0358003580epoutp03P DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1631861726; bh=MRrBSUR634b5hu8flt9/LdYTIil76y865hidQqj1g+A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GaX8HUPd6Rik4vJegF/q5YzLvTLLst1MuA0tcsl3vFMeVrMZ2iOal8vRlF0gu988M mn2pJuOhbqhQkj6GNrMT5cDIPkiIOIL+3JL4KRZDIrmN69krlMQ51lLRPldYGE7IRt VgF5BnfSGrnpJ4DDbaFgwkzQp2TQ4oT4LnTxStmE= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20210917065524epcas2p21608d925d55bb057496511bac328072b~liZe_s3Ij3234832348epcas2p21; Fri, 17 Sep 2021 06:55:24 +0000 (GMT) Received: from epsmges2p3.samsung.com (unknown [182.195.40.181]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4H9l8C3KhDz4x9Q7; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id E4.ED.09749.BDB34416; Fri, 17 Sep 2021 15:55:23 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p2.samsung.com (KnoxPortal) with ESMTPA id 20210917065522epcas2p26f56b37c3f7505b9d0e34bc2162fdbbd~liZdM-BaD3235032350epcas2p2r; Fri, 17 Sep 2021 06:55:22 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20210917065522epsmtrp28a91ede70cc2a52323d090439a977e56~liZdMERPU1371513715epsmtrp2P; Fri, 17 Sep 2021 06:55:22 +0000 (GMT) X-AuditID: b6c32a47-d13ff70000002615-a8-61443bdbce47 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 0E.10.09091.ADB34416; Fri, 17 Sep 2021 15:55:22 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.51]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210917065522epsmtip21e25f3f16c26c5ae4f876f3b4e4fe8ac~liZc7v35w2196321963epsmtip2o; Fri, 17 Sep 2021 06:55:22 +0000 (GMT) From: Chanho Park To: Alim Akhtar , Avri Altman , "James E . J . Bottomley" , "Martin K . Petersen" , Krzysztof Kozlowski Cc: Bean Huo , Bart Van Assche , Adrian Hunter , Christoph Hellwig , Can Guo , Jaegeuk Kim , Gyunghoon Kwon , linux-samsung-soc@vger.kernel.org, linux-scsi@vger.kernel.org, Chanho Park Subject: [PATCH v3 03/17] scsi: ufs: ufs-exynos: change pclk available max value Date: Fri, 17 Sep 2021 15:54:22 +0900 Message-Id: <20210917065436.145629-4-chanho61.park@samsung.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210917065436.145629-1-chanho61.park@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrKJsWRmVeSWpSXmKPExsWy7bCmhe5ta5dEgw2d4hYnn6xhs3gwbxub xcufV9ksDj7sZLGY9uEns8Wn9ctYLS7v17bo2elscXrCIiaLJ+tnMVssurGNyWLj2x9MFjPO 72Oy6L6+g81i+fF/TA78HpeveHvMauhl87jc18vksXmFlsfiPS+ZPDat6mTzmLDoAKPH9/Ud bB4fn95i8ejbsorR4/MmOY/2A91MATxROTYZqYkpqUUKqXnJ+SmZeem2St7B8c7xpmYGhrqG lhbmSgp5ibmptkouPgG6bpk5QN8oKZQl5pQChQISi4uV9O1sivJLS1IVMvKLS2yVUgtScgoM DQv0ihNzi0vz0vWS83OtDA0MjEyBKhNyMj7t3s1ecIS1YuGUX6wNjDdYuhg5OSQETCRmf+tm 62Lk4hAS2MEoceFcK5TziVHixP59LBDON0aJS2dnM8K0vHy5nx0isZdR4t3so1BVHxkllt7d zA5SxSagK7Hl+StGkISIwHtGiSePp4C1MAt8ZZLYffA7G0iVsECQxLl9l8BsFgFViR+XlgB1 cHDwCthLbD5WDLFOXuLIr05mEJtTwEHi1q7/YGfwCghKnJz5BOwLZqCa5q2zmUHmSwhc4ZBY u76HBWSOhICLxIcdThBzhCVeHd/CDmFLSXx+t5cNor6bUaL10X+oxGpGic5GHwjbXuLX9C2s IHOYBTQl1u/ShxipLHHkFtRaPomOw3/ZIcK8Eh1tQhCN6hIHtk+Hhq+sRPecz6wQtofEkbXT mSBhNZlRouHTD6YJjAqzkHwzC8k3sxAWL2BkXsUollpQnJueWmxUYIwcxZsYwelby30H44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0vWS83M3MYKjTEtzB+P2VR/0DjEycTAe YpTgYFYS4b1Q45goxJuSWFmVWpQfX1Sak1p8iFGag0VJnPdC18l4IYH0xJLU7NTUgtQimCwT B6dUA1OM2dnPda77Srf8MTr/8+dfXjs528surLobmJTTql+1vLZ/+njpSu5XaWFsNXIhb264 JS16JWSq3S3gw1ypeaTd53G6qeQtJw0rC0e/XWHaaxwn1djumPooYv3LRBnuCq83AS9S3c/x WCx9+in4pt7v39tbnDs3TJnyKkYws+3FXP68P9c3hR4wr9vpsSw29XPV9daPt0KC1R5ovIh8 dHL2XonlWzbPO6lZ1hT9cHHFganf9t7+3HL61O3EA7MzPBYYttRkfVi8m+F/bqmy/4rmM9kv Ikpul0ew7G0sPPkl7tsP5gsPv88TmulZddXcqLH4y8Tbnw98nvr3E//FqSH1Z/TeZWfulFIQ v1W5bt0CJZbijERDLeai4kQATCzopSEDAAA= X-CMS-MailID: 20210917065522epcas2p26f56b37c3f7505b9d0e34bc2162fdbbd X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210917065522epcas2p26f56b37c3f7505b9d0e34bc2162fdbbd References: <20210917065436.145629-1-chanho61.park@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org To support 167MHz PCLK, we need to adjust the maximum value. Reviewed-by: Alim Akhtar Signed-off-by: Chanho Park --- drivers/scsi/ufs/ufs-exynos.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufs-exynos.h b/drivers/scsi/ufs/ufs-exynos.h index dadf4fd10dd8..0a31f77a5f48 100644 --- a/drivers/scsi/ufs/ufs-exynos.h +++ b/drivers/scsi/ufs/ufs-exynos.h @@ -99,7 +99,7 @@ struct exynos_ufs; #define PA_HIBERN8TIME_VAL 0x20 #define PCLK_AVAIL_MIN 70000000 -#define PCLK_AVAIL_MAX 133000000 +#define PCLK_AVAIL_MAX 167000000 struct exynos_ufs_uic_attr { /* TX Attributes */ From patchwork Fri Sep 17 06:54:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 12501269 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=-19.1 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, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 D039DC433FE for ; Fri, 17 Sep 2021 06:55:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BF3DB6112E for ; Fri, 17 Sep 2021 06:55:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237468AbhIQG5A (ORCPT ); Fri, 17 Sep 2021 02:57:00 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:53796 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237253AbhIQG4v (ORCPT ); Fri, 17 Sep 2021 02:56:51 -0400 Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20210917065526epoutp01992b20c60cfd1207915154796ca9b438~liZgSTCK10654606546epoutp01k for ; Fri, 17 Sep 2021 06:55:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20210917065526epoutp01992b20c60cfd1207915154796ca9b438~liZgSTCK10654606546epoutp01k DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1631861726; bh=kDPUu0crvjpJeXBJprcRYTsG7RPKldzeF7DRZzQcczY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k1+O3BtY0ej1urAGLbZHUSZW5CC7lWgyoxyOcN51x5zIN9gvac3MIyJZeqbnyeI0v eEfSvxSwe3LOzWaM3EJ2pgo3gyf+xDCziwY1b5Dko2Eyite+/Ue+QHoOzoGftHRjdk ILAzFFQEBIeZvoZKPjv6O3xfpSPeQ0uiA/xmYuU8= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20210917065524epcas2p1c5c9ddd011b647c801fea4b70b2dd950~liZfJElRW0789407894epcas2p1I; Fri, 17 Sep 2021 06:55:24 +0000 (GMT) Received: from epsmges2p3.samsung.com (unknown [182.195.40.183]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4H9l8C4djvz4x9Q9; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id 69.ED.09749.BDB34416; Fri, 17 Sep 2021 15:55:23 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p2.samsung.com (KnoxPortal) with ESMTPA id 20210917065522epcas2p23066a1bd5e39ac1931d7e38064fe23dd~liZdRbJCQ3234832348epcas2p2y; Fri, 17 Sep 2021 06:55:22 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20210917065522epsmtrp14974d9d3257d9518b8210895f7fab11f~liZdQddmF1077210772epsmtrp1o; Fri, 17 Sep 2021 06:55:22 +0000 (GMT) X-AuditID: b6c32a47-d13ff70000002615-ac-61443bdb4b73 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 85.91.08750.ADB34416; Fri, 17 Sep 2021 15:55:22 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.51]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210917065522epsmtip2955dcd33c243ca12f27a90463dbd3842~liZdCqE5x0630106301epsmtip2j; Fri, 17 Sep 2021 06:55:22 +0000 (GMT) From: Chanho Park To: Alim Akhtar , Avri Altman , "James E . J . Bottomley" , "Martin K . Petersen" , Krzysztof Kozlowski Cc: Bean Huo , Bart Van Assche , Adrian Hunter , Christoph Hellwig , Can Guo , Jaegeuk Kim , Gyunghoon Kwon , linux-samsung-soc@vger.kernel.org, linux-scsi@vger.kernel.org, Chanho Park Subject: [PATCH v3 04/17] scsi: ufs: ufs-exynos: simplify drv_data retrieval Date: Fri, 17 Sep 2021 15:54:23 +0900 Message-Id: <20210917065436.145629-5-chanho61.park@samsung.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210917065436.145629-1-chanho61.park@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOJsWRmVeSWpSXmKPExsWy7bCmue5ta5dEg8OtShYnn6xhs3gwbxub xcufV9ksDj7sZLGY9uEns8Wn9ctYLS7v17bo2elscXrCIiaLJ+tnMVssurGNyWLj2x9MFjPO 72Oy6L6+g81i+fF/TA78HpeveHvMauhl87jc18vksXmFlsfiPS+ZPDat6mTzmLDoAKPH9/Ud bB4fn95i8ejbsorR4/MmOY/2A91MATxROTYZqYkpqUUKqXnJ+SmZeem2St7B8c7xpmYGhrqG lhbmSgp5ibmptkouPgG6bpk5QN8oKZQl5pQChQISi4uV9O1sivJLS1IVMvKLS2yVUgtScgoM DQv0ihNzi0vz0vWS83OtDA0MjEyBKhNyMpZ+3stYcEmwYsG5g0wNjM/4uhg5OSQETCTOHP/P 2MXIxSEksINR4lrfR1YI5xOjxIbOF+wQzmdGiXWHG1hgWiac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fiPS+ZPDat6mTzmLDoAKPH9/Ud bB4fn95i8ejbsorR4/MmOY/2A91MATxRXDYpqTmZZalF+nYJXBlLP+9lLLgkWLHg3EGmBsZn fF2MnBwSAiYSE04+Z+xi5OIQEtjBKHHyzlkmiISsxLN3O9ghbGGJ+y1HWEFsIYH3jBJH+1JA bDYBXYktz18xgtgiAh8ZJeZ80wIZxCzwl0mitXUD2CBhAR+J+WuWMYPYLAKqEr9fPAUbyitg L3Ht5xlGiAXyEkd+dYLVcAo4SNza9Z8RYpm9xMTJixgh6gUlTs58wgJiMwPVN2+dzTyBUWAW ktQsJKkFjEyrGCVTC4pz03OLDQuM8lLL9YoTc4tL89L1kvNzNzGCo0xLawfjnlUf9A4xMnEw HmKU4GBWEuG9UOOYKMSbklhZlVqUH19UmpNafIhRmoNFSZz3QtfJeCGB9MSS1OzU1ILUIpgs EwenVAMTJ9u5Z7KN1xeHqfQGH5NV0fRvO1P23cKne9vH4/mTZyck3Xmg/mjuRuWktYeTrH0a VsZGX8veLL1eX+aPYaaLp31y4kap3qkVNsZyjyuOtXclXFf+8dgieZvycR5mTfYF/PaxpUeN La/Kpv28eXhemZvw8ft5BX3st81WXtpksPCls0DdhGlivXuL06v/cHWrMglf1G//tnnR7adl D3c5tYe9/+7+QuxIRqvMdC39NXvZVi5N6v4jGvPKf21T9Cl5Di1/Pv2zKxOPOelEHdgV/e+p dsGbfintWo4DYudiP9ZMEetcLlItEVgta5bU5ujMcSbiiUzMlRNB1XIyKkez5ZdePCP5/GzJ NeP/P5VYijMSDbWYi4oTAQh+WOAhAwAA X-CMS-MailID: 20210917065522epcas2p23066a1bd5e39ac1931d7e38064fe23dd X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210917065522epcas2p23066a1bd5e39ac1931d7e38064fe23dd References: <20210917065436.145629-1-chanho61.park@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The compatible field of exynos_ufs_drv_data is not necessary because of_device_id already has it. Thus, we don't need it anymore and we can get drv_data by device_get_match_data. Reviewed-by: Alim Akhtar Signed-off-by: Chanho Park --- drivers/scsi/ufs/ufs-exynos.c | 10 +--------- drivers/scsi/ufs/ufs-exynos.h | 3 +-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c index a14dd8ce56d4..8a17ba32a721 100644 --- a/drivers/scsi/ufs/ufs-exynos.c +++ b/drivers/scsi/ufs/ufs-exynos.c @@ -893,17 +893,10 @@ static int exynos_ufs_post_link(struct ufs_hba *hba) static int exynos_ufs_parse_dt(struct device *dev, struct exynos_ufs *ufs) { struct device_node *np = dev->of_node; - struct exynos_ufs_drv_data *drv_data = &exynos_ufs_drvs; struct exynos_ufs_uic_attr *attr; int ret = 0; - while (drv_data->compatible) { - if (of_device_is_compatible(np, drv_data->compatible)) { - ufs->drv_data = drv_data; - break; - } - drv_data++; - } + ufs->drv_data = device_get_match_data(dev); if (ufs->drv_data && ufs->drv_data->uic_attr) { attr = ufs->drv_data->uic_attr; @@ -1258,7 +1251,6 @@ static struct exynos_ufs_uic_attr exynos7_uic_attr = { }; static struct exynos_ufs_drv_data exynos_ufs_drvs = { - .compatible = "samsung,exynos7-ufs", .uic_attr = &exynos7_uic_attr, .quirks = UFSHCD_QUIRK_PRDT_BYTE_GRAN | UFSHCI_QUIRK_BROKEN_REQ_LIST_CLR | diff --git a/drivers/scsi/ufs/ufs-exynos.h b/drivers/scsi/ufs/ufs-exynos.h index 0a31f77a5f48..2e72aabaa673 100644 --- a/drivers/scsi/ufs/ufs-exynos.h +++ b/drivers/scsi/ufs/ufs-exynos.h @@ -142,7 +142,6 @@ struct exynos_ufs_uic_attr { }; struct exynos_ufs_drv_data { - char *compatible; struct exynos_ufs_uic_attr *uic_attr; unsigned int quirks; unsigned int opts; @@ -191,7 +190,7 @@ struct exynos_ufs { struct ufs_pa_layer_attr dev_req_params; struct ufs_phy_time_cfg t_cfg; ktime_t entry_hibern8_t; - struct exynos_ufs_drv_data *drv_data; + const struct exynos_ufs_drv_data *drv_data; u32 opts; #define EXYNOS_UFS_OPT_HAS_APB_CLK_CTRL BIT(0) From patchwork Fri Sep 17 06:54:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 12501265 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=-19.1 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, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 A3D54C43219 for ; Fri, 17 Sep 2021 06:55:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8A60F61164 for ; Fri, 17 Sep 2021 06:55:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238584AbhIQG45 (ORCPT ); Fri, 17 Sep 2021 02:56:57 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:53808 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237405AbhIQG4v (ORCPT ); Fri, 17 Sep 2021 02:56:51 -0400 Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20210917065526epoutp011820cc6198cece0aa7d5dfd9fe31307b~liZgYBPQF0674406744epoutp01g for ; Fri, 17 Sep 2021 06:55:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20210917065526epoutp011820cc6198cece0aa7d5dfd9fe31307b~liZgYBPQF0674406744epoutp01g DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1631861726; bh=tc0uZzq7xcvc4vhtgqkHflrQXkhw5OzNX5MhWBfkhxw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SZB1sBBceJtAAHpTdoj2E8TBFWpUyTclk2mPUkP7E281mzoYDdyGXjMjU8pp+9gu/ AdH+OiXytXbE5Sd+PrWVaYN5PrrFTWVeOoBb4+F4WzYTgpYSJV0aHCLsNdKyj+t4Mz 8DLzhph31IC4FaGzzOc4i4KjI1FBEdJgT0k5hTyk= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20210917065525epcas2p28bc73291141f535486227643f0f56ccf~liZfiUsPY0927909279epcas2p2S; Fri, 17 Sep 2021 06:55:25 +0000 (GMT) Received: from epsmges2p2.samsung.com (unknown [182.195.40.188]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4H9l8C6MlPz4x9QT; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p2.samsung.com (Symantec Messaging Gateway) with SMTP id 6A.43.09816.BDB34416; Fri, 17 Sep 2021 15:55:23 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p3.samsung.com (KnoxPortal) with ESMTPA id 20210917065523epcas2p3ff66daa15c8c782f839422756c388d93~liZdXvjxE1851718517epcas2p3Z; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20210917065523epsmtrp2db8f0512223859b5c94d1fdde9bbe5e0~liZdWsgtF1373513735epsmtrp2B; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) X-AuditID: b6c32a46-63bff70000002658-11-61443bdb7845 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 86.91.08750.ADB34416; Fri, 17 Sep 2021 15:55:22 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.51]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210917065522epsmtip21a92d287d448f061178b09cc039ba8a8~liZdHXhrv2199021990epsmtip2s; Fri, 17 Sep 2021 06:55:22 +0000 (GMT) From: Chanho Park To: Alim Akhtar , Avri Altman , "James E . J . Bottomley" , "Martin K . Petersen" , Krzysztof Kozlowski Cc: Bean Huo , Bart Van Assche , Adrian Hunter , Christoph Hellwig , Can Guo , Jaegeuk Kim , Gyunghoon Kwon , linux-samsung-soc@vger.kernel.org, linux-scsi@vger.kernel.org, Chanho Park , Rob Herring , devicetree@vger.kernel.org Subject: [PATCH v3 05/17] dt-bindings: ufs: exynos-ufs: add sysreg regmap property Date: Fri, 17 Sep 2021 15:54:24 +0900 Message-Id: <20210917065436.145629-6-chanho61.park@samsung.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210917065436.145629-1-chanho61.park@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA01Te0xTVxjfube9XAzMS+vkhGVaLw4HBqRlrUfHwyFrboAlLLrEmMV6gWsh lLa2wAarrmbgqDzCgoirY0xgk4Gz4/0YDAZ16vAVoZF1bhNW42BxKM3CIyJruZjx3+873++R 7zvnkLjodyKIzNTmcAYtq6GJdYLO4VAU/usbCWykwxKFrrkuEuj+F50EmlpwEOjHCYsAnXm8 gKNZ29dCNDqwHdXabwpRac9eNFJRhyGXzYqjuvFODLU8msfQ2Vs/YKjkbjeBLlx5hqGifrvP ngBmdCyJsZrLCGa0vAxj2hrDmPq+KYxpbbIQTEXdIGDm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prJIsWRmVeSWpSXmKPExsWy7bCSvO4ta5dEg/4zNhYnn6xhs3gwbxub xcufV9ksDj7sZLGY9uEns8Wn9ctYLS7v17aYf+Qcq0XPTmeL0xMWMVk8WT+L2WLRjW1MFhvf /mCymHF+H5NF9/UdbBbLj/9jsmjde4TdQdDj8hVvj1kNvWwel/t6mTw2r9DyWLznJZPHplWd bB4TFh1g9Pi+voPN4+PTWywefVtWMXp83iTn0X6gmymAJ4rLJiU1J7MstUjfLoEr49GtyUwF e9krOpa8Z2xgnMXWxcjJISFgIvHryQTGLkYuDiGBHYwSP/c3MUMkZCWevdvBDmELS9xvOcIK UfSeUaJzzmoWkASbgK7EluevGEFsEYGPjBJzvmmBFDEL7GeW+Nd6kwkkISwQJDHx2BWwBhYB VYmbn4+CxXkF7CWuzm9khdggL3HkVyfYZk4BB4lbu/6DDRUCqpk4eREjRL2gxMmZT8DmMAPV N2+dzTyBUWAWktQsJKkFjEyrGCVTC4pz03OLDQuM8lLL9YoTc4tL89L1kvNzNzGCY09Lawfj nlUf9A4xMnEwHmKU4GBWEuG9UOOYKMSbklhZlVqUH19UmpNafIhRmoNFSZz3QtfJeCGB9MSS 1OzU1ILUIpgsEwenVAPT6Zdcpx65f2c7wbno9c4fpiw1GwpVEs/VuXx63vB404+901nWfm6p Ti/dvCa76cOZ8IkrHzI9s9+c3OffUmNSV7D/f3z0yYnepaueGFvGHj3xTrAlJuJHvembE//X WisHp1550hGslZ6nt/KZ6xvtk4oPpXmNHuVzRd89kRli9u9Vo3HZ4RrebLut58/ktjm4RX31 fMt3W7g4izd506+4eelqzp6N70UEMrjWT2Ktn9Vw4tK58ncmJbc8DBasMD1iHMdUcMF7/2mT pamb+33f/Nz/Vq9ttZ+zPpdk/+Sni7956XkwuPPZbeyZ8yfUqsOhjOsvT+KZGd9z3X256813 XOg86b8wk3nFGvG4yT+UWIozEg21mIuKEwH5prIYLAMAAA== X-CMS-MailID: 20210917065523epcas2p3ff66daa15c8c782f839422756c388d93 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210917065523epcas2p3ff66daa15c8c782f839422756c388d93 References: <20210917065436.145629-1-chanho61.park@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Add "sysreg" regmap phandle property to control io coherency setting. Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Chanho Park --- .../devicetree/bindings/ufs/samsung,exynos-ufs.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml b/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml index b9ca8ef4f2be..c3f14f81d4b7 100644 --- a/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml +++ b/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml @@ -54,6 +54,11 @@ properties: phy-names: const: ufs-phy + sysreg: + $ref: '/schemas/types.yaml#/definitions/phandle' + description: phandle for FSYS sysreg interface, used to control + sysreg register bit for UFS IO Coherency + required: - compatible - reg From patchwork Fri Sep 17 06:54:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 12501263 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=-19.1 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, URIBL_BLOCKED,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 14200C43217 for ; Fri, 17 Sep 2021 06:55:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EAD13600AA for ; Fri, 17 Sep 2021 06:55:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237755AbhIQG44 (ORCPT ); Fri, 17 Sep 2021 02:56:56 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:41801 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237211AbhIQG4u (ORCPT ); Fri, 17 Sep 2021 02:56:50 -0400 Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20210917065526epoutp0320b30eba27f1abcd08f997e728a392a8~liZgLgRGQ0483304833epoutp03q for ; Fri, 17 Sep 2021 06:55:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20210917065526epoutp0320b30eba27f1abcd08f997e728a392a8~liZgLgRGQ0483304833epoutp03q DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1631861726; bh=ap+yuWyfl67dRUQsKZ/Oj0RoVKze2lfX+0XLDDz/qRU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q0gwicquT1SYcTP+JmnxVDcDPTnkdGUOtN0SlcbpXXVWhlbst4oLVH6/qi4EsE+ZJ Czfu8DZvqCZPcR2LWQH7YQA/1bDW4sYCQ73yY5wl2G6LKm2PW/DMAmH4E2XH0OMK6e 018JdT98iWXr438VLBwhBa2bPkpkna2LMZ5PeqOk= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20210917065525epcas2p3413cb125d963e12fd8b7158107f53f75~liZfZplkf1851718517epcas2p3d; Fri, 17 Sep 2021 06:55:25 +0000 (GMT) Received: from epsmges2p3.samsung.com (unknown [182.195.40.187]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4H9l8D0mPdz4x9Qf; Fri, 17 Sep 2021 06:55:24 +0000 (GMT) Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id 8B.ED.09749.BDB34416; Fri, 17 Sep 2021 15:55:23 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p4.samsung.com (KnoxPortal) with ESMTPA id 20210917065523epcas2p477a63b06cbb9f5588aa2c149c9d1db10~liZdenXbC2819628196epcas2p4Q; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20210917065523epsmtrp22cdec2b6cb2696da9f12777a7931d41b~liZddlrYZ1371513715epsmtrp2Q; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) X-AuditID: b6c32a47-d29ff70000002615-ad-61443bdbf8b7 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 0F.10.09091.BDB34416; Fri, 17 Sep 2021 15:55:23 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.51]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210917065522epsmtip229baf36f4c88114e65be6a2a0b524922~liZdO41fK0630106301epsmtip2k; Fri, 17 Sep 2021 06:55:22 +0000 (GMT) From: Chanho Park To: Alim Akhtar , Avri Altman , "James E . J . Bottomley" , "Martin K . Petersen" , Krzysztof Kozlowski Cc: Bean Huo , Bart Van Assche , Adrian Hunter , Christoph Hellwig , Can Guo , Jaegeuk Kim , Gyunghoon Kwon , linux-samsung-soc@vger.kernel.org, linux-scsi@vger.kernel.org, Chanho Park , Kiwoong Kim Subject: [PATCH v3 06/17] scsi: ufs: ufs-exynos: get sysreg regmap for io-coherency Date: Fri, 17 Sep 2021 15:54:25 +0900 Message-Id: <20210917065436.145629-7-chanho61.park@samsung.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210917065436.145629-1-chanho61.park@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrFJsWRmVeSWpSXmKPExsWy7bCmhe5ta5dEg31vjSxOPlnDZvFg3jY2 i5c/r7JZHHzYyWIx7cNPZotP65exWlzer23Rs9PZ4vSERUwWT9bPYrZYdGMbk8XGtz+YLG5u OcpiMeP8PiaL7us72CyWH//H5CDgcfmKt8eshl42j8t9vUwem1doeSze85LJY9OqTjaPCYsO MHp8X9/B5vHx6S0Wj74tqxg9Pm+S82g/0M0UwBOVY5ORmpiSWqSQmpecn5KZl26r5B0c7xxv amZgqGtoaWGupJCXmJtqq+TiE6DrlpkD9JKSQlliTilQKCCxuFhJ386mKL+0JFUhI7+4xFYp tSAlp8DQsECvODG3uDQvXS85P9fK0MDAyBSoMiEnY17fbOaCKzwVPxtnMTUwPuPqYuTkkBAw kbiwfQVrFyMXh5DADkaJl49us4AkhAQ+MUp0/OKFSHxjlHh1ro8VrmPzUaiOvYwSl28dY4dw PjJKTHlxD6yKTUBXYsvzV4wgCRGB94wSTx5PAatiFpjFLHH862QmkCphgVCJ1z29zCA2i4Cq xJqu+2BxXgF7iZ1z1kPtk5c48qsTrIZTwEHi1q7/jBA1ghInZz4BO5YZqKZ562xmkAUSAjc4 JHbe3sAO0ewi8bZpCQuELSzx6vgWqLiUxOd3e9kgGroZJVof/YdKrGaU6Gz0gbDtJX5N3wJ0 BQfQBk2J9bv0QUwJAWWJI7eg9vJJdBz+yw4R5pXoaBOCaFSXOLB9OtRWWYnuOZ9ZIUo8JO6e TYME1mRGidsX17FPYFSYheSbWUi+mYWwdwEj8ypGsdSC4tz01GKjAmPkKN7ECE7kWu47GGe8 /aB3iJGJg/EQowQHs5II74Uax0Qh3pTEyqrUovz4otKc1OJDjKbAsJ7ILCWanA/MJXkl8Yam RmZmBpamFqZ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iYNTqoEpSGO/i+C+FD0/geAVO7Prl7/5rXfqlIKjfu3BZ+EL208c+aPVEH7lid1BGR+3 8OJZYcxrfk6OCIk5187mbmmzSstQbnZQ9crmt+Evp85ds9b6pvu+f8/EZCQWbBLd0L7wVH/Z rPYZrCoKOc923eo+Xc5jm+HZr7q6M0F4tuuyjvUbsgsXSl2/fWuXi+6f6ScEPjArNNdk3vqW pHRE4vXkDc9nc1ecO6q8sU7+1/33p5de2mSxyKpF3OXBdcNdx/v9T6zrmMjZcIrbs0XJjNng X5HiqY9dD9IkshKXdf1KkxDc8/lcZ2L0jOniHFduT5qo27jq0dyuME5Wt3LVJRH5XAzubLMn Jk+0iOuVS3FXYinOSDTUYi4qTgQAA55B8CcDAAA= X-CMS-MailID: 20210917065523epcas2p477a63b06cbb9f5588aa2c149c9d1db10 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210917065523epcas2p477a63b06cbb9f5588aa2c149c9d1db10 References: <20210917065436.145629-1-chanho61.park@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org UFS_EMBD sharability register of fsys block provides "sharability" setting of ufs-exynos. It can be set via syscon and regmap. Cc: Alim Akhtar Cc: Kiwoong Kim Cc: Krzysztof Kozlowski Signed-off-by: Chanho Park --- drivers/scsi/ufs/ufs-exynos.c | 5 +++++ drivers/scsi/ufs/ufs-exynos.h | 1 + 2 files changed, 6 insertions(+) diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c index 8a17ba32a721..f7a1b99c823b 100644 --- a/drivers/scsi/ufs/ufs-exynos.c +++ b/drivers/scsi/ufs/ufs-exynos.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -906,6 +907,10 @@ static int exynos_ufs_parse_dt(struct device *dev, struct exynos_ufs *ufs) goto out; } + ufs->sysreg = syscon_regmap_lookup_by_phandle(np, "sysreg"); + if (IS_ERR(ufs->sysreg)) + ufs->sysreg = NULL; + ufs->pclk_avail_min = PCLK_AVAIL_MIN; ufs->pclk_avail_max = PCLK_AVAIL_MAX; diff --git a/drivers/scsi/ufs/ufs-exynos.h b/drivers/scsi/ufs/ufs-exynos.h index 2e72aabaa673..4f93db893ce8 100644 --- a/drivers/scsi/ufs/ufs-exynos.h +++ b/drivers/scsi/ufs/ufs-exynos.h @@ -191,6 +191,7 @@ struct exynos_ufs { struct ufs_phy_time_cfg t_cfg; ktime_t entry_hibern8_t; const struct exynos_ufs_drv_data *drv_data; + struct regmap *sysreg; u32 opts; #define EXYNOS_UFS_OPT_HAS_APB_CLK_CTRL BIT(0) From patchwork Fri Sep 17 06:54:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 12501275 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=-19.1 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, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 3D206C43217 for ; Fri, 17 Sep 2021 06:55:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 293FC610C8 for ; Fri, 17 Sep 2021 06:55:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238358AbhIQG5H (ORCPT ); Fri, 17 Sep 2021 02:57:07 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:20291 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237231AbhIQG4v (ORCPT ); Fri, 17 Sep 2021 02:56:51 -0400 Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20210917065525epoutp02ffe40d463174143586b7a00e51054976~liZf_yVW13026730267epoutp02C for ; Fri, 17 Sep 2021 06:55:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20210917065525epoutp02ffe40d463174143586b7a00e51054976~liZf_yVW13026730267epoutp02C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1631861725; bh=KDIybRxTiEr9LwmIIuZauDENiGYCxhEyBm/9vNAIcOU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qZQQM1fBDam2xrNVwMmzcrboS88J5dQzB2rM/OZF4/ufEhmxWJWhT8YYuPaa+lqMJ RCQWFJSMvplGOIY+4H3ZsN4FW2Glu+1HrUHCGRPM04w7T3EHIdtdqly6M5KV1oTO1R Mz3+OlzrTWDwy+HlNlr3RVVmJmVRJunrZSsJ+tq0= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20210917065525epcas2p1ce75d84e096e7f0aaf6ce509b7b6a5b9~liZfUnbIG0293102931epcas2p1f; Fri, 17 Sep 2021 06:55:25 +0000 (GMT) Received: from epsmges2p2.samsung.com (unknown [182.195.40.186]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4H9l8C72TTz4x9QH; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmges2p2.samsung.com (Symantec Messaging Gateway) with SMTP id 7A.43.09816.BDB34416; Fri, 17 Sep 2021 15:55:23 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p4.samsung.com (KnoxPortal) with ESMTPA id 20210917065523epcas2p44a9f121c18e0f3a5614f980c9eeffa16~liZdlSsq-0164301643epcas2p4T; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20210917065523epsmtrp21426561fe23813c3bd71edce8aea36ae~liZdkPIcN1373513735epsmtrp2C; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) X-AuditID: b6c32a46-625ff70000002658-12-61443bdbd09d Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 1F.10.09091.BDB34416; Fri, 17 Sep 2021 15:55:23 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.51]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210917065523epsmtip2d95c0b340d93336d01364bcf2ca11972~liZdT6kMH2164221642epsmtip2f; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) From: Chanho Park To: Alim Akhtar , Avri Altman , "James E . J . Bottomley" , "Martin K . Petersen" , Krzysztof Kozlowski Cc: Bean Huo , Bart Van Assche , Adrian Hunter , Christoph Hellwig , Can Guo , Jaegeuk Kim , Gyunghoon Kwon , linux-samsung-soc@vger.kernel.org, linux-scsi@vger.kernel.org, Chanho Park Subject: [PATCH v3 07/17] scsi: ufs: ufs-exynos: add refclkout_stop control Date: Fri, 17 Sep 2021 15:54:26 +0900 Message-Id: <20210917065436.145629-8-chanho61.park@samsung.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210917065436.145629-1-chanho61.park@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrKJsWRmVeSWpSXmKPExsWy7bCmue5ta5dEgwuLjC1OPlnDZvFg3jY2 i5c/r7JZHHzYyWIx7cNPZotP65exWlzer23Rs9PZ4vSERUwWT9bPYrZYdGMb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Hk+82dxMtmeXVwk4db2aUXZKVXWl0ornb5qdi3a X7A/a+L2LL8vfSHz1hz1cVI9dbz5s1O4nvG3aatkJxXI+dQ8tki/n/I2eeGk53WTmltv3Vmp cd0yTomlOCPRUIu5qDgRACKmUbkgAwAA X-CMS-MailID: 20210917065523epcas2p44a9f121c18e0f3a5614f980c9eeffa16 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210917065523epcas2p44a9f121c18e0f3a5614f980c9eeffa16 References: <20210917065436.145629-1-chanho61.park@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org This patch adds REFCLKOUT_STOP control to CLK_STOP_MASK. It can en/disable reference clock out control for UFS device. Reviewed-by: Alim Akhtar Signed-off-by: Chanho Park --- drivers/scsi/ufs/ufs-exynos.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c index f7a1b99c823b..627edef4fbeb 100644 --- a/drivers/scsi/ufs/ufs-exynos.c +++ b/drivers/scsi/ufs/ufs-exynos.c @@ -49,10 +49,11 @@ #define HCI_ERR_EN_T_LAYER 0x84 #define HCI_ERR_EN_DME_LAYER 0x88 #define HCI_CLKSTOP_CTRL 0xB0 +#define REFCLKOUT_STOP BIT(4) #define REFCLK_STOP BIT(2) #define UNIPRO_MCLK_STOP BIT(1) #define UNIPRO_PCLK_STOP BIT(0) -#define CLK_STOP_MASK (REFCLK_STOP |\ +#define CLK_STOP_MASK (REFCLKOUT_STOP | REFCLK_STOP |\ UNIPRO_MCLK_STOP |\ UNIPRO_PCLK_STOP) #define HCI_MISC 0xB4 From patchwork Fri Sep 17 06:54:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 12501267 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=-19.1 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, URIBL_BLOCKED,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 58BA9C4332F for ; Fri, 17 Sep 2021 06:55:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3FB8B611C0 for ; Fri, 17 Sep 2021 06:55:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238590AbhIQG47 (ORCPT ); Fri, 17 Sep 2021 02:56:59 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:41837 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237575AbhIQG4v (ORCPT ); Fri, 17 Sep 2021 02:56:51 -0400 Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20210917065526epoutp03eced1f6e3e626e35bf19d905b54b0319~liZgmXiEl0483304833epoutp03t for ; Fri, 17 Sep 2021 06:55:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20210917065526epoutp03eced1f6e3e626e35bf19d905b54b0319~liZgmXiEl0483304833epoutp03t DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1631861726; bh=HAEMRcMPdknANmCAkm4kPlc+Bin9AcxuWblxgC/IUSs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aAPtymICEDA7ONw8XgPpvqknDS8pxPv1xAT/OyW6f4SRmeJNIidm8vfXTZd9eW6Ms XmzxX75WhUj5B9OL2KH5O6Sg7S5NGZBW90JaVrS0L6ByT9aXNgMUv+ZgBU0xiMHkHg +0U4x1CW6QNSuiVkk0VxzgcKiW9y5iRHY3ZShFxs= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20210917065525epcas2p29071c3a9d0f137d663095d432895a95e~liZgEGbyL3235432354epcas2p23; Fri, 17 Sep 2021 06:55:25 +0000 (GMT) Received: from epsmges2p4.samsung.com (unknown [182.195.40.184]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4H9l8D3Bdpz4x9QL; Fri, 17 Sep 2021 06:55:24 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id 84.DF.09472.BDB34416; Fri, 17 Sep 2021 15:55:23 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p1.samsung.com (KnoxPortal) with ESMTPA id 20210917065523epcas2p1215e9f56482339ca8a9346a0ac2bfe23~liZdnV1sB0293102931epcas2p1a; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20210917065523epsmtrp251bb844a8133d5a195e17dff3ae897ee~liZdmZqPq1371513715epsmtrp2R; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) X-AuditID: b6c32a48-d5fff70000002500-47-61443bdb1989 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id C7.91.08750.BDB34416; Fri, 17 Sep 2021 15:55:23 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.51]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210917065523epsmtip2ec1a3a2b4af444f7217f7343dbd9f745~liZdbDN6U2163221632epsmtip2v; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) From: Chanho Park To: Alim Akhtar , Avri Altman , "James E . J . Bottomley" , "Martin K . Petersen" , Krzysztof Kozlowski Cc: Bean Huo , Bart Van Assche , Adrian Hunter , Christoph Hellwig , Can Guo , Jaegeuk Kim , Gyunghoon Kwon , linux-samsung-soc@vger.kernel.org, linux-scsi@vger.kernel.org, Chanho Park , Kiwoong Kim Subject: [PATCH v3 08/17] scsi: ufs: ufs-exynos: add setup_clocks callback Date: Fri, 17 Sep 2021 15:54:27 +0900 Message-Id: <20210917065436.145629-9-chanho61.park@samsung.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210917065436.145629-1-chanho61.park@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA02TfUwTZxzHee7ao5jBzqLbMzZHc3tBMEDL7O1kMHGgOyfLUGOWkGVwoZeW WNraa83miKlhKuUtIEakVIogYhiDwSrjdSIwOyYGFlC0mG1gHUrGuwjolLUcZvz3+T2/7/f5 5ve8iFCxEwsQpWoMrF7DqAlsnaCxK5gMHf4gjpEeGwmnelw1GPVXaSNGPVy6iVFXR8wC6sz0 EkrN1l0UUgNXtlA5zbHU9fxyhHLVWVCq/HYjQtVPLCLUHfsvAups388IlT3UhFFVjudIDE4P DO6hLaZcjB7Iy0XoHy+F0BVtDxG6odqM0fnlHYBeqMvE6Jn7TgGdZ68G9FzDm/TJjmwk4aVE dZSKZRSsXsJqUrSKVI0ymtizPyk2SU5KZaGybdT7hETDpLHRRFx8QuiuVLV7JEJymFEb3UsJ DMcR4R9G6bVGAytRaTlDNMHqFGqdTKYL45g0zqhRhqVo0yJlUmmE3K1MVqucPSZv3fn1X9mv tGIm0O+XBXxEEN8K75XmYVlgnUiMNwFY2TG/WswC2Dz5SMAXcwAO9DmRF5YLY6OYh8V4C4CL Vn9eNAOgtf6kwNPA8FBoHxsHnsYG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Y8vwRWxcjF4eQwA5GiS2HD7FDJGQlnr3bAWULS9xvOcIKUfSeUWL/ 1fWMIAk2AV2JLc9fgdkiAh8ZJeZ80wIpYhZYwizReGAeE0hCWMBL4uHPw2CTWARUJeavW8IG YvMK2Eu8urqWCWKDvMSRX53MIDangIPErV3/wYYKAdVMnLyIEaJeUOLkzCcsIDYzUH3z1tnM ExgFZiFJzUKSWsDItIpRMrWgODc9t9iwwCgvtVyvODG3uDQvXS85P3cTIzjitLR2MO5Z9UHv ECMTB+MhRgkOZiUR3gs1jolCvCmJlVWpRfnxRaU5qcWHGKU5WJTEeS90nYwXEkhPLEnNTk0t SC2CyTJxcEo1MHlnW9iXbfYK1PpeeewsuwMD89czMmzT8pYbeu/5tiDj9cSmqT6hClosAnY5 9pf1e5ousD5e6lsaXffQ52aNPw/Ltk39Itsa12aeE2MyDf0jH2gUEhftXcrLuirHfeOqwjmx +n9nTipcdOH4F6vuqYeKgov7j4kx2Aaaxjdfn3R3Oruj8qc/1TWfHC+12ryTrzZw5Xkedijm Fs+8P1XTlVUdlwbmVDcJ36vMjTjBHxNziCfzfsPFWs9jC+Q/O20KuCNz9uyMyA+NP3K+OPu8 Odl+/tUU+5YXoZG1ZhnMXyRqHu3eIV5m8TWTdXfrZ3Xt1dcT5t2aJL2l6E7DM6NgP5lb37cn iPgF7GmYIvROiaU4I9FQi7moOBEADptnMycDAAA= X-CMS-MailID: 20210917065523epcas2p1215e9f56482339ca8a9346a0ac2bfe23 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210917065523epcas2p1215e9f56482339ca8a9346a0ac2bfe23 References: <20210917065436.145629-1-chanho61.park@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org This patch adds setup_clocks callback to control/gate clocks by ufshcd. To avoid calling before initialization, it needs to check whether ufs is null or not and call it initially from pre_link callback. Cc: Alim Akhtar Cc: Kiwoong Kim Cc: Krzysztof Kozlowski Signed-off-by: Chanho Park --- drivers/scsi/ufs/ufs-exynos.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c index 627edef4fbeb..2024e44a09d7 100644 --- a/drivers/scsi/ufs/ufs-exynos.c +++ b/drivers/scsi/ufs/ufs-exynos.c @@ -795,6 +795,27 @@ static void exynos_ufs_config_intr(struct exynos_ufs *ufs, u32 errs, u8 index) } } +static int exynos_ufs_setup_clocks(struct ufs_hba *hba, bool on, + enum ufs_notify_change_status status) +{ + struct exynos_ufs *ufs = ufshcd_get_variant(hba); + + if (!ufs) + return 0; + + if (on) { + if (ufs->opts & EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL) + exynos_ufs_disable_auto_ctrl_hcc(ufs); + exynos_ufs_ungate_clks(ufs); + } else { + exynos_ufs_gate_clks(ufs); + if (ufs->opts & EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL) + exynos_ufs_enable_auto_ctrl_hcc(ufs); + } + + return 0; +} + static int exynos_ufs_pre_link(struct ufs_hba *hba) { struct exynos_ufs *ufs = ufshcd_get_variant(hba); @@ -813,6 +834,8 @@ static int exynos_ufs_pre_link(struct ufs_hba *hba) exynos_ufs_config_phy_time_attr(ufs); exynos_ufs_config_phy_cap_attr(ufs); + exynos_ufs_setup_clocks(hba, true, POST_CHANGE); + if (ufs->drv_data->pre_link) ufs->drv_data->pre_link(ufs); @@ -1203,6 +1226,7 @@ static struct ufs_hba_variant_ops ufs_hba_exynos_ops = { .hce_enable_notify = exynos_ufs_hce_enable_notify, .link_startup_notify = exynos_ufs_link_startup_notify, .pwr_change_notify = exynos_ufs_pwr_change_notify, + .setup_clocks = exynos_ufs_setup_clocks, .setup_xfer_req = exynos_ufs_specify_nexus_t_xfer_req, .setup_task_mgmt = exynos_ufs_specify_nexus_t_tm_req, .hibern8_notify = exynos_ufs_hibern8_notify, From patchwork Fri Sep 17 06:54:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 12501277 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=-19.1 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, URIBL_BLOCKED,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 4EE47C433EF for ; Fri, 17 Sep 2021 06:55:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3422B6112E for ; Fri, 17 Sep 2021 06:55:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238392AbhIQG5H (ORCPT ); Fri, 17 Sep 2021 02:57:07 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:20405 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237633AbhIQG4v (ORCPT ); Fri, 17 Sep 2021 02:56:51 -0400 Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20210917065527epoutp0233398fd831c854336188e9a106743d94~liZhj8olU3018930189epoutp02P for ; Fri, 17 Sep 2021 06:55:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20210917065527epoutp0233398fd831c854336188e9a106743d94~liZhj8olU3018930189epoutp02P DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1631861727; bh=MM+Niah6/Dlz37vZxUDkBeok/HyuhcWhAKujeiGkYO8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J5kRnUv40l5dJwox49LGzM7JuexZ/w9osJsJbX+8JL14FxWX7WSGYl13bwP78c3OR PYgWUnXOtCrhtdpbFXZK3KnNtTR0YlOl5XanM7dv8d6/BXOphTW+GgMEKrO4q2CQMb H7BpSszVx+RusJUMK2ql+u+TqXMsp8ygGYo0r4+A= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20210917065526epcas2p144c6baa322d00a3b94ba9985ec2e2c7f~liZg2Nkb-3017030170epcas2p1G; Fri, 17 Sep 2021 06:55:26 +0000 (GMT) Received: from epsmges2p2.samsung.com (unknown [182.195.40.188]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4H9l8D4fQ9z4x9Pv; Fri, 17 Sep 2021 06:55:24 +0000 (GMT) Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmges2p2.samsung.com (Symantec Messaging Gateway) with SMTP id FC.43.09816.CDB34416; Fri, 17 Sep 2021 15:55:24 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p1.samsung.com (KnoxPortal) with ESMTPA id 20210917065523epcas2p15b648b88af85252fe12ff8026307526a~liZdxee_x0293602936epcas2p1J; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20210917065523epsmtrp21040586a7dd3d1cc7ad23e06756ff324~liZdwZqey1373513735epsmtrp2D; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) X-AuditID: b6c32a46-625ff70000002658-14-61443bdc2803 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 11.20.09091.BDB34416; Fri, 17 Sep 2021 15:55:23 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.51]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210917065523epsmtip2e04a9e96f3e8db4159a379276c1f26d5~liZdf8rn-2196321963epsmtip2p; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) From: Chanho Park To: Alim Akhtar , Avri Altman , "James E . J . Bottomley" , "Martin K . Petersen" , Krzysztof Kozlowski Cc: Bean Huo , Bart Van Assche , Adrian Hunter , Christoph Hellwig , Can Guo , Jaegeuk Kim , Gyunghoon Kwon , linux-samsung-soc@vger.kernel.org, linux-scsi@vger.kernel.org, Chanho Park , Kiwoong Kim Subject: [PATCH v3 09/17] scsi: ufs: ufs-exynos: correct timeout value setting registers Date: Fri, 17 Sep 2021 15:54:28 +0900 Message-Id: <20210917065436.145629-10-chanho61.park@samsung.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210917065436.145629-1-chanho61.park@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrNJsWRmVeSWpSXmKPExsWy7bCmue4da5dEg2m72CxOPlnDZvFg3jY2 i5c/r7JZHHzYyWIx7cNPZotP65exWlzer23Rs9PZ4vSERUwWT9bPYrZYdGMbk8XGtz+YLG5u OcpiMeP8PiaL7us72CyWH//H5CDgcfmKt8eshl42j8t9vUwem1doeSze85LJY9OqTjaPCYsO MHp8X9/B5vHx6S0Wj74tqxg9Pm+S82g/0M0UwBOVY5ORmpiSWqSQmpecn5KZl26r5B0c7xxv amZgqGtoaWGupJCXmJtqq+TiE6DrlpkD9JKSQlliTilQKCCxuFhJ386mKL+0JFUhI7+4xFYp tSAlp8DQsECvODG3uDQvXS85P9fK0MDAyBSoMiEn4/SarewFuzgrDm15y9TAuJyji5GDQ0LA ROLK9OguRi4OIYEdjBLduxpZIZxPjBI75qyAcr4xSpxseM7excgJ1tH7+CVUYi+jxL1NP5gg nI+MEk8W3GQCqWIT0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X9/B5vHx6S0Wj74tqxg9Pm+S82g/0M0UwBPFZZOSmpNZllqkb5fAlXF6zVb2gl2cFYe2 vGVqYFzO0cXIySEhYCLR+/glaxcjF4eQwG5GiUdv9jNDJGQlnr3bwQ5hC0vcbznCCmILCbxn lNh/QgbEZhPQldjy/BUjiC0i8JFRYs43LZBBzAJLmCUaD8xjAkkIC0RITHp6jA3EZhFQlTi2 YBlYnFfAQWLz3k6oBfISR351gi3mBIrf2vWfEWKZvcTEyYsYIeoFJU7OfMICYjMD1Tdvnc08 gVFgFpLULCSpBYxMqxglUwuKc9Nziw0LDPNSy/WKE3OLS/PS9ZLzczcxguNNS3MH4/ZVH/QO MTJxMB5ilOBgVhLhvVDjmCjEm5JYWZValB9fVJqTWnyIUZqDRUmc90LXyXghgfTEktTs1NSC 1CKYLBMHp1QDk+mceTFn/oadP7pfuPrVpByO3Vv/3o84deejpPGDaS9ve+vxzmmI/7x0wQox Xe/Na6++KbafebYsgaNA2/G9iE7xnCm/d+b/dN3m3aTLWcn/wcyvM+x3R9btE68dKnJcXd+b OejefR7fcn630aTVEo2nBM7zp3SwKHqqFTvaK9uZhLFs4757bIJ+BkPgzPgvG1nsTCd77Uo8 ci3Uru+DQEtb5arJE17OeRigPGfLorufPKyyFC40bvB5s+jUqZAPOY1Xo3ec55K1Wxx48cmT uoYjrmtOrLFvFvy45Elub4j3Z/kvGZWzpr73e/TIUFPFcOG8Ke+PKHk87vq9xfTn889zd0zQ 55l/78mLHBGh71uUWIozEg21mIuKEwFj7u5+JgMAAA== X-CMS-MailID: 20210917065523epcas2p15b648b88af85252fe12ff8026307526a X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210917065523epcas2p15b648b88af85252fe12ff8026307526a References: <20210917065436.145629-1-chanho61.park@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org PA_PWRMODEUSERDATA0 -> DL_FC0PROTTIMEOUTVAL PA_PWRMODEUSERDATA1 -> DL_TC0REPLAYTIMEOUTVAL PA_PWRMODEUSERDATA2 -> DL_AFC0REQTIMEOUTVAL Cc: Alim Akhtar Cc: Kiwoong Kim Cc: Krzysztof Kozlowski Signed-off-by: Chanho Park Reviewed-by: Alim Akhtar --- drivers/scsi/ufs/ufs-exynos.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c index 2024e44a09d7..e32f7d09db1a 100644 --- a/drivers/scsi/ufs/ufs-exynos.c +++ b/drivers/scsi/ufs/ufs-exynos.c @@ -644,9 +644,9 @@ static int exynos_ufs_pre_pwr_mode(struct ufs_hba *hba, } /* setting for three timeout values for traffic class #0 */ - ufshcd_dme_set(hba, UIC_ARG_MIB(PA_PWRMODEUSERDATA0), 8064); - ufshcd_dme_set(hba, UIC_ARG_MIB(PA_PWRMODEUSERDATA1), 28224); - ufshcd_dme_set(hba, UIC_ARG_MIB(PA_PWRMODEUSERDATA2), 20160); + ufshcd_dme_set(hba, UIC_ARG_MIB(DL_FC0PROTTIMEOUTVAL), 8064); + ufshcd_dme_set(hba, UIC_ARG_MIB(DL_TC0REPLAYTIMEOUTVAL), 28224); + ufshcd_dme_set(hba, UIC_ARG_MIB(DL_AFC0REQTIMEOUTVAL), 20160); return 0; out: From patchwork Fri Sep 17 06:54:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 12501271 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=-19.1 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, URIBL_BLOCKED,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 4C1B1C433FE for ; Fri, 17 Sep 2021 06:55:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 339106112E for ; Fri, 17 Sep 2021 06:55:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237354AbhIQG5B (ORCPT ); Fri, 17 Sep 2021 02:57:01 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:20333 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237342AbhIQG4v (ORCPT ); Fri, 17 Sep 2021 02:56:51 -0400 Received: from epcas2p3.samsung.com (unknown [182.195.41.55]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20210917065526epoutp0294d3b3b2c0d7b641b6dcd20fc5ff8263~liZga8nIy2960229602epoutp02d for ; Fri, 17 Sep 2021 06:55:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20210917065526epoutp0294d3b3b2c0d7b641b6dcd20fc5ff8263~liZga8nIy2960229602epoutp02d DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1631861726; bh=qZ5dppVwVeqasGRuSK4xHCpIcS6Wc0M2jmdax6HE51M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HLG5FYAYAYdz7o78GFLK6suktVvMHXOew9XTomGfcc58ntrHgoT5vd88Svdr2Th36 b5taca2pXdMLyvVjYijLeC9093zT0pCAAcGdU2XVhpBDjNDaiWF1nPgV1vJ3bhRVpC xaW5tvadJ+Fv7XrnPeKjcfQBCp+ulp9C4vdUDQPQ= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20210917065525epcas2p2aa81cb3adde20c7a780412d8ccb4ab2f~liZfsRIg80686706867epcas2p2j; Fri, 17 Sep 2021 06:55:25 +0000 (GMT) Received: from epsmges2p4.samsung.com (unknown [182.195.40.181]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4H9l8D3BZrz4x9QJ; Fri, 17 Sep 2021 06:55:24 +0000 (GMT) Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id A5.DF.09472.CDB34416; Fri, 17 Sep 2021 15:55:24 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p3.samsung.com (KnoxPortal) with ESMTPA id 20210917065523epcas2p39e18203beafe9377e9dac819f01b804f~liZd4ZWSG2938329383epcas2p30; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20210917065523epsmtrp27265c620a15d204e9118e864ca1b5657~liZdyp9zQ1373513735epsmtrp2E; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) X-AuditID: b6c32a48-d5fff70000002500-49-61443bdc492a Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id F8.91.08750.BDB34416; Fri, 17 Sep 2021 15:55:23 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.51]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210917065523epsmtip2132c99e7244b83bc10c465444d4cc9da~liZdnXGBK2163221632epsmtip2w; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) From: Chanho Park To: Alim Akhtar , Avri Altman , "James E . J . Bottomley" , "Martin K . Petersen" , Krzysztof Kozlowski Cc: Bean Huo , Bart Van Assche , Adrian Hunter , Christoph Hellwig , Can Guo , Jaegeuk Kim , Gyunghoon Kwon , linux-samsung-soc@vger.kernel.org, linux-scsi@vger.kernel.org, Chanho Park , Kiwoong Kim Subject: [PATCH v3 10/17] scsi: ufs: ufs-exynos: support custom version of ufs_hba_variant_ops Date: Fri, 17 Sep 2021 15:54:29 +0900 Message-Id: <20210917065436.145629-11-chanho61.park@samsung.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210917065436.145629-1-chanho61.park@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrNJsWRmVeSWpSXmKPExsWy7bCmue4da5dEgwMn2S1OPlnDZvFg3jY2 i5c/r7JZHHzYyWIx7cNPZotP65exWlzer23Rs9PZ4vSERUwWT9bPYrZYdGMbk8XGtz+YLG5u OcpiMeP8PiaL7us72CyWH//H5CDgcfmKt8eshl42j8t9vUwem1doeSze85LJY9OqTjaPCYsO MHp8X9/B5vHx6S0Wj74tqxg9Pm+S82g/0M0UwBOVY5ORmpiSWqSQmpecn5KZl26r5B0c7xxv amZgqGtoaWGupJCXmJtqq+TiE6DrlpkD9JKSQlliTilQKCCxuFhJ386mKL+0JFUhI7+4xFYp tSAlp8DQsECvODG3uDQvXS85P9fK0MDAyBSoMiEn48TPv+wFv3gqZr97xdTA2MzdxcjJISFg ItE0cRtrFyMXh5DADkaJLcua2SCcT4wSux7dh8p8ZpRY0nOBsYuRA6xl2vNqiPguRon7J+cw QzgfGSUu7u9gAZnLJqArseX5K0aQhIjAe0aJJ4+nsIM4zAKzmCWOf53MBFIlLJAgsbdvDpjN IqAqsamjmxHE5hVwkNh0cDczxIXyEkd+dYLZnEDxW7v+Q9UISpyc+QRsGzNQTfPW2WBnSAjc 4JBYuHgFC0Szi8TrG+dZIWxhiVfHt7BD2FISn9/tZYNo6GaUaH30HyqxmlGis9EHwraX+DV9 CyvI08wCmhLrd+lD/K8sceQW1F4+iY7Df9khwrwSHW1CEI3qEge2T4e6QFaie85nqAs8JFZt Oc4CCa3JQFtfb2WawKgwC8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7fOZp7A KDALSWoWktQCRqZVjJKpBcW56bnFhgVGeanlesWJucWleel6yfm5mxjB0aaltYNxz6oPeocY mTgYDzFKcDArifBeqHFMFOJNSaysSi3Kjy8qzUktPsQozcGiJM57oetkvJBAemJJanZqakFq EUyWiYNTqoFp8n71X/7r+xKfFnHNLSv6st44lMeYa1fshBfVWnfW6B6OePLRMkPqQ6GD7pTt KzdP9NSaVqRqaXF7dnTQP0+Pu7N355oIRQlvlJq/a6L5lcR5xvIT/Ou2b2M0Pls02/V16cn4 bb/cZrkrMu9ZLsN3S1hK4elegSM39mqqPl/tysYcNs1e2XrdRKtDjEVm14xyHMukfvFu6k7S KlF6K+nFIBzDW3nnjsR+tU/1aSL8B4TEI1z94h8ffvBrtm3jo1XO87xWLzphk3R8ka9y7K22 JXWMjC0SzJ037NeYq7Xx32gVNCoWcarySnwreqwt58He+6/P6Z4IFImzXLfONDj31uxpL587 y6fvidl5YL4SS3FGoqEWc1FxIgCo9QBnJQMAAA== X-CMS-MailID: 20210917065523epcas2p39e18203beafe9377e9dac819f01b804f X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210917065523epcas2p39e18203beafe9377e9dac819f01b804f References: <20210917065436.145629-1-chanho61.park@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org By default, ufs_hba_exynos_ops will be used but this patch supports to use custom version of ufs_hba_variant_ops because some variants of exynos-ufs will use only few callbacks. Cc: Alim Akhtar Cc: Kiwoong Kim Cc: Krzysztof Kozlowski Signed-off-by: Chanho Park Reviewed-by: Alim Akhtar --- drivers/scsi/ufs/ufs-exynos.c | 8 +++++++- drivers/scsi/ufs/ufs-exynos.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c index e32f7d09db1a..a3160d9bd234 100644 --- a/drivers/scsi/ufs/ufs-exynos.c +++ b/drivers/scsi/ufs/ufs-exynos.c @@ -1238,8 +1238,14 @@ static int exynos_ufs_probe(struct platform_device *pdev) { int err; struct device *dev = &pdev->dev; + const struct ufs_hba_variant_ops *vops = &ufs_hba_exynos_ops; + const struct exynos_ufs_drv_data *drv_data = + device_get_match_data(dev); - err = ufshcd_pltfrm_init(pdev, &ufs_hba_exynos_ops); + if (drv_data && drv_data->vops) + vops = drv_data->vops; + + err = ufshcd_pltfrm_init(pdev, vops); if (err) dev_err(dev, "ufshcd_pltfrm_init() failed %d\n", err); diff --git a/drivers/scsi/ufs/ufs-exynos.h b/drivers/scsi/ufs/ufs-exynos.h index 4f93db893ce8..bc4b8b0324bd 100644 --- a/drivers/scsi/ufs/ufs-exynos.h +++ b/drivers/scsi/ufs/ufs-exynos.h @@ -142,6 +142,7 @@ struct exynos_ufs_uic_attr { }; struct exynos_ufs_drv_data { + const struct ufs_hba_variant_ops *vops; struct exynos_ufs_uic_attr *uic_attr; unsigned int quirks; unsigned int opts; From patchwork Fri Sep 17 06:54:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 12501287 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=-19.1 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, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 4F45BC433EF for ; Fri, 17 Sep 2021 06:55:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3A776610C8 for ; Fri, 17 Sep 2021 06:55:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238770AbhIQG5S (ORCPT ); Fri, 17 Sep 2021 02:57:18 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:53958 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238448AbhIQG4y (ORCPT ); Fri, 17 Sep 2021 02:56:54 -0400 Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20210917065526epoutp0135e60f4a24a49c1fe218092e42ac959f~liZgbtnVO0941709417epoutp01C for ; Fri, 17 Sep 2021 06:55:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20210917065526epoutp0135e60f4a24a49c1fe218092e42ac959f~liZgbtnVO0941709417epoutp01C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1631861726; bh=3baXso0cT4YAdRrO2mhhbue5bCk6NOjPCDeLrfPw0uc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jSuWLl34lBzjIwAM6QvXF1qUzKQ4wBX0JYPMrMUXOKVuSowINN6ORn1W7KIeY+8Gf ukjRssfEgfXPqjzNaVtKz7w8j8Oo36Ev3uIwqpcPKWgGMlB4ofkvuKUpNtna7MsmeB Z4jzKoobeEnoGsWYnuZMpGJG5tcZGorimPUcfeGo= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20210917065525epcas2p22a1df3fdd70d60289a85b23782d8cf30~liZf8sTut0686706867epcas2p2l; Fri, 17 Sep 2021 06:55:25 +0000 (GMT) Received: from epsmges2p3.samsung.com (unknown [182.195.40.186]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4H9l8D43q5z4x9Pw; Fri, 17 Sep 2021 06:55:24 +0000 (GMT) Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id CC.ED.09749.CDB34416; Fri, 17 Sep 2021 15:55:24 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p3.samsung.com (KnoxPortal) with ESMTPA id 20210917065523epcas2p3b178e3d9d2d4db628f597732be9c6856~liZd8yBBy0100601006epcas2p3r; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20210917065523epsmtrp1d41b70439ea441ad9959548eae7e1798~liZd5RMuf1045910459epsmtrp1B; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) X-AuditID: b6c32a47-29aa8a8000002615-af-61443bdc7ebe Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 29.91.08750.BDB34416; Fri, 17 Sep 2021 15:55:23 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.51]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210917065523epsmtip240432b2e231c3df41a76b45b4fd4f1ca~liZdsnSl11565515655epsmtip2n; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) From: Chanho Park To: Alim Akhtar , Avri Altman , "James E . J . Bottomley" , "Martin K . Petersen" , Krzysztof Kozlowski Cc: Bean Huo , Bart Van Assche , Adrian Hunter , Christoph Hellwig , Can Guo , Jaegeuk Kim , Gyunghoon Kwon , linux-samsung-soc@vger.kernel.org, linux-scsi@vger.kernel.org, Chanho Park , Kiwoong Kim Subject: [PATCH v3 11/17] scsi: ufs: ufs-exynos: add EXYNOS_UFS_OPT_SKIP_CONFIG_PHY_ATTR option Date: Fri, 17 Sep 2021 15:54:30 +0900 Message-Id: <20210917065436.145629-12-chanho61.park@samsung.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210917065436.145629-1-chanho61.park@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrBJsWRmVeSWpSXmKPExsWy7bCmhe4da5dEg1m3OSxOPlnDZvFg3jY2 i5c/r7JZHHzYyWIx7cNPZotP65exWlzer23Rs9PZ4vSERUwWT9bPYrZYdGMbk8XGtz+YLG5u OcpiMeP8PiaL7us72CyWH//H5CDgcfmKt8eshl42j8t9vUwem1doeSze85LJY9OqTjaPCYsO MHp8X9/B5vHx6S0Wj74tqxg9Pm+S82g/0M0UwBOVY5ORmpiSWqSQmpecn5KZl26r5B0c7xxv amZgqGtoaWGupJCXmJtqq+TiE6DrlpkD9JKSQlliTilQKCCxuFhJ386mKL+0JFUhI7+4xFYp tSAlp8DQsECvODG3uDQvXS85P9fK0MDAyBSoMiEno2P9dNaCnTwVE6c1MzUwfuTqYuTkkBAw kTi2YD8LiC0ksINR4ukerS5GLiD7E6PE7i8PoRKfGSW2fY2DaZi44TozRHwXo8Ts66UQDR8Z JRavaGMDSbAJ6Epsef6KESQhIvCeUeLJ4ynsIA6zwCxmieNfJzOBVAkLJEo0ru0G62ARUJV4 0nqEHcTmFXCQ+DnnOyvEOnmJI786wdZxAsVv7frPCFEjKHFy5hOw85iBapq3zmYGWSAhcIND 4u+300AJDiDHRWL23giIOcISr45vYYewpSRe9rexQ9R3M0q0PvoPlVjNKNHZ6ANh20v8mr6F FWQOs4CmxPpd+hAjlSWO3IJayyfRcfgvO0SYV6KjTQiiUV3iwPbpLBC2rET3nM9Qn3hIHOpf ww4JrMmMEkev7GGcwKgwC8k3s5B8Mwth8QJG5lWMYqkFxbnpqcVGBcbIEbyJEZzEtdx3MM54 +0HvECMTB+MhRgkOZiUR3gs1jolCvCmJlVWpRfnxRaU5qcWHGE2BYT2RWUo0OR+YR/JK4g1N jczMDCxNLUzNjCyUxHnn/nNKFBJITyxJzU5NLUgtgulj4uCUamBSe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V2UfWsm+7Ynn65koHn6SJM41f9z19teN+ dl2739OmpL609bWy316LaXvt6Z8yx7xaOK3f42WiNqPZf66tj1euUM744yF+d5GQ/aPn894E 5xw8vTfY1uCp7L+JC432fjv1bsLXC6smn9mdnKQdtPNyXb32zvTYitS/ZYaqn//37/c1avyn +LdwV9qJDO4Dlruv9a5TTPl72uv1FPvE4zfmzjJROaBRsSantI3/EfNfuUPPHl9vFPulIGhz 1Sz1mnfs0c82Ik+KxY4fjP9Z0Zcam7QoIJqzffmRT3Ncnm0TvNro1+Xc6cOhsPTA9rgwSxb+ Aom7Vd+CpW8pKrEUZyQaajEXFScCADqM1OYmAwAA X-CMS-MailID: 20210917065523epcas2p3b178e3d9d2d4db628f597732be9c6856 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210917065523epcas2p3b178e3d9d2d4db628f597732be9c6856 References: <20210917065436.145629-1-chanho61.park@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org To skip exynos_ufs_config_phy_*_attr settings for exynos-ufs variant, this patch provides EXYNOS_UFS_OPT_SKIP_CONFIG_PHY_ATTR as an opts flag. Cc: Alim Akhtar Cc: Kiwoong Kim Cc: Krzysztof Kozlowski Signed-off-by: Chanho Park --- drivers/scsi/ufs/ufs-exynos.c | 6 ++++-- drivers/scsi/ufs/ufs-exynos.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c index a3160d9bd234..73833c186ca9 100644 --- a/drivers/scsi/ufs/ufs-exynos.c +++ b/drivers/scsi/ufs/ufs-exynos.c @@ -831,8 +831,10 @@ static int exynos_ufs_pre_link(struct ufs_hba *hba) /* m-phy */ exynos_ufs_phy_init(ufs); - exynos_ufs_config_phy_time_attr(ufs); - exynos_ufs_config_phy_cap_attr(ufs); + if (!(ufs->opts & EXYNOS_UFS_OPT_SKIP_CONFIG_PHY_ATTR)) { + exynos_ufs_config_phy_time_attr(ufs); + exynos_ufs_config_phy_cap_attr(ufs); + } exynos_ufs_setup_clocks(hba, true, POST_CHANGE); diff --git a/drivers/scsi/ufs/ufs-exynos.h b/drivers/scsi/ufs/ufs-exynos.h index bc4b8b0324bd..a0899aaa902e 100644 --- a/drivers/scsi/ufs/ufs-exynos.h +++ b/drivers/scsi/ufs/ufs-exynos.h @@ -200,6 +200,7 @@ struct exynos_ufs { #define EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL BIT(2) #define EXYNOS_UFS_OPT_BROKEN_RX_SEL_IDX BIT(3) #define EXYNOS_UFS_OPT_USE_SW_HIBERN8_TIMER BIT(4) +#define EXYNOS_UFS_OPT_SKIP_CONFIG_PHY_ATTR BIT(5) }; #define for_each_ufs_rx_lane(ufs, i) \ From patchwork Fri Sep 17 06:54:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 12501261 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=-19.1 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, URIBL_BLOCKED,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 DED9AC433F5 for ; Fri, 17 Sep 2021 06:55:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C7A586112E for ; Fri, 17 Sep 2021 06:55:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238531AbhIQG4y (ORCPT ); Fri, 17 Sep 2021 02:56:54 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:41835 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237536AbhIQG4u (ORCPT ); Fri, 17 Sep 2021 02:56:50 -0400 Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20210917065526epoutp03e7c78c64e6ec52dcbdea1580c1e9d0b2~liZgkdAsV0358503585epoutp03u for ; Fri, 17 Sep 2021 06:55:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20210917065526epoutp03e7c78c64e6ec52dcbdea1580c1e9d0b2~liZgkdAsV0358503585epoutp03u DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1631861726; bh=SF+TylNwyR/U94tOLtMFIcw7poD6m/7jdfvpy1q2hMc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mvo1Y2F9OR6HbuxsKsleV53UQox19y0TjUe7P1XRtEuUhUEpcDvRaF+LCgQvQkL0b HJN3MQp4rOIZrsD9FyDBLr6OYopH3jxPjWqHoZnQQc87DjGdKlvlY7uH77jbBj1uzx KHrAHZXkC8t1qmotrHEMZzYa8WK0XIuTTgnEXMN8= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20210917065525epcas2p4d34ef2541e92be5165116c7b357b0a0e~liZfzrddt1927619276epcas2p48; Fri, 17 Sep 2021 06:55:25 +0000 (GMT) Received: from epsmges2p1.samsung.com (unknown [182.195.40.183]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4H9l8D296Fz4x9Qb; Fri, 17 Sep 2021 06:55:24 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p1.samsung.com (Symantec Messaging Gateway) with SMTP id 33.C4.09717.CDB34416; Fri, 17 Sep 2021 15:55:24 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p2.samsung.com (KnoxPortal) with ESMTPA id 20210917065523epcas2p2cb63cd8924be44e6eaa42c7213bd15d4~liZeC0nzu3235032350epcas2p2u; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20210917065523epsmtrp1f02db5f0d43ea2d15203efb7f868467a~liZeAyYDN1045910459epsmtrp1C; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) X-AuditID: b6c32a45-4c1ff700000025f5-fb-61443bdcc533 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 3A.91.08750.BDB34416; Fri, 17 Sep 2021 15:55:23 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.51]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210917065523epsmtip29eaa470d0182145e5d0407014d75ed69~liZdxsq0T2196321963epsmtip2q; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) From: Chanho Park To: Alim Akhtar , Avri Altman , "James E . J . Bottomley" , "Martin K . Petersen" , Krzysztof Kozlowski Cc: Bean Huo , Bart Van Assche , Adrian Hunter , Christoph Hellwig , Can Guo , Jaegeuk Kim , Gyunghoon Kwon , linux-samsung-soc@vger.kernel.org, linux-scsi@vger.kernel.org, Chanho Park , Kiwoong Kim Subject: [PATCH v3 12/17] scsi: ufs: ufs-exynos: factor out priv data init Date: Fri, 17 Sep 2021 15:54:31 +0900 Message-Id: <20210917065436.145629-13-chanho61.park@samsung.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210917065436.145629-1-chanho61.park@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAA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Kbvcsk3fqL+It9Jo0JbhMjYrZ3 +hz5HRaT1nnT85nsRUFeRrdpri+a2c3nPF3363MsVwXf+eIdTw/a3LjBFjFt5pS6uO0rJ/3d 4ml8M2Sq3strdax//d41sKpemM5vdqi4g+PUy0SlwxWc5247/e9KXfVg55zt+9hyZ55JO8PR HuvlL767ud3iu7oom0tawXXeVM3LE20+Xzx2fOofjgVSJ7f++e/2lHPxA6WP3lv0ebp3y/53 CxEX5Qyy6Y21bT2gxFKckWioxVxUnAgAx0iLXyUDAAA= X-CMS-MailID: 20210917065523epcas2p2cb63cd8924be44e6eaa42c7213bd15d4 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210917065523epcas2p2cb63cd8924be44e6eaa42c7213bd15d4 References: <20210917065436.145629-1-chanho61.park@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org To be used this assignment code for other variant exynos-ufs driver, this patch factors out the codes as inline code. Cc: Alim Akhtar Cc: Kiwoong Kim Cc: Krzysztof Kozlowski Signed-off-by: Chanho Park --- drivers/scsi/ufs/ufs-exynos.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c index 73833c186ca9..753b22358186 100644 --- a/drivers/scsi/ufs/ufs-exynos.c +++ b/drivers/scsi/ufs/ufs-exynos.c @@ -951,6 +951,18 @@ static int exynos_ufs_parse_dt(struct device *dev, struct exynos_ufs *ufs) return ret; } +static inline void exynos_ufs_priv_init(struct ufs_hba *hba, + struct exynos_ufs *ufs) +{ + ufs->hba = hba; + ufs->opts = ufs->drv_data->opts; + ufs->rx_sel_idx = PA_MAXDATALANES; + if (ufs->opts & EXYNOS_UFS_OPT_BROKEN_RX_SEL_IDX) + ufs->rx_sel_idx = 0; + hba->priv = (void *)ufs; + hba->quirks = ufs->drv_data->quirks; +} + static int exynos_ufs_init(struct ufs_hba *hba) { struct device *dev = hba->dev; @@ -1000,13 +1012,8 @@ static int exynos_ufs_init(struct ufs_hba *hba) if (ret) goto phy_off; - ufs->hba = hba; - ufs->opts = ufs->drv_data->opts; - ufs->rx_sel_idx = PA_MAXDATALANES; - if (ufs->opts & EXYNOS_UFS_OPT_BROKEN_RX_SEL_IDX) - ufs->rx_sel_idx = 0; - hba->priv = (void *)ufs; - hba->quirks = ufs->drv_data->quirks; + exynos_ufs_priv_init(hba, ufs); + if (ufs->drv_data->drv_init) { ret = ufs->drv_data->drv_init(dev, ufs); if (ret) { From patchwork Fri Sep 17 06:54:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 12501285 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=-19.1 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, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 C38EFC433FE for ; Fri, 17 Sep 2021 06:55:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ACFF4610C8 for ; Fri, 17 Sep 2021 06:55:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237096AbhIQG5N (ORCPT ); Fri, 17 Sep 2021 02:57:13 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:41979 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbhIQG4y (ORCPT ); Fri, 17 Sep 2021 02:56:54 -0400 Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20210917065527epoutp03940b90ee20d4f009a9c5f1d4998344e3~liZheCCHG0421304213epoutp03N for ; Fri, 17 Sep 2021 06:55:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20210917065527epoutp03940b90ee20d4f009a9c5f1d4998344e3~liZheCCHG0421304213epoutp03N DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1631861727; bh=bMi1iTXc8FrS/kapkX5EHrKcnwoVV1Puibh6oHUmS9s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DNqNTBr4lZVP7FgCuH9k46MNLvkrQ3vt+FaAHN1CrFv0Y9LSmpJvF9Ru8gONvKayx Gf/uFnEhijFq//7xDSjHmmGg8pEkDurHy9FfWE+MgMcoIokJECV/LqLEWBjWx6wtth O8NC0tueLZbm9R/tE/jo/0kSSwsZXAxk0EE05S+k= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20210917065526epcas2p3995fb2ef939fcd2b50c561a90f04a7c8~liZgqLXCV1851718517epcas2p3k; Fri, 17 Sep 2021 06:55:26 +0000 (GMT) Received: from epsmges2p4.samsung.com (unknown [182.195.40.185]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4H9l8F003bz4x9Q6; Fri, 17 Sep 2021 06:55:24 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id 27.DF.09472.CDB34416; Fri, 17 Sep 2021 15:55:24 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p4.samsung.com (KnoxPortal) with ESMTPA id 20210917065523epcas2p4fc1be41c739361dd6ae9d167cfc631dc~liZeJx6pm2819628196epcas2p4T; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20210917065523epsmtrp25f6ac0864d4eb03acb130c19f145f7a7~liZeIbne11373513735epsmtrp2F; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) X-AuditID: b6c32a48-d75ff70000002500-4e-61443bdc8e39 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 22.20.09091.BDB34416; Fri, 17 Sep 2021 15:55:23 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.51]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210917065523epsmtip21934ac324ca70ff0d8b72ef8386aac13~liZd22ZVA2196221962epsmtip2c; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) From: Chanho Park To: Alim Akhtar , Avri Altman , "James E . J . Bottomley" , "Martin K . Petersen" , Krzysztof Kozlowski Cc: Bean Huo , Bart Van Assche , Adrian Hunter , Christoph Hellwig , Can Guo , Jaegeuk Kim , Gyunghoon Kwon , linux-samsung-soc@vger.kernel.org, linux-scsi@vger.kernel.org, Chanho Park , Kiwoong Kim Subject: [PATCH v3 13/17] scsi: ufs: ufs-exynos: add pre/post_hce_enable drv callbacks Date: Fri, 17 Sep 2021 15:54:32 +0900 Message-Id: <20210917065436.145629-14-chanho61.park@samsung.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210917065436.145629-1-chanho61.park@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA01TfUxbVRzNfa88HgjzUYbeEYSmSraxwFqkcIcroIB7BtQmM2qmsbzACxBK W/qKjsUtKBkf69g6RhiUjyg4x9AUBh0wvoYFRZhhE1hkhKHbqoQaJl8bAxVs+1jkv3N/v3P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ndWMeU0/VZYUqZg03SzNpHjRMPaMiFvbo4 M+GQ0voN7X8upOg/OLP4x3/pT/9+/9Y1Oc+1Uu9K0MdsQau/F72lV7ErCpkmzHlao7qrmuNX g4/ikfhvH/67KbEUZyQaajEXFScCAAsHulQmAwAA X-CMS-MailID: 20210917065523epcas2p4fc1be41c739361dd6ae9d167cfc631dc X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210917065523epcas2p4fc1be41c739361dd6ae9d167cfc631dc References: <20210917065436.145629-1-chanho61.park@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org This patch adds driver-specific pre/post_hce_enable callbacks to execute extra initializations before and after hce_enable_notify callback. Cc: Alim Akhtar Cc: Kiwoong Kim Cc: Krzysztof Kozlowski Signed-off-by: Chanho Park Reviewed-by: Alim Akhtar --- drivers/scsi/ufs/ufs-exynos.c | 10 ++++++++++ drivers/scsi/ufs/ufs-exynos.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c index 753b22358186..7fb4514f700d 100644 --- a/drivers/scsi/ufs/ufs-exynos.c +++ b/drivers/scsi/ufs/ufs-exynos.c @@ -1141,6 +1141,12 @@ static int exynos_ufs_hce_enable_notify(struct ufs_hba *hba, switch (status) { case PRE_CHANGE: + if (ufs->drv_data->pre_hce_enable) { + ret = ufs->drv_data->pre_hce_enable(ufs); + if (ret) + return ret; + } + ret = exynos_ufs_host_reset(hba); if (ret) return ret; @@ -1150,6 +1156,10 @@ static int exynos_ufs_hce_enable_notify(struct ufs_hba *hba, exynos_ufs_calc_pwm_clk_div(ufs); if (!(ufs->opts & EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL)) exynos_ufs_enable_auto_ctrl_hcc(ufs); + + if (ufs->drv_data->post_hce_enable) + ret = ufs->drv_data->post_hce_enable(ufs); + break; } diff --git a/drivers/scsi/ufs/ufs-exynos.h b/drivers/scsi/ufs/ufs-exynos.h index a0899aaa902e..c291ae51dd41 100644 --- a/drivers/scsi/ufs/ufs-exynos.h +++ b/drivers/scsi/ufs/ufs-exynos.h @@ -154,6 +154,8 @@ struct exynos_ufs_drv_data { struct ufs_pa_layer_attr *pwr); int (*post_pwr_change)(struct exynos_ufs *ufs, struct ufs_pa_layer_attr *pwr); + int (*pre_hce_enable)(struct exynos_ufs *ufs); + int (*post_hce_enable)(struct exynos_ufs *ufs); }; struct ufs_phy_time_cfg { From patchwork Fri Sep 17 06:54:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 12501289 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=-19.1 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, URIBL_BLOCKED,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 24C2CC433EF for ; Fri, 17 Sep 2021 06:56:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0C4AF6112E for ; Fri, 17 Sep 2021 06:56:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238806AbhIQG5V (ORCPT ); Fri, 17 Sep 2021 02:57:21 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:29122 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238537AbhIQG4y (ORCPT ); Fri, 17 Sep 2021 02:56:54 -0400 Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20210917065528epoutp04430608f8885ed4696082a4bea8431fcc~liZi2-QYz2951729517epoutp046 for ; Fri, 17 Sep 2021 06:55:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20210917065528epoutp04430608f8885ed4696082a4bea8431fcc~liZi2-QYz2951729517epoutp046 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1631861729; bh=Q+1FOwMmvt/UfNZkgGqvo73CngjvQQxZR7qopF6TtmI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VhjDvrKwVY8XE0LJ9MTMQSYsz7miJuNRvpAMJxgzGmVNkRKDQ0Fvwz5ZVo1Zgj1hn EqR3BZyBgem4UaQ3GwiN8X6MnYwmrcE8ZrBJRxHdjJvkJz9I89emmqMMTr0BM+Jg5M +eBiGoIqKkadDO4ffUkR1n5gE2XmNsGWbTXET988= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20210917065528epcas2p1800d6bb845fb30d89d4c5e34002e2125~liZiN61Zm0293602936epcas2p1S; Fri, 17 Sep 2021 06:55:28 +0000 (GMT) Received: from epsmges2p4.samsung.com (unknown [182.195.40.186]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4H9l8F00D1z4x9Q7; Fri, 17 Sep 2021 06:55:24 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id D8.DF.09472.CDB34416; Fri, 17 Sep 2021 15:55:24 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p4.samsung.com (KnoxPortal) with ESMTPA id 20210917065523epcas2p47156d9fba5b8d8a5e5908ccdc0ae1655~liZeH9Utn0164301643epcas2p4U; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20210917065523epsmtrp28e142187a5921e25f8eff88fd68e8466~liZeG5qgB1371513715epsmtrp2T; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) X-AuditID: b6c32a48-d75ff70000002500-50-61443bdce05f Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 6C.91.08750.BDB34416; Fri, 17 Sep 2021 15:55:23 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.51]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210917065523epsmtip2234377e40163045a1196fbc91726c72e~liZd7tMHN1565515655epsmtip2o; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) From: Chanho Park To: Alim Akhtar , Avri Altman , "James E . J . Bottomley" , "Martin K . Petersen" , Krzysztof Kozlowski Cc: Bean Huo , Bart Van Assche , Adrian Hunter , Christoph Hellwig , Can Guo , Jaegeuk Kim , Gyunghoon Kwon , linux-samsung-soc@vger.kernel.org, linux-scsi@vger.kernel.org, Chanho Park , Kiwoong Kim Subject: [PATCH v3 14/17] scsi: ufs: ufs-exynos: support exynosauto v9 ufs driver Date: Fri, 17 Sep 2021 15:54:33 +0900 Message-Id: <20210917065436.145629-15-chanho61.park@samsung.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210917065436.145629-1-chanho61.park@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA02TfUwbZRzHfe5uR2F0O1qUx8aXeupwaFlLKDs2GBPIPNkSiSS6MGd3oRdK LG3XAzYUTbdJRykQDC9jZaID3VhFOysw2gjyZpCZCBFwyNwAx0RYGG+TCTqw5brIf5/f7/l+ 83t5nkeAiq7jEkGGLos16hgtiQdgzV3bo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1o/TLm2mWUfW+ikFK81d5tXz8iV0JES2PMgITh1Tv39GzO0jknpTdt4 58zFpuUpWoc5tZRYijMSDbWYi4oTAZ455K4nAwAA X-CMS-MailID: 20210917065523epcas2p47156d9fba5b8d8a5e5908ccdc0ae1655 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210917065523epcas2p47156d9fba5b8d8a5e5908ccdc0ae1655 References: <20210917065436.145629-1-chanho61.park@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org This patch adds to support ufs variant for ExynosAuto v9 SoC. This requires control UFS IP sharability register via syscon and regmap. Regarding uic_attr, most of values can be shared with exynos7 except tx_dif_p_nsec value. Cc: Alim Akhtar Cc: Kiwoong Kim Cc: Krzysztof Kozlowski Signed-off-by: Chanho Park --- drivers/scsi/ufs/ufs-exynos.c | 96 +++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c index 7fb4514f700d..28f027d45917 100644 --- a/drivers/scsi/ufs/ufs-exynos.c +++ b/drivers/scsi/ufs/ufs-exynos.c @@ -15,6 +15,7 @@ #include #include #include +#include #include "ufshcd.h" #include "ufshcd-pltfrm.h" @@ -76,6 +77,12 @@ UIC_TRANSPORT_NO_CONNECTION_RX |\ UIC_TRANSPORT_BAD_TC) +/* FSYS UFS Shareability */ +#define UFS_WR_SHARABLE BIT(2) +#define UFS_RD_SHARABLE BIT(1) +#define UFS_SHARABLE (UFS_WR_SHARABLE | UFS_RD_SHARABLE) +#define UFS_SHAREABILITY_OFFSET 0x710 + enum { UNIPRO_L1_5 = 0,/* PHY Adapter */ UNIPRO_L2, /* Data Link */ @@ -151,6 +158,79 @@ static int exynos7_ufs_drv_init(struct device *dev, struct exynos_ufs *ufs) return 0; } +static int exynosauto_ufs_drv_init(struct device *dev, struct exynos_ufs *ufs) +{ + struct exynos_ufs_uic_attr *attr = ufs->drv_data->uic_attr; + + /* IO Coherency setting */ + if (ufs->sysreg) { + return regmap_update_bits(ufs->sysreg, UFS_SHAREABILITY_OFFSET, + UFS_SHARABLE, UFS_SHARABLE); + } + + attr->tx_dif_p_nsec = 3200000; + + return 0; +} + +static int exynosauto_ufs_pre_link(struct exynos_ufs *ufs) +{ + struct ufs_hba *hba = ufs->hba; + int i; + + ufshcd_dme_set(hba, UIC_ARG_MIB(0x200), 0x40); + for_each_ufs_rx_lane(ufs, i) { + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x12, i), + DIV_ROUND_UP(NSEC_PER_SEC, ufs->mclk_rate)); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x11, i), 0x0); + + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x1b, i), 0x2); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x1c, i), 0x8a); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x1d, i), 0xa3); + + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x1b, i), 0x2); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x1c, i), 0x8a); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x1d, i), 0xa3); + + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x2f, i), 0x79); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x84, i), 0x1); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x25, i), 0xf6); + } + + for_each_ufs_tx_lane(ufs, i) { + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0xaa, i), + DIV_ROUND_UP(NSEC_PER_SEC, ufs->mclk_rate)); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0xa9, i), 0x02); + + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0xab, i), 0x8); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0xac, i), 0x22); + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0xad, i), 0x8); + + ufshcd_dme_set(hba, UIC_ARG_MIB_SEL(0x04, i), 0x1); + } + + ufshcd_dme_set(hba, UIC_ARG_MIB(0x200), 0x0); + + ufshcd_dme_set(hba, UIC_ARG_MIB(PA_LOCAL_TX_LCC_ENABLE), 0x0); + + ufshcd_dme_set(hba, UIC_ARG_MIB(0xa011), 0x8000); + + return 0; +} + +static int exynosauto_ufs_pre_pwr_change(struct exynos_ufs *ufs, + struct ufs_pa_layer_attr *pwr) +{ + struct ufs_hba *hba = ufs->hba; + + /* PACP_PWR_req and delivered to the remote DME */ + ufshcd_dme_set(hba, UIC_ARG_MIB(PA_PWRMODEUSERDATA0), 12000); + ufshcd_dme_set(hba, UIC_ARG_MIB(PA_PWRMODEUSERDATA1), 32000); + ufshcd_dme_set(hba, UIC_ARG_MIB(PA_PWRMODEUSERDATA2), 16000); + + return 0; +} + static int exynos7_ufs_pre_link(struct exynos_ufs *ufs) { struct ufs_hba *hba = ufs->hba; @@ -1305,6 +1385,20 @@ static struct exynos_ufs_uic_attr exynos7_uic_attr = { .pa_dbg_option_suite = 0x30103, }; +static struct exynos_ufs_drv_data exynosauto_ufs_drvs = { + .uic_attr = &exynos7_uic_attr, + .quirks = UFSHCD_QUIRK_PRDT_BYTE_GRAN | + UFSHCI_QUIRK_SKIP_RESET_INTR_AGGR | + UFSHCD_QUIRK_BROKEN_OCS_FATAL_ERROR | + UFSHCD_QUIRK_SKIP_DEF_UNIPRO_TIMEOUT_SETTING, + .opts = EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL | + EXYNOS_UFS_OPT_SKIP_CONFIG_PHY_ATTR | + EXYNOS_UFS_OPT_BROKEN_RX_SEL_IDX, + .drv_init = exynosauto_ufs_drv_init, + .pre_link = exynosauto_ufs_pre_link, + .pre_pwr_change = exynosauto_ufs_pre_pwr_change, +}; + static struct exynos_ufs_drv_data exynos_ufs_drvs = { .uic_attr = &exynos7_uic_attr, .quirks = UFSHCD_QUIRK_PRDT_BYTE_GRAN | @@ -1330,6 +1424,8 @@ static struct exynos_ufs_drv_data exynos_ufs_drvs = { static const struct of_device_id exynos_ufs_of_match[] = { { .compatible = "samsung,exynos7-ufs", .data = &exynos_ufs_drvs }, + { .compatible = "samsung,exynosautov9-ufs", + .data = &exynosauto_ufs_drvs }, {}, }; From patchwork Fri Sep 17 06:54:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 12501291 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=-19.1 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, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 6DB78C433F5 for ; Fri, 17 Sep 2021 06:56:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 54C4561130 for ; Fri, 17 Sep 2021 06:56:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238574AbhIQG5Z (ORCPT ); Fri, 17 Sep 2021 02:57:25 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:20519 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237759AbhIQG4y (ORCPT ); Fri, 17 Sep 2021 02:56:54 -0400 Received: from epcas2p3.samsung.com (unknown [182.195.41.55]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20210917065528epoutp022eca53e534a189ed7948b39e9ed6262c~liZh9lU_x3012130121epoutp02Q for ; Fri, 17 Sep 2021 06:55:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20210917065528epoutp022eca53e534a189ed7948b39e9ed6262c~liZh9lU_x3012130121epoutp02Q DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1631861728; bh=2cxtXvSnrsfGtmMqNe57p9BQZ/+NU7OTSJ4Hv/2wzNw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UIjyW6K/1cZjQEcdapN6WkafL12wW5NztQnW1wf+GU6tm91Cj/OImsOAx25x5RBy5 QtJvUp416KfRNFMb/EhWinbzdDxvU8oU3kaNM51kQkP53szWDW5WQletn5nMan7gBV VYSlHrS5VWneDeAPUeHU6krrRJrUV8xYD2ii0glM= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20210917065527epcas2p4d3167fac34bf2df153f9809adf20c558~liZhM1fzo1927619276epcas2p4_; Fri, 17 Sep 2021 06:55:27 +0000 (GMT) Received: from epsmges2p3.samsung.com (unknown [182.195.40.185]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4H9l8D43w2z4x9Ps; Fri, 17 Sep 2021 06:55:24 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id DD.ED.09749.CDB34416; Fri, 17 Sep 2021 15:55:24 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p1.samsung.com (KnoxPortal) with ESMTPA id 20210917065524epcas2p18a720757ef3c4fc08d4bc8d16f9fe7fe~liZeOa8vq0293102931epcas2p1d; Fri, 17 Sep 2021 06:55:24 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20210917065523epsmtrp1cc19f05c1553ccffef2464dc9c9436dc~liZeMDqAm1045910459epsmtrp1D; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) X-AuditID: b6c32a47-d29ff70000002615-b1-61443bdcfa89 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 7C.91.08750.BDB34416; Fri, 17 Sep 2021 15:55:23 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.51]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210917065523epsmtip2f1d2444ea930ba477395e6e0b961e8d4~liZeAw9jY2164221642epsmtip2g; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) From: Chanho Park To: Alim Akhtar , Avri Altman , "James E . J . Bottomley" , "Martin K . Petersen" , Krzysztof Kozlowski Cc: Bean Huo , Bart Van Assche , Adrian Hunter , Christoph Hellwig , Can Guo , Jaegeuk Kim , Gyunghoon Kwon , linux-samsung-soc@vger.kernel.org, linux-scsi@vger.kernel.org, Chanho Park , Kiwoong Kim Subject: [PATCH v3 15/17] scsi: ufs: ufs-exynos: multi-host configuration for exynosauto Date: Fri, 17 Sep 2021 15:54:34 +0900 Message-Id: <20210917065436.145629-16-chanho61.park@samsung.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210917065436.145629-1-chanho61.park@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA01TbUxTZxT2vbfcts66u4Lw2kVoSnQBBrRgy2WKU2n0omhIyH6MZZYLXEtn v9LbEjSY4dgUKCCIEa1AhCVlYW5k2EFtVCgfAWIYq2yCqERm94GZCHQ6JBms5XYZ/57nnOc8 55z3g4cKH2AinkZvpk16SivBNnK6+mPk8Y92KSlp0+BWYsR7HSOeNHdhxOzrnzHCPVPBIS7N v0aJxQ57CDHeE0dU3Uwn7ta2IoS3w4YSrZNdCPHd8yWEeOAY5BCXx+4ghHXCiRFtQy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RaD9SUDAAA= X-CMS-MailID: 20210917065524epcas2p18a720757ef3c4fc08d4bc8d16f9fe7fe X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210917065524epcas2p18a720757ef3c4fc08d4bc8d16f9fe7fe References: <20210917065436.145629-1-chanho61.park@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org UFS controller of ExynosAuto v9 SoC supports multi-host interface for I/O virtualization. In general, we're using para-virtualized driver to support a block device by several virtual machines. However, it should be relayed by backend driver. Multi-host functionality extends the host controller by providing register interfaces that can be used by each VM's ufs drivers respectively. By this, we can provide direct access to the UFS device for multiple VMs. It's similar with SR-IOV of PCIe. We divide this M-HCI as PH(Physical Host) and VHs(Virtual Host). The PH supports all UFSHCI functions(all SAPs) same as conventional UFSHCI but the VH only supports data transfer function. Thus, except UTP_CMD_SAP and UTP_TMPSAP, the PH should handle all the physical features. This patch provides an initial implementation of PH part. M-HCI can support up to four interfaces but this patch initially supports only 1 PH and 1 VH. For this, we uses TASK_TAG[7:5] field so TASK_TAG[4:0] for 32 doorbel will be supported. After the PH is initiated, this will send a ready message to VHs through a mailbox register. The message handler is not fully implemented yet such as supporting reset / abort cases. Cc: Alim Akhtar Cc: Kiwoong Kim Cc: Krzysztof Kozlowski Signed-off-by: Chanho Park --- drivers/scsi/ufs/ufs-exynos.c | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c index 28f027d45917..0ca21cd8e76e 100644 --- a/drivers/scsi/ufs/ufs-exynos.c +++ b/drivers/scsi/ufs/ufs-exynos.c @@ -83,6 +83,21 @@ #define UFS_SHARABLE (UFS_WR_SHARABLE | UFS_RD_SHARABLE) #define UFS_SHAREABILITY_OFFSET 0x710 +/* Multi-host registers */ +#define MHCTRL 0xC4 +#define MHCTRL_EN_VH_MASK (0xE) +#define MHCTRL_EN_VH(vh) (vh << 1) +#define PH2VH_MBOX 0xD8 + +#define MH_MSG_MASK (0xFF) + +#define MH_MSG(id, msg) ((id << 8) | (msg & 0xFF)) +#define MH_MSG_PH_READY 0x1 +#define MH_MSG_VH_READY 0x2 + +#define HCI_MH_ALLOWABLE_TRAN_OF_VH 0x30C +#define HCI_MH_IID_IN_TASK_TAG 0X308 + enum { UNIPRO_L1_5 = 0,/* PHY Adapter */ UNIPRO_L2, /* Data Link */ @@ -173,6 +188,20 @@ static int exynosauto_ufs_drv_init(struct device *dev, struct exynos_ufs *ufs) return 0; } +static int exynosauto_ufs_post_hce_enable(struct exynos_ufs *ufs) +{ + struct ufs_hba *hba = ufs->hba; + + /* Enable Virtual Host #1 */ + ufshcd_rmwl(hba, MHCTRL_EN_VH_MASK, MHCTRL_EN_VH(1), MHCTRL); + /* Default VH Transfer permissions */ + hci_writel(ufs, 0x03FFE1FE, HCI_MH_ALLOWABLE_TRAN_OF_VH); + /* IID information is replaced in TASKTAG[7:5] instead of IID in UCD */ + hci_writel(ufs, 0x1, HCI_MH_IID_IN_TASK_TAG); + + return 0; +} + static int exynosauto_ufs_pre_link(struct exynos_ufs *ufs) { struct ufs_hba *hba = ufs->hba; @@ -231,6 +260,20 @@ static int exynosauto_ufs_pre_pwr_change(struct exynos_ufs *ufs, return 0; } +static int exynosauto_ufs_post_pwr_change(struct exynos_ufs *ufs, + struct ufs_pa_layer_attr *pwr) +{ + struct ufs_hba *hba = ufs->hba; + u32 enabled_vh; + + enabled_vh = ufshcd_readl(hba, MHCTRL) & MHCTRL_EN_VH_MASK; + + /* Send physical host ready message to virtual hosts */ + ufshcd_writel(hba, MH_MSG(enabled_vh, MH_MSG_PH_READY), PH2VH_MBOX); + + return 0; +} + static int exynos7_ufs_pre_link(struct exynos_ufs *ufs) { struct ufs_hba *hba = ufs->hba; @@ -1395,8 +1438,10 @@ static struct exynos_ufs_drv_data exynosauto_ufs_drvs = { EXYNOS_UFS_OPT_SKIP_CONFIG_PHY_ATTR | EXYNOS_UFS_OPT_BROKEN_RX_SEL_IDX, .drv_init = exynosauto_ufs_drv_init, + .post_hce_enable = exynosauto_ufs_post_hce_enable, .pre_link = exynosauto_ufs_pre_link, .pre_pwr_change = exynosauto_ufs_pre_pwr_change, + .post_pwr_change = exynosauto_ufs_post_pwr_change, }; static struct exynos_ufs_drv_data exynos_ufs_drvs = { From patchwork Fri Sep 17 06:54:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 12501293 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=-16.3 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, UNWANTED_LANGUAGE_BODY,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 5EA59C433EF for ; Fri, 17 Sep 2021 06:56:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 48BD56112E for ; Fri, 17 Sep 2021 06:56:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237759AbhIQG52 (ORCPT ); Fri, 17 Sep 2021 02:57:28 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:29072 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238596AbhIQG5A (ORCPT ); Fri, 17 Sep 2021 02:57:00 -0400 Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20210917065530epoutp04abe3a8b644281055adaadbea2bd77b2d~liZj7RDxP2951729517epoutp047 for ; Fri, 17 Sep 2021 06:55:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20210917065530epoutp04abe3a8b644281055adaadbea2bd77b2d~liZj7RDxP2951729517epoutp047 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1631861730; bh=QByzE0PugbXI92yPxUd44muSYhoKsxuDFtCR2Q52eIg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tazCGjU3v/71Vov9Jjo5Cu+NGJoi6kWeX8Dt+7fu2CwD7zxpnFJAUGLRHsAXwtBrK rTijfQD1+bBZAafW3F7FXBgF7APfOo05WTlWI2Oz+SXcFUNNemqEqXfaR572A6IpSK wlbzBwiT2qi9t6Ze3Yut7JWl7ITzgnNJ5xf5CYNw= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20210917065529epcas2p4d4a9a48ce5b511dec89627e101289f94~liZjH_A781208812088epcas2p4m; Fri, 17 Sep 2021 06:55:29 +0000 (GMT) Received: from epsmges2p3.samsung.com (unknown [182.195.40.188]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4H9l8F1HGqz4x9Qc; Fri, 17 Sep 2021 06:55:25 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id CF.ED.09749.DDB34416; Fri, 17 Sep 2021 15:55:25 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p3.samsung.com (KnoxPortal) with ESMTPA id 20210917065524epcas2p3929f70cb0b62e6ca85a6f4814b61fae1~liZeTkAr80100601006epcas2p3s; Fri, 17 Sep 2021 06:55:24 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20210917065524epsmtrp1a1fd6546680ff0f596803658911958d4~liZeSsXP31077210772epsmtrp1s; Fri, 17 Sep 2021 06:55:24 +0000 (GMT) X-AuditID: b6c32a47-d29ff70000002615-b8-61443bdc4294 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 33.20.09091.BDB34416; Fri, 17 Sep 2021 15:55:23 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.51]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210917065523epsmtip25ca47777b0fc632eb5453959892ce33d~liZeFmA482199021990epsmtip2u; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) From: Chanho Park To: Alim Akhtar , Avri Altman , "James E . J . Bottomley" , "Martin K . Petersen" , Krzysztof Kozlowski Cc: Bean Huo , Bart Van Assche , Adrian Hunter , Christoph Hellwig , Can Guo , Jaegeuk Kim , Gyunghoon Kwon , linux-samsung-soc@vger.kernel.org, linux-scsi@vger.kernel.org, Chanho Park , Kiwoong Kim Subject: [PATCH v3 16/17] scsi: ufs: ufs-exynos: introduce exynosauto v9 virtual host Date: Fri, 17 Sep 2021 15:54:35 +0900 Message-Id: <20210917065436.145629-17-chanho61.park@samsung.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210917065436.145629-1-chanho61.park@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrJJsWRmVeSWpSXmKPExsWy7bCmqe5da5dEg9lvmS1OPlnDZvFg3jY2 i5c/r7JZHHzYyWIx7cNPZotP65exWlzer23Rs9PZ4vSERUwWT9bPYrZYdGMbk8XGtz+YLG5u OcpiMeP8PiaL7us72CyWH//H5CDgcfmKt8eshl42j8t9vUwem1doeSze85LJY9OqTjaPCYsO MHp8X9/B5vHx6S0Wj74tqxg9Pm+S82g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fwwX7hPfuXKbEUZyQaajEXFScCAPouFuwlAwAA X-CMS-MailID: 20210917065524epcas2p3929f70cb0b62e6ca85a6f4814b61fae1 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210917065524epcas2p3929f70cb0b62e6ca85a6f4814b61fae1 References: <20210917065436.145629-1-chanho61.park@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org This patch introduces virtual host driver of exynosauto v9 ufs mHCI. VH(Virtual Host) only supports data transfer functions. So, most of physical features are broken. So, we need to set below quirks. - UFSHCD_QUIRK_BROKEN_UIC_CMD - UFSHCD_QUIRK_SKIP_PH_CONFIGURATION Before initialization, the VH is necessary to wait until PH is ready. It's implemented as polling at the moment. Cc: Alim Akhtar Cc: Kiwoong Kim Cc: Krzysztof Kozlowski Signed-off-by: Chanho Park --- drivers/scsi/ufs/ufs-exynos.c | 84 +++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c index 0ca21cd8e76e..2e71138ce566 100644 --- a/drivers/scsi/ufs/ufs-exynos.c +++ b/drivers/scsi/ufs/ufs-exynos.c @@ -98,6 +98,8 @@ #define HCI_MH_ALLOWABLE_TRAN_OF_VH 0x30C #define HCI_MH_IID_IN_TASK_TAG 0X308 +#define PH_READY_TIMEOUT_MS (5 * MSEC_PER_SEC) + enum { UNIPRO_L1_5 = 0,/* PHY Adapter */ UNIPRO_L2, /* Data Link */ @@ -1362,6 +1364,68 @@ static int exynos_ufs_resume(struct ufs_hba *hba, enum ufs_pm_op pm_op) return 0; } +static int exynosauto_ufs_vh_link_startup_notify(struct ufs_hba *hba, + enum ufs_notify_change_status status) +{ + if (status == POST_CHANGE) { + ufshcd_set_link_active(hba); + ufshcd_set_ufs_dev_active(hba); + hba->wlun_dev_clr_ua = true; + } + + return 0; +} + +static int exynosauto_ufs_vh_wait_ph_ready(struct ufs_hba *hba) +{ + u32 mbox; + ktime_t start, stop; + + start = ktime_get(); + stop = ktime_add(start, ms_to_ktime(PH_READY_TIMEOUT_MS)); + + do { + mbox = ufshcd_readl(hba, PH2VH_MBOX); + if ((mbox & MH_MSG_MASK) == MH_MSG_PH_READY) + return 0; + + usleep_range(40, 50); + } while (ktime_before(ktime_get(), stop)); + + return -ETIME; +} + +static int exynosauto_ufs_vh_init(struct ufs_hba *hba) +{ + struct device *dev = hba->dev; + struct platform_device *pdev = to_platform_device(dev); + struct exynos_ufs *ufs; + int ret; + + ufs = devm_kzalloc(dev, sizeof(*ufs), GFP_KERNEL); + if (!ufs) + return -ENOMEM; + + /* exynos-specific hci */ + ufs->reg_hci = devm_platform_ioremap_resource_byname(pdev, "vs_hci"); + if (IS_ERR(ufs->reg_hci)) { + dev_err(dev, "cannot ioremap for hci vendor register\n"); + return PTR_ERR(ufs->reg_hci); + } + + ret = exynosauto_ufs_vh_wait_ph_ready(hba); + if (ret) + return ret; + + ufs->drv_data = device_get_match_data(dev); + if (!ufs->drv_data) + return -ENODEV; + + exynos_ufs_priv_init(hba, ufs); + + return 0; +} + static struct ufs_hba_variant_ops ufs_hba_exynos_ops = { .name = "exynos_ufs", .init = exynos_ufs_init, @@ -1376,6 +1440,12 @@ static struct ufs_hba_variant_ops ufs_hba_exynos_ops = { .resume = exynos_ufs_resume, }; +static struct ufs_hba_variant_ops ufs_hba_exynosauto_vh_ops = { + .name = "exynosauto_ufs_vh", + .init = exynosauto_ufs_vh_init, + .link_startup_notify = exynosauto_ufs_vh_link_startup_notify, +}; + static int exynos_ufs_probe(struct platform_device *pdev) { int err; @@ -1444,6 +1514,18 @@ static struct exynos_ufs_drv_data exynosauto_ufs_drvs = { .post_pwr_change = exynosauto_ufs_post_pwr_change, }; +static struct exynos_ufs_drv_data exynosauto_ufs_vh_drvs = { + .vops = &ufs_hba_exynosauto_vh_ops, + .quirks = UFSHCD_QUIRK_PRDT_BYTE_GRAN | + UFSHCI_QUIRK_SKIP_RESET_INTR_AGGR | + UFSHCD_QUIRK_BROKEN_OCS_FATAL_ERROR | + UFSHCI_QUIRK_BROKEN_HCE | + UFSHCD_QUIRK_BROKEN_UIC_CMD | + UFSHCD_QUIRK_SKIP_PH_CONFIGURATION | + UFSHCD_QUIRK_SKIP_DEF_UNIPRO_TIMEOUT_SETTING, + .opts = EXYNOS_UFS_OPT_BROKEN_RX_SEL_IDX, +}; + static struct exynos_ufs_drv_data exynos_ufs_drvs = { .uic_attr = &exynos7_uic_attr, .quirks = UFSHCD_QUIRK_PRDT_BYTE_GRAN | @@ -1471,6 +1553,8 @@ static const struct of_device_id exynos_ufs_of_match[] = { .data = &exynos_ufs_drvs }, { .compatible = "samsung,exynosautov9-ufs", .data = &exynosauto_ufs_drvs }, + { .compatible = "samsung,exynosautov9-ufs-vh", + .data = &exynosauto_ufs_vh_drvs }, {}, }; From patchwork Fri Sep 17 06:54:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 12501283 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=-19.1 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, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 D7573C4332F for ; Fri, 17 Sep 2021 06:55:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C1747600AA for ; Fri, 17 Sep 2021 06:55:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238554AbhIQG5L (ORCPT ); Fri, 17 Sep 2021 02:57:11 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:29100 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238345AbhIQG4x (ORCPT ); Fri, 17 Sep 2021 02:56:53 -0400 Received: from epcas2p3.samsung.com (unknown [182.195.41.55]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20210917065527epoutp04d0f15d590a2c09af4673c83f5793d806~liZhxlpM83211432114epoutp04G for ; Fri, 17 Sep 2021 06:55:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20210917065527epoutp04d0f15d590a2c09af4673c83f5793d806~liZhxlpM83211432114epoutp04G DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1631861727; bh=EfDdgInvRVQk1SxsILiW23pixQaWv3kVKpzIW5Bh8JY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Og++8p6GdMIWXVBWRDBenIVoL7Dw69MszqRGx1DtLvJaPqXxR1kwO61EwyKalen6f qg6YoLnmRETN5zXjybGeJc8IpjH4WyP/3yhrfo5g29X/00d1KUBJJ+g0Mxk8C6gMZR vPEj5NSWNF7qA8gqQHfPBsUk/gOvgblpM7eGAkEk= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20210917065527epcas2p2ba4cbff02799c73d15ce1185a2a5c2fd~liZhLYchH0686706867epcas2p2p; Fri, 17 Sep 2021 06:55:27 +0000 (GMT) Received: from epsmges2p3.samsung.com (unknown [182.195.40.182]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4H9l8F1H3lz4x9Q0; Fri, 17 Sep 2021 06:55:25 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id DF.ED.09749.DDB34416; Fri, 17 Sep 2021 15:55:25 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p4.samsung.com (KnoxPortal) with ESMTPA id 20210917065524epcas2p455b2900227b6a20994bec4816248f2bf~liZefvRuU1208812088epcas2p4f; Fri, 17 Sep 2021 06:55:24 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20210917065524epsmtrp1c922e4181ebf1a591e99ca92446cd5e9~liZeetuVO1045910459epsmtrp1E; Fri, 17 Sep 2021 06:55:24 +0000 (GMT) X-AuditID: b6c32a47-d13ff70000002615-b7-61443bdc5715 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 7F.91.08750.CDB34416; Fri, 17 Sep 2021 15:55:24 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.51]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210917065523epsmtip2031752cbba97db9c812130b2ba136a7f~liZeKePuq2164221642epsmtip2h; Fri, 17 Sep 2021 06:55:23 +0000 (GMT) From: Chanho Park To: Alim Akhtar , Avri Altman , "James E . J . Bottomley" , "Martin K . Petersen" , Krzysztof Kozlowski Cc: Bean Huo , Bart Van Assche , Adrian Hunter , Christoph Hellwig , Can Guo , Jaegeuk Kim , Gyunghoon Kwon , linux-samsung-soc@vger.kernel.org, linux-scsi@vger.kernel.org, Chanho Park , Rob Herring , devicetree@vger.kernel.org Subject: [PATCH v3 17/17] dt-bindings: ufs: exynos-ufs: add exynosautov9 compatible Date: Fri, 17 Sep 2021 15:54:36 +0900 Message-Id: <20210917065436.145629-18-chanho61.park@samsung.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210917065436.145629-1-chanho61.park@samsung.com> MIME-Version: 1.0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PvioeXmJ8uXvNhOUz3i+KcPFY8n5SwaNKhigV1rUPVzp/e7yV7/N1A2dl7XVtMeJ/ Qx7cTPF9M235vfV7BXcrs4dHqQiKhAl8rf46TdUgfo6Nfcn+A1utHi7YJJuSfPF55/Ol54LZ Nf9+/Np53K094NV7G/Z2A6lJS6Supeetz/MyEhCs87Jz2+iqZ/a0l+dW24V8vbanzNMk53jt CgqKjLof37fk3+WL96tk17P9Otx2Vtz5X5Cka4BW8cpzvxsDtv+3u9XNYrKA8Xunlyv/qn/H LduP99/ulpvXeVJ9smyAEktxRqKhFnNRcSIAmKsqWyoDAAA= X-CMS-MailID: 20210917065524epcas2p455b2900227b6a20994bec4816248f2bf X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210917065524epcas2p455b2900227b6a20994bec4816248f2bf References: <20210917065436.145629-1-chanho61.park@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Below two compatibles can be used for exynosautov9 SoC UFS controller. - samsung,exynosautov9-ufs: ExynosAutov9 UFS Physical Host - samsung,exynosautov9-ufs-vh: ExynosAutov9 UFS Virtual Host Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Chanho Park Acked-by: Rob Herring --- Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml b/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml index c3f14f81d4b7..832f0770433e 100644 --- a/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml +++ b/Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml @@ -20,6 +20,8 @@ properties: compatible: enum: - samsung,exynos7-ufs + - samsung,exynosautov9-ufs + - samsung,exynosautov9-ufs-vh reg: items: