From patchwork Fri Jan 20 07:17:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Garg X-Patchwork-Id: 644610 Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp638030pvb; Thu, 19 Jan 2023 23:19:10 -0800 (PST) X-Google-Smtp-Source: AMrXdXt1hiVKlf/peC8XCpSMSSfuYgC//BT0ksh/wW7lc+7C+kuQYDVn9ZyHWUtVvwtvL8gbPgxa X-Received: by 2002:a05:6830:3192:b0:686:55fc:924 with SMTP id p18-20020a056830319200b0068655fc0924mr4889819ots.10.1674199150609; Thu, 19 Jan 2023 23:19:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674199150; cv=none; d=google.com; s=arc-20160816; b=EoyMlKVznEeCbY6fIawPql+Y/DNK1n9oG+0yneUB5KpJglo9wqKMv2SrSJZqyGQljg dHoUpVnDzIWOs1jVSk62vLzn11dnRgbsciSU6CpAje0i4mdx0Xkj0fX39PbGm0Czd3hb qG9x2cAomHaLFAQ40p3crlOv29Udy8KCg3f4rF2LToE5GXmDPwgJJjkU7xM1fhnf1Ipb Ng4zBTXmC+h+NamNZjFlVXa8qks71sSJGG2qcCA1cbdNvdreru/szTl13+QHegCEeZgo FI82f9KsY4/HBqgFKMjrZHth39TBhVSW61BcNQZ0W4wmHn3M/NGE9wx1nCLU/6WxDC+b u7jA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nQ4N2iEXD19K17SmVs7Q6jYkWQq8B8obtRDPStpvTrA=; b=ZIcEHcnmWCth5nGJuCCwhNLKCLVNVKKIPNzOpadDj08YLS7nM+D08mAVC1WBuSPywr 7deS71ql52BbI0x39gEyylMQYBTLnvM0spyJFhqET00WLjQulgplU4vW7E88BbBwYQqD FG+RGB7kmC94SddS++kfnZfgd1N/f6BAbdDXCZ+KQIU71ei6YmQ/c8//Mkcq9jJOqmu2 cipl2uiAUlmcfqZaA0l+EApjsMnVKzqaz6CHN7EYnmNhOuJE9AlDhoeEuVPw4U6YuxQz 7dsBExwQpNeF0FT8nrUt62fILGZTTLLLEpCTyNKjIJlpGFJzbryOEgMIZSDqyYa5CBia DvuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Yqjv+1Zw; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id f18-20020a056830205200b00684a2a98118si20550269otp.38.2023.01.19.23.19.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 23:19:10 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Yqjv+1Zw; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 834AD856C0; Fri, 20 Jan 2023 08:18:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="Yqjv+1Zw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9E7BC856B9; Fri, 20 Jan 2023 08:18:07 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5EB63856A7 for ; Fri, 20 Jan 2023 08:18:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sumit.garg@linaro.org Received: by mail-pj1-x102d.google.com with SMTP id d8so4767434pjc.3 for ; Thu, 19 Jan 2023 23:18:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nQ4N2iEXD19K17SmVs7Q6jYkWQq8B8obtRDPStpvTrA=; b=Yqjv+1ZwVEIivYmCuaEe8GGTtAjmRGf+E1lMpf+Ig1p2SfrFjLivGSD1p/tynPDiQZ Br/g2HRPnd99w3s0pEj4sgr77RWmCVAtzH4UwkO6LYdRvbZS2gHqqHQXyzAjldAd+N+Q qqY+9xCPPL8LgZezfAPYq4ifqwGHjp/fTcO1xyfYHwGBA/JujFx7jqoK8gFpWlk3WUTk WuCfAa8qQR2Mxsnfg6S5BqpseybxCR18/HR8kGOfHch7iMuV0zTMnbIHbvntFuWbx0et mU1KYDMF8xTar+LH2hoZEf1geUtpH5Cw7VaLxjiTrj7VxorolfRmwQp9r19i+PVLFnNy 5dSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nQ4N2iEXD19K17SmVs7Q6jYkWQq8B8obtRDPStpvTrA=; b=rSNe43hf6qdeUEoO8ZhUdglFChSHn163mIM7nCzFwi8YrQYmk44/qvsu8vNYETG0hG pFjPRqBEI0Fw7oRxf1ZmhD/P2DKRgk3aLrcfS0JRtRRF726KSECYG7D1QOHOKtpftN4E aNYXGkakCmLmiQDvee5YWA5AoT/FdPjjzHix/zJaG5fYuv9VTGxWTNV50CdtCi7ltXwW G91GroA+iBmW9AjWaURkuiEgshV+B1lxAjDg8hESGmQBzhvV8DC2mCwBUGvwVY60L2Lw j6fR7WXlRqcuNI0vOV54dQ/pYDx1V3tAlEe78zG38NZGJlI1bRzMjRFYb318V1AnTDfI aGTA== X-Gm-Message-State: AFqh2koXPy7TFGjN4F4tGQmALUdA3Dv7OGC+aGKas1Qfi4t+9VKzG64b OWoVD/vUsxodsZAGv7Bm5hfbyuLzYjDYkuQu X-Received: by 2002:a05:6a20:ce43:b0:9d:efbe:2066 with SMTP id id3-20020a056a20ce4300b0009defbe2066mr14481379pzb.28.1674199080883; Thu, 19 Jan 2023 23:18:00 -0800 (PST) Received: from sumit-X1.. ([223.178.212.120]) by smtp.gmail.com with ESMTPSA id x15-20020aa7956f000000b0058bacd6c4e8sm9797586pfq.207.2023.01.19.23.17.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 23:18:00 -0800 (PST) From: Sumit Garg To: u-boot@lists.denx.de Cc: rfried.dev@gmail.com, hs@denx.de, joe.hershberger@ni.com, stephan@gerhold.net, mworsfold@impinj.com, lgillham@impinj.com, jbrennan@impinj.com, nicolas.dechesne@linaro.org, vinod.koul@linaro.org, daniel.thompson@linaro.org, Sumit Garg Subject: [PATCH 06/14] net: dwc_eth_qos: Make eqos_get_tick_clk_rate callback optional Date: Fri, 20 Jan 2023 12:47:11 +0530 Message-Id: <20230120071719.623661-7-sumit.garg@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230120071719.623661-1-sumit.garg@linaro.org> References: <20230120071719.623661-1-sumit.garg@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Signed-off-by: Sumit Garg Reviewed-by: Ramon Fried --- drivers/net/dwc_eth_qos.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c index afc47b56ff..753a912607 100644 --- a/drivers/net/dwc_eth_qos.c +++ b/drivers/net/dwc_eth_qos.c @@ -774,10 +774,13 @@ static int eqos_start(struct udevice *dev) pr_err("eqos_calibrate_pads() failed: %d", ret); goto err_stop_resets; } - rate = eqos->config->ops->eqos_get_tick_clk_rate(dev); - val = (rate / 1000000) - 1; - writel(val, &eqos->mac_regs->us_tic_counter); + if (eqos->config->ops->eqos_get_tick_clk_rate) { + rate = eqos->config->ops->eqos_get_tick_clk_rate(dev); + + val = (rate / 1000000) - 1; + writel(val, &eqos->mac_regs->us_tic_counter); + } /* * if PHY was already connected and configured,