Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rk3576 Downstream U-Boot
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor 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
Nicolas Frattaroli
Rk3576 Downstream U-Boot
Commits
74d34421
Commit
74d34421
authored
13 years ago
by
Albert ARIBAUD
Browse files
Options
Downloads
Patches
Plain Diff
Remove kirkwood-specifics from marvell EHCI driver
Signed-off-by:
Albert ARIBAUD
<
albert.u.boot@aribaud.net
>
parent
a14bd417
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
arch/arm/include/asm/arch-kirkwood/kirkwood.h
+12
-0
12 additions, 0 deletions
arch/arm/include/asm/arch-kirkwood/kirkwood.h
drivers/usb/host/ehci-marvell.c
+17
-14
17 additions, 14 deletions
drivers/usb/host/ehci-marvell.c
with
29 additions
and
14 deletions
arch/arm/include/asm/arch-kirkwood/kirkwood.h
+
12
−
0
View file @
74d34421
...
...
@@ -65,6 +65,18 @@
#define MVGBE0_BASE KW_EGIGA0_BASE
#define MVGBE1_BASE KW_EGIGA1_BASE
/* Kirkwood USB Host controller */
#define MVUSB0_BASE KW_USB20_BASE
#define MVUSB0_CPU_ATTR_DRAM_CS0 KWCPU_ATTR_DRAM_CS0
#define MVUSB0_CPU_ATTR_DRAM_CS1 KWCPU_ATTR_DRAM_CS1
#define MVUSB0_CPU_ATTR_DRAM_CS2 KWCPU_ATTR_DRAM_CS2
#define MVUSB0_CPU_ATTR_DRAM_CS3 KWCPU_ATTR_DRAM_CS3
/* Kirkwood CPU memory windows */
#define MVCPU_WIN_CTRL_DATA KWCPU_WIN_CTRL_DATA
#define MVCPU_WIN_ENABLE KWCPU_WIN_ENABLE
#define MVCPU_WIN_DISABLE KWCPU_WIN_DISABLE
#if defined (CONFIG_KW88F6281)
#include
<asm/arch/kw88f6281.h>
#elif defined (CONFIG_KW88F6192)
...
...
This diff is collapsed.
Click to expand it.
drivers/usb/host/ehci-marvell.c
+
17
−
14
View file @
74d34421
...
...
@@ -30,8 +30,10 @@
#include
<asm/arch/cpu.h>
#include
<asm/arch/kirkwood.h>
#define rdl(off) readl(KW_USB20_BASE + (off))
#define wrl(off, val) writel((val), KW_USB20_BASE + (off))
DECLARE_GLOBAL_DATA_PTR
;
#define rdl(off) readl(MVUSB0_BASE + (off))
#define wrl(off, val) writel((val), MVUSB0_BASE + (off))
#define USB_WINDOW_CTRL(i) (0x320 + ((i) << 4))
#define USB_WINDOW_BASE(i) (0x324 + ((i) << 4))
...
...
@@ -43,23 +45,23 @@
static
void
usb_brg_adrdec_setup
(
void
)
{
int
i
;
u32
size
,
attrib
;
u32
size
,
base
,
attrib
;
for
(
i
=
0
;
i
<
CONFIG_NR_DRAM_BANKS
;
i
++
)
{
/* Enable DRAM bank */
switch
(
i
)
{
case
0
:
attrib
=
KW
CPU_ATTR_DRAM_CS0
;
attrib
=
MVUSB0_
CPU_ATTR_DRAM_CS0
;
break
;
case
1
:
attrib
=
KW
CPU_ATTR_DRAM_CS1
;
attrib
=
MVUSB0_
CPU_ATTR_DRAM_CS1
;
break
;
case
2
:
attrib
=
KW
CPU_ATTR_DRAM_CS2
;
attrib
=
MVUSB0_
CPU_ATTR_DRAM_CS2
;
break
;
case
3
:
attrib
=
KW
CPU_ATTR_DRAM_CS3
;
attrib
=
MVUSB0_
CPU_ATTR_DRAM_CS3
;
break
;
default:
/* invalide bank, disable access */
...
...
@@ -67,15 +69,16 @@ static void usb_brg_adrdec_setup(void)
break
;
}
size
=
kw_sdram_bs
(
i
);
size
=
gd
->
bd
->
bi_dram
[
i
].
size
;
base
=
gd
->
bd
->
bi_dram
[
i
].
start
;
if
((
size
)
&&
(
attrib
))
wrl
(
USB_WINDOW_CTRL
(
i
),
KW
CPU_WIN_CTRL_DATA
(
size
,
USB_TARGET_DRAM
,
attrib
,
KW
CPU_WIN_ENABLE
));
MV
CPU_WIN_CTRL_DATA
(
size
,
USB_TARGET_DRAM
,
attrib
,
MV
CPU_WIN_ENABLE
));
else
wrl
(
USB_WINDOW_CTRL
(
i
),
KW
CPU_WIN_DISABLE
);
wrl
(
USB_WINDOW_CTRL
(
i
),
MV
CPU_WIN_DISABLE
);
wrl
(
USB_WINDOW_BASE
(
i
),
kw_sdram_bar
(
i
)
);
wrl
(
USB_WINDOW_BASE
(
i
),
base
);
}
}
...
...
@@ -87,11 +90,11 @@ int ehci_hcd_init(void)
{
usb_brg_adrdec_setup
();
hccr
=
(
struct
ehci_hccr
*
)(
KW_
USB
2
0_BASE
+
0x100
);
hccr
=
(
struct
ehci_hccr
*
)(
MV
USB0_BASE
+
0x100
);
hcor
=
(
struct
ehci_hcor
*
)((
uint32_t
)
hccr
+
HC_LENGTH
(
ehci_readl
(
&
hccr
->
cr_capbase
)));
debug
(
"
Kirkwood-ehci
: init hccr %x and hcor %x hc_length %d
\n
"
,
debug
(
"
ehci-marvell
: init hccr %x and hcor %x hc_length %d
\n
"
,
(
uint32_t
)
hccr
,
(
uint32_t
)
hcor
,
(
uint32_t
)
HC_LENGTH
(
ehci_readl
(
&
hccr
->
cr_capbase
)));
...
...
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