This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] AM4372:从4.19到6.1内核的补丁迁移

Guru**** 2487425 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1438523/am4372-patch-migration-from-4-19-to-6-1-kernel

器件型号:AM4372

工具与软件:

我们正在开发基于 AM437X-gp-EVM 的定制电路板、该电路板用于4.19内核生产。

有些补丁需要移植到6.1内核。  6.1内核和中缺少一些与更改相关的源文件

某些文件源代码已检修。  

在进行这些更改时需要我们的帮助。

补丁-1:6.1内核中缺少 omap_hwmod_43xx_data.c 文件。

From a675fbeac38457a5b7ffe275bbf6a24ea899aa88 Mon Sep 17 00:00:00 2001
From: Mohammad Jamal Mohiuddin <JamalMohiuddin.Mohammad@carrier.com>
Date: Thu, 25 Feb 2021 05:14:06 +0000
Subject: [PATCH] PIC6.1 Changes

---
 arch/arm/mach-omap2/omap_hwmod_43xx_data.c | 4 ++--
 drivers/tty/serial/omap-serial.c           | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
index aa271ac..8903ae6 100644
--- a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
@@ -1006,8 +1006,8 @@ int __init am43xx_hwmod_init(void)
 	omap_hwmod_init();
 	ret = omap_hwmod_register_links(am43xx_hwmod_ocp_ifs);
 
-	if (!ret && of_machine_is_compatible("ti,am4372"))
-		ret = omap_hwmod_register_links(am43xx_rtc_hwmod_ocp_ifs);
+//	if (!ret && of_machine_is_compatible("ti,am4372"))
+//		ret = omap_hwmod_register_links(am43xx_rtc_hwmod_ocp_ifs);
 
 	return ret;
 }
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index 0f4f41e..a439f6f 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -1903,6 +1903,7 @@ static const struct dev_pm_ops serial_omap_dev_pm_ops = {
 
 #if defined(CONFIG_OF)
 static const struct of_device_id omap_serial_of_match[] = {
+	{ .compatible = "ti,omap2-uart-pic61" },
 	{ .compatible = "ti,omap2-uart" },
 	{ .compatible = "ti,omap3-uart" },
 	{ .compatible = "ti,omap4-uart" },
-- 
2.7.4

补丁2

From f1c096776ccaec48ad65ae8ca705a49a2dd07f3e Mon Sep 17 00:00:00 2001
From: Sathish potla <Sathish.Potla@carrier.com>
Date: Sun, 28 Jul 2024 11:30:47 +0530
Subject: [PATCH] Disabled 100mbps as TI phy not working in 100mbps.

---
 drivers/net/phy/phy_device.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index cde6c242326a..66a5a310c636 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1680,10 +1680,13 @@ int genphy_config_init(struct phy_device *phydev)
 	if (val & BMSR_ANEGCAPABLE)
 		features |= SUPPORTED_Autoneg;
 
+/*For TI phy Generic phy driver used, TI Phy not working properly in 100mbps speed so disabled to work around 100mbps issue*/
+#if 0
 	if (val & BMSR_100FULL)
 		features |= SUPPORTED_100baseT_Full;
 	if (val & BMSR_100HALF)
 		features |= SUPPORTED_100baseT_Half;
+#endif
 	if (val & BMSR_10FULL)
 		features |= SUPPORTED_10baseT_Full;
 	if (val & BMSR_10HALF)
-- 
2.17.1

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Siva:

    对于 patch-1、hwmod 已被完全不同的名为 sysc 的框架替换。 顺便说一下、驱动程序 OMAP-serial.c 已不再在内核 v6.1中进行维护、您应该考虑迁移至驱动程序8250/8250_OMAP.c

    我不是以太网专家、但我认为以下6.1版内核修补程序应该等同于您的修补程序2。

    diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
    index f25b0d338ca8..8ae156f0021a 100644
    --- a/drivers/net/phy/phy_device.c
    +++ b/drivers/net/phy/phy_device.c
    @@ -2582,10 +2582,12 @@ int genphy_read_abilities(struct phy_device *phydev)
            linkmode_mod_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, phydev->supported,
                             val & BMSR_ANEGCAPABLE);
     
    +#if 0
            linkmode_mod_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT, phydev->supported,
                             val & BMSR_100FULL);
            linkmode_mod_bit(ETHTOOL_LINK_MODE_100baseT_Half_BIT, phydev->supported,
                             val & BMSR_100HALF);
    +#endif
            linkmode_mod_bit(ETHTOOL_LINK_MODE_10baseT_Full_BIT, phydev->supported,
                             val & BMSR_10FULL);
            linkmode_mod_bit(ETHTOOL_LINK_MODE_10baseT_Half_BIT, phydev->supported,

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    对于 patch-1、hwmod 已被完全不同的名为 sysc 的框架替换。

    请将我指向要查找更改的确切文件。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    hwmod 和 sysc 是不同的框架、请注意您的补丁-1不太可能直接适用于 sysc。 但下面是 sysc 驱动程序在内核中的位置:

    drivers/bus/ti-sysc.c