Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp226590pxb; Mon, 2 Nov 2020 19:59:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJy9zXh7SFZOA12BRS76ppW3ZyZ75LJOpa18YUf9HT+HLRuK+Fw4A8nA8bfpwQVCE3Uc/8qj X-Received: by 2002:a17:906:19c3:: with SMTP id h3mr18608780ejd.395.1604375964080; Mon, 02 Nov 2020 19:59:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604375964; cv=none; d=google.com; s=arc-20160816; b=euX25NT0URLwqMChFwj0bMT5UmPyfMwN0U9ZdENXcHPMSPakJMAOrurrQkHXZ0JKLQ mxEqpfo/zsE07yZkZte9dtCq9TS5bp5/bh3Nsjfwn4kN7F1eKgEtnH6/j0Cc+GMXmfhe viq5M/zoYd5bkw2xaUFoyPrEA1mxwDJjzGBZMMScSmzxmayCsWd//do/TIgloahXoHLP UTszjBKgC62natewtFrIB/EKfTsYMqMMAKwRPjEdva/A1mBuHKocn1Tbb3EOtMceogLc mDM+vh7Z68RVqee74M1x+41XkYDKR/lI/qZ80gJDb4icTasnWVYLnAwuuG5DVEia+1ym ya4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=hZea0eYsVNvA04vqZbladeZtJPWX5S3T1/tgGYMH90w=; b=cwwMkG9iuQTHKQxSVhoFUfi6H8Es1hooXavlUC2slldjdQ0NZ6RtKn1EMY+ubNCQB4 c+QDxAsDUK5L2SwxshF+vKUFKsgyGKFR/YZiuRRnXfM1e+TnOl00xhXJn23zNPzWv3wR fJjj7+rtQF3rh9B/XG5ozI2mHapa+Skm+6L4ktkYW2pxeEoJ9+iYPcMdYEmq6+UBcLcO mLooVerHN0n7gNQEtJSYI7MU/yZzI17hVHtEwDfSgMb7a56Xp+GE746l2YlMhBMPmAal Y6SgN8h16UFusI3caLxyIS48z4ugXoqYEdlrsdGHyjcwLMrN9+3wOFuEWrjQqx5MMlkF 6m2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=FObGxQAB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id us5si119658ejb.394.2020.11.02.19.59.02; Mon, 02 Nov 2020 19:59:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=FObGxQAB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727570AbgKCD4o (ORCPT + 99 others); Mon, 2 Nov 2020 22:56:44 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:41936 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727524AbgKCD4h (ORCPT ); Mon, 2 Nov 2020 22:56:37 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 0A33uVKo034219; Mon, 2 Nov 2020 21:56:31 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1604375791; bh=hZea0eYsVNvA04vqZbladeZtJPWX5S3T1/tgGYMH90w=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=FObGxQAB0JTtsgi1LopWVW5t6V+naJ6Y5+uakrUI0wlbaps3dl1xV8qVpbBt3AOdP 0Yl5XVLbOc+lGlxhyJgMiiU40CuA52HRCtfFQ3M0dqIG8HZeJ+SpgLC3bs+mgG4o4S pJH6bozlvDbIxJbKxhRjWzFi4WPSVbR45hx+YuGs= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 0A33uVrE112400 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 2 Nov 2020 21:56:31 -0600 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Mon, 2 Nov 2020 21:56:19 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Mon, 2 Nov 2020 21:56:19 -0600 Received: from a0393678-ssd.dal.design.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 0A33tuqQ101157; Mon, 2 Nov 2020 21:56:15 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Vinod Koul , Rob Herring , Philipp Zabel CC: Swapnil Kashinath Jakhade , Milind Parab , Yuti Suresh Amonkar , , Subject: [PATCH 5/9] phy: cadence: Sierra: Fix PHY power_on sequence Date: Tue, 3 Nov 2020 09:25:52 +0530 Message-ID: <20201103035556.21260-6-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201103035556.21260-1-kishon@ti.com> References: <20201103035556.21260-1-kishon@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 44d30d622821d ("phy: cadence: Add driver for Sierra PHY") de-asserts PHY_RESET even before the configurations are loaded in phy_init(). However PHY_RESET should be de-asserted only after all the configurations has been initialized, instead of de-asserting in probe. Fix it here. Fixes: 44d30d622821d ("phy: cadence: Add driver for Sierra PHY") Signed-off-by: Kishon Vijay Abraham I --- drivers/phy/cadence/phy-cadence-sierra.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/phy/cadence/phy-cadence-sierra.c b/drivers/phy/cadence/phy-cadence-sierra.c index 4429f41a8f58..e08548417bce 100644 --- a/drivers/phy/cadence/phy-cadence-sierra.c +++ b/drivers/phy/cadence/phy-cadence-sierra.c @@ -319,6 +319,12 @@ static int cdns_sierra_phy_on(struct phy *gphy) u32 val; int ret; + ret = reset_control_deassert(sp->phy_rst); + if (ret) { + dev_err(dev, "Failed to take the PHY out of reset\n"); + return ret; + } + /* Take the PHY lane group out of reset */ ret = reset_control_deassert(ins->lnk_rst); if (ret) { @@ -621,7 +627,6 @@ static int cdns_sierra_phy_probe(struct platform_device *pdev) pm_runtime_enable(dev); phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate); - reset_control_deassert(sp->phy_rst); return PTR_ERR_OR_ZERO(phy_provider); put_child: -- 2.17.1