Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
lede-mikrotik
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johannes Rudolph
lede-mikrotik
Commits
27dec099
Commit
27dec099
authored
10 years ago
by
Gabor Juhos
Browse files
Options
Downloads
Patches
Plain Diff
ar71xx: add phy_mmd_{read,write} helpers
Signed-off-by:
Gabor Juhos
<
juhosg@openwrt.org
>
SVN-Revision: 40506
parent
6a0f8ea2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
target/linux/ar71xx/patches-3.10/424-net-phy-add-phy_mmd_read_write-functions.patch
+40
-0
40 additions, 0 deletions
...s-3.10/424-net-phy-add-phy_mmd_read_write-functions.patch
with
40 additions
and
0 deletions
target/linux/ar71xx/patches-3.10/424-net-phy-add-phy_mmd_read_write-functions.patch
0 → 100644
+
40
−
0
View file @
27dec099
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -1009,6 +1009,12 @@
static int phy_read_mmd_indirect(struct
return ret;
}
+int phy_read_mmd(struct phy_device *phydev, int prtad, int devad, int addr)
+{
+ return phy_read_mmd_indirect(phydev->bus, prtad, devad, phydev->addr);
+}
+EXPORT_SYMBOL(phy_read_mmd);
+
/**
* phy_write_mmd_indirect - writes data to the MMD registers
* @bus: the target MII bus
@@ -1034,6 +1040,12 @@
static void phy_write_mmd_indirect(struc
bus->write(bus, addr, MII_MMD_DATA, data);
}
+void phy_write_mmd(struct phy_device *phydev, int prtad, int devad, u16 data)
+{
+ phy_write_mmd_indirect(phydev->bus, prtad, devad, phydev->addr, data);
+}
+EXPORT_SYMBOL(phy_write_mmd);
+
/**
* phy_init_eee - init and check the EEE feature
* @phydev: target phy_device struct
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -580,6 +580,9 @@
int phy_register_fixup_for_uid(u32 phy_u
int (*run)(struct phy_device *));
int phy_scan_fixups(struct phy_device *phydev);
+int phy_read_mmd(struct phy_device *phydev, int prtad, int devad, int addr);
+void phy_write_mmd(struct phy_device *phydev, int prtad, int devad, u16 data);
+
int phy_init_eee(struct phy_device *phydev, bool clk_stop_enable);
int phy_get_eee_err(struct phy_device *phydev);
int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_eee *data);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment