Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
DIOT Zynq Ultrascale-based System Board
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
8
Issues
8
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Projects
DIOT Zynq Ultrascale-based System Board
Commits
fb723524
Commit
fb723524
authored
Jul 21, 2021
by
Adam Wujek
Committed by
Adam Wujek
Aug 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw/petalinux/linux: add patches for ethernet PHY
Signed-off-by:
Adam Wujek
<
dev_public@wujek.eu
>
parent
5e334670
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
0 deletions
+68
-0
0001-net-xilinx_phy-Add-flag-to-reset-after-clock-enable.patch
...net-xilinx_phy-Add-flag-to-reset-after-clock-enable.patch
+29
-0
0002-net-macb-Handle-phy-reset-for-PCS-PMA-IP.patch
...-xlnx/0002-net-macb-Handle-phy-reset-for-PCS-PMA-IP.patch
+33
-0
devtool-fragment.cfg
...user/recipes-kernel/linux/linux-xlnx/devtool-fragment.cfg
+1
-0
linux-xlnx_%.bbappend
...spec/meta-user/recipes-kernel/linux/linux-xlnx_%.bbappend
+5
-0
No files found.
sw/petalinux/project-spec/meta-user/recipes-kernel/linux/linux-xlnx/0001-net-xilinx_phy-Add-flag-to-reset-after-clock-enable.patch
0 → 100644
View file @
fb723524
From 29b2379c80cfe11f1def0c16b52d9b229fee781a Mon Sep 17 00:00:00 2001
From: Harini Katakam <harini.katakam@xilinx.com>
Date: Mon, 23 Sep 2019 22:36:33 +0530
Subject: [LINUX PATCH 1/2] net: xilinx_phy: Add flag to reset after clock
enable
Enable flag to require phy reset after reference clock is enabled.
The MAC driver using this phy can call phy_reset_after_clock_enable
and the phy framework will check this flag before allowing the reset.
Signed-off-by: Harini Katakam <harini.katakam@xilinx.com>
---
drivers/net/phy/xilinx_phy.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/phy/xilinx_phy.c b/drivers/net/phy/xilinx_phy.c
index 2410fa3..16aad53 100644
--- a/drivers/net/phy/xilinx_phy.c
+++ b/drivers/net/phy/xilinx_phy.c
@@ -139,6 +139,7 @@ static struct phy_driver xilinx_drivers[] = {
.phy_id = XILINX_PHY_ID,
.phy_id_mask = XILINX_PHY_ID_MASK,
.name = "Xilinx PCS/PMA PHY",
+ .flags = PHY_RST_AFTER_CLK_EN,
.features = PHY_GBIT_FEATURES,
.config_init = &xilinxphy_config_init,
.config_aneg = &genphy_config_aneg,
--
2.7.4
sw/petalinux/project-spec/meta-user/recipes-kernel/linux/linux-xlnx/0002-net-macb-Handle-phy-reset-for-PCS-PMA-IP.patch
0 → 100644
View file @
fb723524
From f037da759e58e35ec0fa1bf4b0982ff7737e042a Mon Sep 17 00:00:00 2001
From: Harini Katakam <harini.katakam@xilinx.com>
Date: Mon, 23 Sep 2019 22:56:01 +0530
Subject: [LINUX PATCH 2/2] net: macb: Handle phy reset for PCS PMA IP
Call phy reset (conditional on the flag the phy framework checks)
in macb_open and if the reset succeeds, re-initialize the phy.
This is required because of runtime clock handling.
Signed-off-by: Harini Katakam <harini.katakam@xilinx.com>
---
drivers/net/ethernet/cadence/macb_main.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index fff8b4a..cda00c1 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -2596,6 +2596,12 @@ static int macb_open(struct net_device *dev)
bp->macbgem_ops.mog_init_rings(bp);
macb_init_hw(bp);
+ /* Since this driver uses runtime handling of clocks, initiate a phy
+ * reset if the attached phy requires it. Check return to see if phy
+ * was reset and then do a phy initialization.
+ */
+ if (phy_reset_after_clk_enable(dev->phydev) == 1)
+ phy_init_hw(dev->phydev);
/* schedule a link state check */
phy_start(dev->phydev);
--
2.7.4
sw/petalinux/project-spec/meta-user/recipes-kernel/linux/linux-xlnx/devtool-fragment.cfg
0 → 100644
View file @
fb723524
CONFIG_XILINX_PHY=y
sw/petalinux/project-spec/meta-user/recipes-kernel/linux/linux-xlnx_%.bbappend
0 → 100644
View file @
fb723524
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://devtool-fragment.cfg \
file://0001-net-xilinx_phy-Add-flag-to-reset-after-clock-enable.patch \
file://0002-net-macb-Handle-phy-reset-for-PCS-PMA-IP.patch"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment