Re: [net-next PATCH v2 2/3] net: mdio: ipq4019: add support for clock-frequency property

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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);
+	}
  }




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux