From patchwork Fri Nov 8 10:20:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 1192041 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=mediatek.com header.i=@mediatek.com header.b="B/YGvaE+"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 478m521Tfgz9s7T for ; Sat, 9 Nov 2019 03:32:06 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id EE4E7C21E68; Fri, 8 Nov 2019 16:29:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=RDNS_NONE,T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id AB1B0C21EF2; Fri, 8 Nov 2019 16:28:25 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 69338C21C38; Fri, 8 Nov 2019 10:30:52 +0000 (UTC) Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lists.denx.de (Postfix) with ESMTP id 96D86C21BE5 for ; Fri, 8 Nov 2019 10:30:51 +0000 (UTC) X-UUID: 6ff4760f751d4ea792816031493a3d9c-20191108 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=cm5eu0Wi6fzuVFpCEGtqyAB/L2gANreUEYjAm95at5w=; b=B/YGvaE+WO8DAedBLQD/Jr6dypmpQMJEKoFNwKYcRX/ClHGimo4+79/AOCsHHiMidUYVc6F7VcUpflJRgrIoA3ppS7s3DbLtXv5AwUpc38Rswt7dhEUFhc7lz5QykIgUADdMbPjelXZNNBCMhOD426GD4ssd5gFH9zpEuJ4SwTo=; X-UUID: 6ff4760f751d4ea792816031493a3d9c-20191108 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 773605967; Fri, 08 Nov 2019 18:21:07 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 8 Nov 2019 18:21:05 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 8 Nov 2019 18:21:03 +0800 From: Chunfeng Yun To: Lukasz Majewski , Ryder Lee , Weijie Gao Date: Fri, 8 Nov 2019 18:20:31 +0800 Message-ID: <1573208431-3506-7-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1573208431-3506-1-git-send-email-chunfeng.yun@mediatek.com> References: <1573208431-3506-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: 80718082FEE0312AFD1F0C45905F990645C473C47DAA2C6DEF2AC49D204155D52000:8 X-MTK: N X-Mailman-Approved-At: Fri, 08 Nov 2019 16:28:18 +0000 Cc: Tom Rini , u-boot@lists.denx.de, Chunfeng Yun , GSS_MTK_Uboot_upstream Subject: [U-Boot] [PATCH 7/7] phy: phy-mtk-tphy: make ref clock optional X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" If make the ref clock optional, no need refer to fixed-clock when the ref clock is always on or comes from oscillator directly. Signed-off-by: Chunfeng Yun --- drivers/phy/phy-mtk-tphy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/phy/phy-mtk-tphy.c b/drivers/phy/phy-mtk-tphy.c index c4fb404f20..fd33062ae4 100644 --- a/drivers/phy/phy-mtk-tphy.c +++ b/drivers/phy/phy-mtk-tphy.c @@ -338,7 +338,8 @@ static int mtk_tphy_probe(struct udevice *dev) tphy->phys[index] = instance; index++; - err = clk_get_by_index_nodev(subnode, 0, &instance->ref_clk); + err = clk_get_optional_nodev(subnode, "ref", + &instance->ref_clk); if (err) return err; }