Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
DFU U-Boot Custodian Tree
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue 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
U-Boot
Custodians
DFU U-Boot Custodian Tree
Commits
62ee9576
Commit
62ee9576
authored
4 years ago
by
Peng Fan
Committed by
Tom Rini
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
phy: nop-phy: add clk bulk
Add clk bulk for nop-phy driver. Signed-off-by:
Peng Fan
<
peng.fan@nxp.com
>
parent
ef4f4f1f
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
drivers/phy/nop-phy.c
+35
-0
35 additions, 0 deletions
drivers/phy/nop-phy.c
with
35 additions
and
0 deletions
drivers/phy/nop-phy.c
+
35
−
0
View file @
62ee9576
...
...
@@ -4,17 +4,50 @@
* Written by Jean-Jacques Hiblot <jjhiblot@ti.com>
*/
#include
<clk.h>
#include
<common.h>
#include
<dm.h>
#include
<dm/device.h>
#include
<dm/device_compat.h>
#include
<generic-phy.h>
struct
nop_phy_priv
{
struct
clk_bulk
bulk
;
};
static
int
nop_phy_init
(
struct
phy
*
phy
)
{
struct
nop_phy_priv
*
priv
=
dev_get_priv
(
phy
->
dev
);
if
(
CONFIG_IS_ENABLED
(
CLK
))
return
clk_enable_bulk
(
&
priv
->
bulk
);
return
0
;
}
static
int
nop_phy_probe
(
struct
udevice
*
dev
)
{
struct
nop_phy_priv
*
priv
=
dev_get_priv
(
dev
);
int
ret
;
if
(
CONFIG_IS_ENABLED
(
CLK
))
{
ret
=
clk_get_bulk
(
dev
,
&
priv
->
bulk
);
if
(
ret
<
0
)
{
dev_err
(
dev
,
"Failed to get clk: %d
\n
"
,
ret
);
return
ret
;
}
}
return
0
;
}
static
const
struct
udevice_id
nop_phy_ids
[]
=
{
{
.
compatible
=
"nop-phy"
},
{
}
};
static
struct
phy_ops
nop_phy_ops
=
{
.
init
=
nop_phy_init
,
};
U_BOOT_DRIVER
(
nop_phy
)
=
{
...
...
@@ -22,4 +55,6 @@ U_BOOT_DRIVER(nop_phy) = {
.
id
=
UCLASS_PHY
,
.
of_match
=
nop_phy_ids
,
.
ops
=
&
nop_phy_ops
,
.
probe
=
nop_phy_probe
,
.
priv_auto_alloc_size
=
sizeof
(
struct
nop_phy_priv
),
};
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