Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp84627pxb; Thu, 21 Jan 2021 01:46:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJzLiHuEMfjLa+wwr6QiDjxX2qhurEEItRzrmdfSnkC+7WhvvbKcC9AomvGSpjMObT1JEtgU X-Received: by 2002:a05:6402:5112:: with SMTP id m18mr10720921edd.129.1611222364965; Thu, 21 Jan 2021 01:46:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611222364; cv=none; d=google.com; s=arc-20160816; b=fqAGFOepwuK0kw37Hl51FXoNYLXZ2EIFPxpJOpq04ONqa1yf+hkvvUZTNFPjd3mhwh oWMNOCGj++Bf0XrqTaDsw/aebE6MLjni6VxcKbkw4XtihHv7YQEmgHBOR9vJ5PzVVEJ4 Tf27o2N5ztUQIdwwaGfPkgpfwpr+mQaUW0SymcFhoawIkuFPoCgXzlCY0iPCUIdFVfJj uEwU91mt75RM6/HG1VafA0V2quUElWha7AEWL0soHsUlL9J4SL9xX0TNIz8/HDBeVGb/ /CnpXAuLd6FFNVikuZiBXySj+ZPYPf6hxGdK1Gv+yd7rOR9hfGE2At9MQrzWU934p55B vBAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :dkim-signature; bh=NAI4d5E5IrpOA+2Fee0JWaMo5gtggjAam42jIHHHqBY=; b=wYz4NO6UQOAYaaQUy2IdVP8xyjKdCMpZ4XikmNaiacPjQcLNB5FOI8g2HVQ5DJGlA0 vg4t2zeUqscpPt+jhLfpyxpqG1PkpiTu4siFqw7e6V/b1D/W4KgFD472RnYsi23aOcbZ Pr1Eny2YxT/tPlm0CRCCmhBP7u/lvEzMt+EzrGAONp+1+yMDZjzi0ucTSvVX2OJYQB5w xdQ3+/I88/zoY/owMRVjVG/MOXNpqGEUGUEkHxwirZgo0ET52qQE18J8bLVCvuhskBjo WOR5TVlBbPSLCQbPnNmEHuV9EaqfLsPOzw8Qv6jiFztvIARdIQqx4uqPoG/I0H0vGbHr cuNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=anJb+frY; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id zh18si1314447ejb.182.2021.01.21.01.45.41; Thu, 21 Jan 2021 01:46:04 -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=@walle.cc header.s=mail2016061301 header.b=anJb+frY; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728677AbhAUJmp (ORCPT + 99 others); Thu, 21 Jan 2021 04:42:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728708AbhAUJmJ (ORCPT ); Thu, 21 Jan 2021 04:42:09 -0500 Received: from ssl.serverraum.org (ssl.serverraum.org [IPv6:2a01:4f8:151:8464::1:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0336C061757; Thu, 21 Jan 2021 01:41:28 -0800 (PST) Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id A0A4A22F99; Thu, 21 Jan 2021 10:41:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1611222086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NAI4d5E5IrpOA+2Fee0JWaMo5gtggjAam42jIHHHqBY=; b=anJb+frYYEwtl/9Poa+3LMZp4un6EwNIczpFjFWTZmKRlsOVL0GcfBOWegWsTBm+zD6Z1x EtlAtIbhIOLc9Gfisb3mDzfcs9L5PHHA86I7S5Q3BE6YxTql3/QMWVj7szmTCYiM90RCxq ljpPKCVwwbJ8O2sOnntn4XNVZZCWafE= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 21 Jan 2021 10:41:26 +0100 From: Michael Walle To: Claudiu.Beznea@microchip.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Nicolas.Ferre@microchip.com, davem@davemloft.net Subject: Re: [PATCH] net: macb: ignore tx_clk if MII is used In-Reply-To: <38734f00-e672-e694-1344-35f4dd68c90c@microchip.com> References: <20210120194303.28268-1-michael@walle.cc> <38734f00-e672-e694-1344-35f4dd68c90c@microchip.com> User-Agent: Roundcube Webmail/1.4.10 Message-ID: X-Sender: michael@walle.cc Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Claudiu, Am 2021-01-21 10:19, schrieb Claudiu.Beznea@microchip.com: > On 20.01.2021 21:43, Michael Walle wrote: >> EXTERNAL EMAIL: Do not click links or open attachments unless you know >> the content is safe >> >> If the MII interface is used, the PHY is the clock master, thus don't >> set the clock rate. On Zynq-7000, this will prevent the following >> warning: >> macb e000b000.ethernet eth0: unable to generate target frequency: >> 25000000 Hz >> > > Since in this case the PHY provides the TX clock and it provides the > proper > rate based on link speed, the MACB driver should not handle the > bp->tx_clk > at all (MACB driver uses this clock only for setting the proper rate on > it > based on link speed). So, I believe the proper fix would be to not pass > the > tx_clk at all in device tree. This clock is optional for MACB driver. Thanks for looking into this. I had the same thought. But shouldn't the driver handle this case gracefully? I mean it does know that the clock isn't needed at all. Ususually that clock is defined in a device tree include. So you'd have to redefine that node in an actual board file which means duplicating the other clocks. -michael