From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B924DC43334 for ; Mon, 27 Jun 2022 10:31:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To:From:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lkeCDw/hcdT6Q2oomsWkv/BYAf9zmyFn0uboBTGECms=; b=ZAbq1Xm/iOtjdD lnYES1DYR0bvr4zYKdInEAkHYdwNFjc7TgpEwxxHc6LqsfWO12CxfRDsYTXfRUwpAzaZdVVxJnHcY OXC9/xb7KW25ZlfutMffUBtGvKkUXK2jGVxpYbs+U0fJU7EZqsGRRUMP2zCKrP8Un0NUbDT9tBhkd es3QGWDaLpkN1t5yEV7Wbrwx4l2rq56WaD3wnqX+tWOmwH2HCXDJONoLw3wYdzWEk+wTYVRgecft/ o6BluE5zWCMqmMaQnDjm9Of6a7efst2A/x6i3RoTDz35ZeFeL0+pJbHbwYbJFemmEbc/Nj7JRQrfJ EEldIk7tyAtlJYR9vRbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o5m0l-0007wB-OI; Mon, 27 Jun 2022 10:30:31 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o5m0i-0007tw-5B for linux-arm-kernel@lists.infradead.org; Mon, 27 Jun 2022 10:30:30 +0000 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20220627103020euoutp01b5e0dfe35074a48d9e3278fd142b30f1~8c47fcuK50163201632euoutp01Y for ; Mon, 27 Jun 2022 10:30:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20220627103020euoutp01b5e0dfe35074a48d9e3278fd142b30f1~8c47fcuK50163201632euoutp01Y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1656325820; bh=BS6P86w0wqnnnvMHN8gPRzZ4VXUHyI/WUBYzCf/0nYg=; h=Date:Subject:To:Cc:From:In-Reply-To:References:From; b=nWEvoffB2iJpaEO7E+WSXL+C0NAsXAix0zLtg6b3MJiv8Hgf1jMsCPJuwKJAwMmvr N1x7wilSmeNTIoWknraGi4uJzRhpuWHGTtuuXzYv49IE1cMP8AJzxuKRfFHqlzSnhj xoALnElNo0aKwIFI7XzhPqT2xlf7P3oU1oyBFYfA= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20220627103020eucas1p1f1af80654881a71f0006b3332a38e959~8c47Q7YlS3040130401eucas1p1y; Mon, 27 Jun 2022 10:30:20 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id B8.80.09580.CB689B26; Mon, 27 Jun 2022 11:30:20 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20220627103019eucas1p231b106b2ac894ad3818dd5fdc9e611f6~8c461fOL62315023150eucas1p2k; Mon, 27 Jun 2022 10:30:19 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220627103019eusmtrp261df4cf3f79978890ee10cd2d8402a62~8c460r7ua1616316163eusmtrp2V; Mon, 27 Jun 2022 10:30:19 +0000 (GMT) X-AuditID: cbfec7f5-9adff7000000256c-77-62b986bc1e94 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id CB.2F.09095.BB689B26; Mon, 27 Jun 2022 11:30:19 +0100 (BST) Received: from [106.210.134.192] (unknown [106.210.134.192]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220627103019eusmtip129ecc2c4a43753d04817c30db901d57d~8c46U02qg1080710807eusmtip1j; Mon, 27 Jun 2022 10:30:19 +0000 (GMT) Message-ID: <591f696f-b55c-d267-7fcb-74f7fd4a6900@samsung.com> Date: Mon, 27 Jun 2022 12:30:18 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: pci-exynos.c phy_init() usage Content-Language: en-US To: Krzysztof Kozlowski , Bjorn Helgaas , Jaehoon Chung , Jingoo Han Cc: =?UTF-8?Q?Krzysztof_Wilczy=c5=84ski?= , Alim Akhtar , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org From: Marek Szyprowski In-Reply-To: X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrPKsWRmVeSWpSXmKPExsWy7djPc7p72nYmGexaymHxYN42NotXZ9ay Wdz41cZqseLLTHaLva+3sls09Pxmtdj0+Bqrxdl5x9ksZpzfx+TA6bFz1l12j02rOtk87lzb w+bx5Mp0Jo/NS+o9+rasYvT4vEkugD2KyyYlNSezLLVI3y6BK2PRpHPsBSc4K3a8W8HewHib vYuRk0NCwETizL4FzCC2kMAKRonJp6O7GLmA7C+MEtdmn2WFcD4zSrxfc5cNpuPnzA8sEInl jBJPdrxghnA+Mkocf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YqlnaGwe a2VkqqRvZ5OSmpNZllqkb5egl7Fo0jn2ghOcFTverWBvYLzN3sXIySEhYCLxc+YHli5GDg4h gaWMEh+yIcIyEienNbBC2MISf651sXUxcgGVvGeUWPB1NwtIglfATuLu44VgRSwCqhKN69+z QcQFJU7OfAJWIyqQLNG85RATiC0soCVx79oGZhCbWUBc4taT+UwgQ0UEVjNKvNp9lAXEYRY4 zijxcN4Fdoh12xklXrccAhvFJmAo0fW2C2wFJ9DqLwuuQo0yk+ja2sUIYctLbH87h3kCo9As JJfMQrJxFpKWWUhaFjCyrGIUSS0tzk3PLTbUK07MLS7NS9dLzs/dxAiMzm3Hfm7ewTjv1Ue9 Q4xMHIyHGCU4mJVEeF9f35okxJuSWFmVWpQfX1Sak1p8iNEUGBwTmaVEk/OB6SGvJN7QzMDU 0MTM0sDU0sxYSZzXs6AjUUggPbEkNTs1tSC1CKaPiYNTqoGpdtrkToXDOy4kLXPa53mxXN/t dsGlgheqUzSvueevyfdLeZ3511Vmj97urAOpr+4d23zZSHNXb1+oYeqtrkLnV9en8Qfvm/5G wq+zd1qf9Zooy50hU+2l56+28f/hN9dsr1TAW7sT3Y/zgq0amHg/fHh1sYllafbkV08EH7hb Xi/eXpL6QDz015rivBeq6Se9HodMmmLJr5ZUoHbS5X/R1JBFCcdrQgpzV7f55W+79Ewq0654 0/t2/xO2yfN2371mzZPsfmVR/UaxVXcvv9g599s+SbePsxUjMsRSvfZtED2quPySQ5Hk8tkH e+Xn+fAe/1Ec2fg6q9D+p7WFLdeBh7zcpqVZz3XX205+VmijxFKckWioxVxUnAgAr4dHFVcD AAA= X-CMS-MailID: 20220627103019eucas1p231b106b2ac894ad3818dd5fdc9e611f6 X-Msg-Generator: CA X-RootMTR: 20220624180806eucas1p16a18d9598c0a08770b428cd58916b65d X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20220624180806eucas1p16a18d9598c0a08770b428cd58916b65d References: <20220624173541.GA1543581@bhelgaas> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220627_033028_666211_E53CBFBD X-CRM114-Status: GOOD ( 11.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, On 24.06.2022 20:07, Krzysztof Kozlowski wrote: > On 24/06/2022 19:35, Bjorn Helgaas wrote: >> In exynos_pcie_host_init() [1], we call: >> >> phy_reset(ep->phy); >> phy_power_on(ep->phy); >> phy_init(ep->phy); >> >> The phy_init() function comment [2] says it must be called before >> phy_power_on(). Is exynos doing this backwards? > Looks like. I don't have Exynos hardware with a PCI, so cannot > test/fix/verify. > > Luckily for Exynos ;-) it's not alone in this pattern: > drivers/net/ethernet/marvell/sky2.c > drivers/usb/dwc2/platform.c I've checked that on the real hardware. Swapping the order of phy_power_on and phy_init breaks driver operation. However pci-exynos is the only driver that uses the phy-exynos-pcie, so we can simply swap the content of the init and power_on in the phy driver to adjust the code to the right order. power_on/init and exit/power_off are also called one after the other in pci-exynos, without any activity between them, so we can also simply move all operation to one pair of the callback, like power_on/off. Krzysztof, which solution would you prefer? Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel