Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp1305718imp; Fri, 22 Feb 2019 00:30:53 -0800 (PST) X-Google-Smtp-Source: AHgI3IaOVhroHW4I4LBoEt9hZB5euYv/nFF8qJZ+/GviTsp7OBolV0nu/BB4kI5bILpeGu52KUJU X-Received: by 2002:a65:468f:: with SMTP id h15mr2864569pgr.391.1550824253370; Fri, 22 Feb 2019 00:30:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550824253; cv=none; d=google.com; s=arc-20160816; b=XnD1Xlh3qIDvI40yA1/p73EDjCQsHIl7jvMuUvTU3/GBIcZc8mU7gYnE9TwKsMJWsH rElz+TZSJPiFqMYGtYxWnclUAUo8VfQeUzw96rKR9LLXS2LywI8gWqrGevUl6gyct3ta MggG2Y7DNNKK/HoE0FruyugebBTGqBzHY1+vzYqCigBuRTfkyk0mlj8cMHw8tJUSWqRV 8oUzNzOIHuQyxiHe5lxvupzon7SYba8L51LgHJQ2I81kTo9wZtW9uDmvkN8I9mRkXKHB YV96nUJc8GbJRsDV05mlWJBSv1EqjKSpN73d6YuP6gxevo244GGeg91i8p91oHpodNXL CSYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=m4Th7VOhu57MJOgTV1mVMwy/NEVI9YjkBq9+AlrRcA8=; b=K5Ce4RTKM6vzKAmbfZpwYCC3bEjEy3ZmkImr+NdoahgqySHy5PVzuiZnLgCp59vP3N Y9vAxTQ2ZOFtziCQxAaAl+D0ez6am0AKAyUOe6LmWugz5btGDuZE2wnI4MHuylKBq5Yz nw7zXCu89PtrQdsZRV5ODPbYd5L8/LegG7cbZQOAYVIEQdcnoT3cwj+s706VvBoTFy2r LP9PYGUhGcAOSQab+I+2/azpG0DxRtsk2wcybLzYGsStzEuSWQs0XRcAaXETzS215P9e 2BHqh1ZPMr0ffG98SEmEs1K2VCx0NuKrMTO0LSXy+QrJG39okfjdTHjGbU8CEOkd2yC+ NVlg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l3si789392plt.307.2019.02.22.00.30.38; Fri, 22 Feb 2019 00:30:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727325AbfBVI3u (ORCPT + 99 others); Fri, 22 Feb 2019 03:29:50 -0500 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:3620 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726818AbfBVI2t (ORCPT ); Fri, 22 Feb 2019 03:28:49 -0500 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1M8QeGY018117; Fri, 22 Feb 2019 09:28:31 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2qpc6xsdjh-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 22 Feb 2019 09:28:31 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 0732334; Fri, 22 Feb 2019 08:28:31 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas22.st.com [10.75.90.92]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id B350928AC; Fri, 22 Feb 2019 08:28:30 +0000 (GMT) Received: from SAFEX1HUBCAS23.st.com (10.75.90.47) by Safex1hubcas22.st.com (10.75.90.92) with Microsoft SMTP Server (TLS) id 14.3.361.1; Fri, 22 Feb 2019 09:28:30 +0100 Received: from localhost (10.201.23.166) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.361.1; Fri, 22 Feb 2019 09:28:29 +0100 From: Christophe Roullier To: , , , , , , CC: , , , , , , Subject: [PATCH V2 4/8] net: ethernet: stmmac: add management of clk_csr property Date: Fri, 22 Feb 2019 09:28:05 +0100 Message-ID: <1550824089-19961-5-git-send-email-christophe.roullier@st.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1550824089-19961-1-git-send-email-christophe.roullier@st.com> References: <1550824089-19961-1-git-send-email-christophe.roullier@st.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.201.23.166] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-02-22_06:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In Documentation stmmac.txt there is possibility to fixed CSR Clock range selection with property clk_csr. This patch add the management of this property For example to use it, add in your ethernet node DT: clk_csr = <3>; Signed-off-by: Christophe Roullier --- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index 2b800ce..3031f2b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -408,6 +408,9 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac) /* Default to phy auto-detection */ plat->phy_addr = -1; + /* Get clk_csr from device tree */ + of_property_read_u32(np, "clk_csr", &plat->clk_csr); + /* "snps,phy-addr" is not a standard property. Mark it as deprecated * and warn of its use. Remove this when phy node support is added. */ -- 2.7.4