Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1804168rdb; Sun, 4 Feb 2024 01:59:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IH6F8XwP9tI7iy5Mmsq9U0NmQqIpgKVJBFPqNEpZDhHxDMUm6B16XE33jvbAcU4xkH4w4Ha X-Received: by 2002:a2e:801a:0:b0:2cc:c6e0:fbb with SMTP id j26-20020a2e801a000000b002ccc6e00fbbmr6550933ljg.20.1707040790862; Sun, 04 Feb 2024 01:59:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707040790; cv=pass; d=google.com; s=arc-20160816; b=UPxDAk22UZSEykFBKOSk11jIEcNphVOnBCJF1qoj/Y8keGToqFAEf55/JjfwObpZQA mzEu+Txc8x07b9ojBfy+oHbNi2Ol3lieT7ndbz+Wdprj8A5rcp6YcxABC7j4mTg1IrwW U3h5UiS30D9CuLTOcisvyUenwywm+eroXEdrMR1gaOx4VFcOPDwF5XjcWvWyIeDtTtGE jtKQ+PHJx0Pw6Moz4ygHU4YzwpGQDpvGuePHn+N2jFXemwudYCHl8MFpiR6aiAwtslkb LsvKdrgmBgpmFKMX+JWNm6AcaGdc7ojBdgKN+F6X7KkhPgnVzhehqSJ0hxjDWXkJTdTU 1GEQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=tmDZogz+xOwkuZlnDnPxKEWbHLw0ooZZybvU2YEDlg4=; fh=xPIHAx0zbLqE/6IB6GhOC++Hz6K+fKff3y9SnZEEhLc=; b=J311/jZyGkJ7WwkVqKByy2i4Rvg/3VsEDbMCQf0xHylKy8N3wmahiqJKBQjdWoLyp7 WbYdW57IGg+7KewcxmXZczjUH9Dr75F8jWX1Qffyb1Qq/WGrCXdSvxhI2/8kNByoWpRR ssxnLfAYczryAijTr0MH8ZYQuddHa7N1FStw5/38e7Cr0LDs2oVcBE4V7JU6Vv1MaFtb WjLtOdpnggTZn+6ger2UoLT0vq8LxMZC0Gi3hSWVMZtxMWy7igVGd6XqAse3YJoYqcSL bjHPNQP6gbld2Rg7NfC3C1laeuf39yduQlG6nM3yyam5JHfAnBXCnxxZesNLjKLCv6s0 mnqw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=n7CYokBT; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-51570-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51570-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com X-Forwarded-Encrypted: i=1; AJvYcCUKOFz4KGnPjmgValUTn+EEFrCu9A15oWSYVDBzZ2fk08d1A0BM+LnySyvZidjvw2OIQBdxlNFyW5sxdOMfvY87RPEEDhBsZeu2sQcCBQ== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id bl20-20020a056402211400b0056054177f7fsi348127edb.635.2024.02.04.01.59.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 01:59:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51570-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=n7CYokBT; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-51570-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51570-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 96FF11F224AC for ; Sun, 4 Feb 2024 09:59:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1B5E91B7E2; Sun, 4 Feb 2024 09:59:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="n7CYokBT" Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B80B1B582; Sun, 4 Feb 2024 09:59:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707040777; cv=none; b=Acp1xXLc7tQeIliDw4UgPVupYFJBB/aG7Ug0x3CRGI2cvwiE3jaynmJ2woxE++z5ov9BfZrS3ndnFaU6o8+Vqmb/10H7nbQJPzxaM5mQ0dNgZbUDm6EZ66axrfm+pyiSFhc4FerN5gtbnwNTKFwMv8FtXfJrCmwGEup2Rg8vQck= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707040777; c=relaxed/simple; bh=PREsO0fDn5ks0m6BkKrklGoIT157BD8L8D9Y5xRwnpY=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=MWzBEiGH0RmmWiIded/rhGwpMFE4QYERGwntuTFdXv6EOcN1hLWHtVAvBVXrxVN0LN9zI38oRbWRwwrCbhTlPCYzN77tTIYQ5gPCGdzfNnrpL/JCKPHpL9akAIVH2k/RmyNfxesIA/es2WYsN5xw7ebXd2Rub9fAsufvI8l/4cs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=n7CYokBT; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4149uIou002651; Sun, 4 Feb 2024 09:59:18 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=tmDZogz+xOwkuZlnDnPxKEWbHLw0ooZZybvU2YEDlg4=; b=n7 CYokBTfMrYx4h15SvgxU1+rjFXTj0wKVA5iHN/WJrRwbFb5fsdwXaE7FsNsTNs1V g0bLdn/kKc1BWOIOErg8rI3sxXIJLlURYehbCwGep3jh4YaY4VNi2WYtI9kG2TGd l74c3qopTODCq1RigzKhY5+2haGrYJaNepipdQJFMZcj9jbO8N72Oxj0UfwfuCPE ld/7jAXddPXJtVRMNVTgNFpa2kN2oHHh6N8ZOA8WFSWPzNZkDoK6ChbdLCUcz+s2 /UNb2elfl/KXKjeXk3SPxYVg/7IBFrQqFeeB+LPzU2arXwUJI5sWn1b2q5Ar5GxI 4kOrEVIyjuB5uJ5cJtZA== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3w1f40sjd8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 04 Feb 2024 09:59:18 +0000 (GMT) Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 4149xHnA020742 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 4 Feb 2024 09:59:17 GMT Received: from [10.253.73.69] (10.80.80.8) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Sun, 4 Feb 2024 01:59:12 -0800 Message-ID: <7d86388d-15f5-4e72-b99f-aee3b47a5232@quicinc.com> Date: Sun, 4 Feb 2024 17:59:10 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [net-next PATCH v2 2/3] net: mdio: ipq4019: add support for clock-frequency property Content-Language: en-US To: Christian Marangi , Andy Gross , Bjorn Andersson , Konrad Dybcio , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrew Lunn , Heiner Kallweit , Russell King , Robert Marko , , , , References: <20240130003546.1546-1-ansuelsmth@gmail.com> <20240130003546.1546-3-ansuelsmth@gmail.com> From: Jie Luo In-Reply-To: <20240130003546.1546-3-ansuelsmth@gmail.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: RA8x5ZYS1QVVacm8q5u3nrlWgkvWcodj X-Proofpoint-GUID: RA8x5ZYS1QVVacm8q5u3nrlWgkvWcodj X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-04_08,2024-01-31_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 bulkscore=0 phishscore=0 lowpriorityscore=0 spamscore=0 adultscore=0 priorityscore=1501 impostorscore=0 suspectscore=0 mlxlogscore=999 clxscore=1015 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401310000 definitions=main-2402040076 On 1/30/2024 8:35 AM, Christian Marangi wrote: > + > + /* If div is /256 assume nobody have set this value and > + * try to find one MDC rate that is close the 802.3 spec of > + * 2.5MHz > + */ > + for (div = 256; div >= 8; div /= 2) { > + /* Stop as soon as we found a divider that > + * reached the closest value to 2.5MHz > + */ > + if (DIV_ROUND_UP(ahb_rate, div) > 2500000) > + break; Hi Christian, Sorry for the delayed review. The MDIO hardware block supports higher frequency 6.25M and 12.5M, Would you remove this 2.5MHZ limitation? On the IPQ platform, we normally use 6.25MHZ. > + > + priv->mdc_rate = DIV_ROUND_UP(ahb_rate, div); > + } > }