Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
TI ARM U-Boot Custodian Tree
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
U-Boot
Custodians
TI ARM U-Boot Custodian Tree
Commits
c306b249
Commit
c306b249
authored
3 years ago
by
Tom Rini
Browse files
Options
Downloads
Plain Diff
Merge
https://source.denx.de/u-boot/custodians/u-boot-usb
parents
9c211075
53396d67
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
drivers/usb/host/ehci-mx6.c
+12
-5
12 additions, 5 deletions
drivers/usb/host/ehci-mx6.c
with
12 additions
and
5 deletions
drivers/usb/host/ehci-mx6.c
+
12
−
5
View file @
c306b249
...
...
@@ -265,6 +265,8 @@ int usb_phy_mode(int port)
}
#endif
#if !defined(CONFIG_PHY)
/* Should be done in the MXS PHY driver */
static
void
usb_oc_config
(
struct
usbnc_regs
*
usbnc
,
int
index
)
{
void
__iomem
*
ctrl
=
(
void
__iomem
*
)(
&
usbnc
->
ctrl
[
index
]);
...
...
@@ -285,6 +287,7 @@ static void usb_oc_config(struct usbnc_regs *usbnc, int index)
clrbits_le32
(
ctrl
,
UCTRL_PWR_POL
);
#endif
}
#endif
#if !CONFIG_IS_ENABLED(DM_USB)
/**
...
...
@@ -432,10 +435,12 @@ struct ehci_mx6_priv_data {
struct
clk
clk
;
struct
phy
phy
;
enum
usb_init_type
init_type
;
#if !defined(CONFIG_PHY)
int
portnr
;
void
__iomem
*
phy_addr
;
void
__iomem
*
misc_addr
;
void
__iomem
*
anatop_addr
;
#endif
};
static
int
mx6_init_after_reset
(
struct
ehci_ctrl
*
dev
)
...
...
@@ -448,14 +453,14 @@ static int mx6_init_after_reset(struct ehci_ctrl *dev)
usb_power_config_mx6
(
priv
->
anatop_addr
,
priv
->
portnr
);
usb_power_config_mx7
(
priv
->
misc_addr
);
usb_power_config_mx7ulp
(
priv
->
phy_addr
);
#endif
usb_oc_config
(
priv
->
misc_addr
,
priv
->
portnr
);
#if
!defined(CONFIG_PHY) && (
defined(CONFIG_MX6) || defined(CONFIG_MX7ULP)
)
#if defined(CONFIG_MX6) || defined(CONFIG_MX7ULP)
usb_internal_phy_clock_gate
(
priv
->
phy_addr
,
1
);
usb_phy_enable
(
ehci
,
priv
->
phy_addr
);
#endif
#endif
#if CONFIG_IS_ENABLED(DM_REGULATOR)
if
(
priv
->
vbus_supply
)
{
...
...
@@ -558,6 +563,7 @@ static int ehci_usb_of_to_plat(struct udevice *dev)
static
int
mx6_parse_dt_addrs
(
struct
udevice
*
dev
)
{
#if !defined(CONFIG_PHY)
struct
ehci_mx6_priv_data
*
priv
=
dev_get_priv
(
dev
);
int
phy_off
,
misc_off
;
const
void
*
blob
=
gd
->
fdt_blob
;
...
...
@@ -594,7 +600,7 @@ static int mx6_parse_dt_addrs(struct udevice *dev)
priv
->
misc_addr
=
addr
;
#if
!defined(CONFIG_PHY) &&
defined(CONFIG_MX6)
#if defined(CONFIG_MX6)
int
anatop_off
;
/* Resolve ANATOP offset through USB PHY node */
...
...
@@ -607,6 +613,7 @@ static int mx6_parse_dt_addrs(struct udevice *dev)
return
-
EINVAL
;
priv
->
anatop_addr
=
addr
;
#endif
#endif
return
0
;
}
...
...
@@ -661,14 +668,14 @@ static int ehci_usb_probe(struct udevice *dev)
usb_power_config_mx6
(
priv
->
anatop_addr
,
priv
->
portnr
);
usb_power_config_mx7
(
priv
->
misc_addr
);
usb_power_config_mx7ulp
(
priv
->
phy_addr
);
#endif
usb_oc_config
(
priv
->
misc_addr
,
priv
->
portnr
);
#if
!defined(CONFIG_PHY) && (
defined(CONFIG_MX6) || defined(CONFIG_MX7ULP)
)
#if defined(CONFIG_MX6) || defined(CONFIG_MX7ULP)
usb_internal_phy_clock_gate
(
priv
->
phy_addr
,
1
);
usb_phy_enable
(
ehci
,
priv
->
phy_addr
);
#endif
#endif
#if CONFIG_IS_ENABLED(DM_REGULATOR)
if
(
priv
->
vbus_supply
)
{
...
...
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