Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
U
uboot-imx
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
8
Issues
8
List
Boards
Labels
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Librem5
uboot-imx
Commits
6cc64f9b
Commit
6cc64f9b
authored
Aug 15, 2008
by
Sergei Poselenov
Committed by
Andrew Fleming-AFLEMING
Sep 08, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed hardcoded MxMR loop value from upmconfig() for MPC85xx.
Signed-off-by:
Sergei Poselenov
<
sposelenov@emcraft.com
>
parent
36241ca2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
cpu/mpc85xx/cpu.c
cpu/mpc85xx/cpu.c
+7
-8
No files found.
cpu/mpc85xx/cpu.c
View file @
6cc64f9b
...
...
@@ -298,15 +298,14 @@ int dma_xfer(void *dest, uint count, void *src) {
#endif
/*
* Configures a UPM.
Currently, the loop fields in MxMR (RLF, WLF and TLF)
*
are hardcoded as "1".
"size" is the number or entries, not a sizeof.
* Configures a UPM.
The function requires the respective MxMR to be set
*
before calling this function.
"size" is the number or entries, not a sizeof.
*/
void
upmconfig
(
uint
upm
,
uint
*
table
,
uint
size
)
{
int
i
,
mdr
,
mad
,
old_mad
=
0
;
volatile
u32
*
mxmr
;
volatile
ccsr_lbc_t
*
lbc
=
(
void
*
)(
CFG_MPC85xx_LBC_ADDR
);
int
loopval
=
0x00004440
;
volatile
u32
*
brp
,
*
orp
;
volatile
u8
*
dummy
=
NULL
;
int
upmmask
;
...
...
@@ -334,8 +333,8 @@ void upmconfig (uint upm, uint * table, uint size)
i
++
,
brp
+=
2
,
orp
+=
2
)
{
/* Look for a valid BR with selected UPM */
if
((
in_be32
(
brp
)
&
(
BR_V
|
upmmask
))
==
(
BR_V
|
upmmask
))
{
dummy
=
(
volatile
u8
*
)(
in_be32
(
brp
)
>>
BR_BA_SHIFT
);
if
((
in_be32
(
brp
)
&
(
BR_V
|
BR_MSEL
))
==
(
BR_V
|
upmmask
))
{
dummy
=
(
volatile
u8
*
)(
in_be32
(
brp
)
&
BR_BA
);
break
;
}
}
...
...
@@ -347,7 +346,7 @@ void upmconfig (uint upm, uint * table, uint size)
for
(
i
=
0
;
i
<
size
;
i
++
)
{
/* 1 */
out_be32
(
mxmr
,
loopval
|
0x10000000
|
i
);
/* OP_WRITE */
out_be32
(
mxmr
,
(
in_be32
(
mxmr
)
&
0x4fffffc0
)
|
MxMR_OP_WARR
|
i
);
/* 2 */
out_be32
(
&
lbc
->
mdr
,
table
[
i
]);
/* 3 */
...
...
@@ -356,11 +355,11 @@ void upmconfig (uint upm, uint * table, uint size)
*
(
volatile
u8
*
)
dummy
=
0
;
/* 5 */
do
{
mad
=
in_be32
(
mxmr
)
&
0x3f
;
mad
=
in_be32
(
mxmr
)
&
MxMR_MAD_MSK
;
}
while
(
mad
<=
old_mad
&&
!
(
!
mad
&&
i
==
(
size
-
1
)));
old_mad
=
mad
;
}
out_be32
(
mxmr
,
loopval
);
/* OP_NORMAL */
out_be32
(
mxmr
,
(
in_be32
(
mxmr
)
&
0x4fffffc0
)
|
MxMR_OP_NORM
);
}
...
...
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