Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
6fa85192
Commit
6fa85192
authored
Apr 07, 2016
by
Madalin Bucur
Committed by
Madalin Bucur
Oct 04, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fsl/fman: use of_get_phy_mode()
Signed-off-by:
Madalin Bucur
<
madalin.bucur@freescale.com
>
parent
5df6f7fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
31 deletions
+2
-31
drivers/net/ethernet/freescale/fman/mac.c
drivers/net/ethernet/freescale/fman/mac.c
+2
-31
No files found.
drivers/net/ethernet/freescale/fman/mac.c
View file @
6fa85192
...
@@ -583,31 +583,6 @@ static void setup_memac(struct mac_device *mac_dev)
...
@@ -583,31 +583,6 @@ static void setup_memac(struct mac_device *mac_dev)
static
DEFINE_MUTEX
(
eth_lock
);
static
DEFINE_MUTEX
(
eth_lock
);
static
const
char
phy_str
[][
11
]
=
{
[
PHY_INTERFACE_MODE_MII
]
=
"mii"
,
[
PHY_INTERFACE_MODE_GMII
]
=
"gmii"
,
[
PHY_INTERFACE_MODE_SGMII
]
=
"sgmii"
,
[
PHY_INTERFACE_MODE_TBI
]
=
"tbi"
,
[
PHY_INTERFACE_MODE_RMII
]
=
"rmii"
,
[
PHY_INTERFACE_MODE_RGMII
]
=
"rgmii"
,
[
PHY_INTERFACE_MODE_RGMII_ID
]
=
"rgmii-id"
,
[
PHY_INTERFACE_MODE_RGMII_RXID
]
=
"rgmii-rxid"
,
[
PHY_INTERFACE_MODE_RGMII_TXID
]
=
"rgmii-txid"
,
[
PHY_INTERFACE_MODE_RTBI
]
=
"rtbi"
,
[
PHY_INTERFACE_MODE_XGMII
]
=
"xgmii"
};
static
phy_interface_t
__pure
__attribute__
((
nonnull
))
str2phy
(
const
char
*
str
)
{
int
i
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
phy_str
);
i
++
)
if
(
strcmp
(
str
,
phy_str
[
i
])
==
0
)
return
(
phy_interface_t
)
i
;
return
PHY_INTERFACE_MODE_MII
;
}
static
const
u16
phy2speed
[]
=
{
static
const
u16
phy2speed
[]
=
{
[
PHY_INTERFACE_MODE_MII
]
=
SPEED_100
,
[
PHY_INTERFACE_MODE_MII
]
=
SPEED_100
,
[
PHY_INTERFACE_MODE_GMII
]
=
SPEED_1000
,
[
PHY_INTERFACE_MODE_GMII
]
=
SPEED_1000
,
...
@@ -686,7 +661,6 @@ static int mac_probe(struct platform_device *_of_dev)
...
@@ -686,7 +661,6 @@ static int mac_probe(struct platform_device *_of_dev)
struct
resource
res
;
struct
resource
res
;
struct
mac_priv_s
*
priv
;
struct
mac_priv_s
*
priv
;
const
u8
*
mac_addr
;
const
u8
*
mac_addr
;
const
char
*
char_prop
;
const
u32
*
u32_prop
;
const
u32
*
u32_prop
;
u8
fman_id
;
u8
fman_id
;
...
@@ -870,15 +844,12 @@ static int mac_probe(struct platform_device *_of_dev)
...
@@ -870,15 +844,12 @@ static int mac_probe(struct platform_device *_of_dev)
}
}
/* Get the PHY connection type */
/* Get the PHY connection type */
char_prop
=
(
const
char
*
)
of_get_property
(
mac_node
,
priv
->
phy_if
=
of_get_phy_mode
(
mac_node
);
"phy-connection-type"
,
NULL
);
if
(
priv
->
phy_if
<
0
)
{
if
(
!
char_prop
)
{
dev_warn
(
dev
,
dev_warn
(
dev
,
"of_get_property(%s, phy-connection-type) failed. Defaulting to MII
\n
"
,
"of_get_property(%s, phy-connection-type) failed. Defaulting to MII
\n
"
,
mac_node
->
full_name
);
mac_node
->
full_name
);
priv
->
phy_if
=
PHY_INTERFACE_MODE_MII
;
priv
->
phy_if
=
PHY_INTERFACE_MODE_MII
;
}
else
{
priv
->
phy_if
=
str2phy
(
char_prop
);
}
}
priv
->
speed
=
phy2speed
[
priv
->
phy_if
];
priv
->
speed
=
phy2speed
[
priv
->
phy_if
];
...
...
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