Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
reform-boundary-uboot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
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
Show more breadcrumbs
Jack Humbert
reform-boundary-uboot
Commits
a6154fd1
Commit
a6154fd1
authored
18 years ago
by
Aubrey Li
Browse files
Options
Downloads
Patches
Plain Diff
[Blackfin][PATCH] minor cleanup
parent
8e709bbb
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
board/bf537-stamp/flash.c
+5
-5
5 additions, 5 deletions
board/bf537-stamp/flash.c
with
5 additions
and
5 deletions
board/bf537-stamp/flash.c
+
5
−
5
View file @
a6154fd1
...
@@ -330,14 +330,14 @@ int erase_block_flash(int nBlock)
...
@@ -330,14 +330,14 @@ int erase_block_flash(int nBlock)
if
((
nBlock
<
0
)
||
(
nBlock
>
AFP_NumSectors
))
if
((
nBlock
<
0
)
||
(
nBlock
>
AFP_NumSectors
))
return
FALSE
;
return
FALSE
;
/
/
figure out the offset of the block in flash
/
*
figure out the offset of the block in flash
*/
if
((
nBlock
>=
0
)
&&
(
nBlock
<
SecFlashABegin
))
if
((
nBlock
>=
0
)
&&
(
nBlock
<
SecFlashABegin
))
ulSectorOff
=
nBlock
*
AFP_SectorSize1
;
ulSectorOff
=
nBlock
*
AFP_SectorSize1
;
else
if
((
nBlock
>=
SecFlashABegin
)
&&
(
nBlock
<
NUM_SECTORS
))
else
if
((
nBlock
>=
SecFlashABegin
)
&&
(
nBlock
<
NUM_SECTORS
))
ulSectorOff
=
ulSectorOff
=
SecFlashAOff
+
(
nBlock
-
SecFlashABegin
)
*
AFP_SectorSize2
;
SecFlashAOff
+
(
nBlock
-
SecFlashABegin
)
*
AFP_SectorSize2
;
/
/
no such sector
/
*
no such sector
*/
else
else
return
FLASH_FAIL
;
return
FLASH_FAIL
;
...
@@ -388,15 +388,15 @@ void get_sector_number(long ulOffset, int *pnSector)
...
@@ -388,15 +388,15 @@ void get_sector_number(long ulOffset, int *pnSector)
long
lMainEnd
=
0x400000
;
long
lMainEnd
=
0x400000
;
long
lBootEnd
=
0x10000
;
long
lBootEnd
=
0x10000
;
/
/
sector numbers for the FLASH A boot sectors
/
*
sector numbers for the FLASH A boot sectors
*/
if
(
ulOffset
<
lBootEnd
)
{
if
(
ulOffset
<
lBootEnd
)
{
nSector
=
(
int
)
ulOffset
/
AFP_SectorSize1
;
nSector
=
(
int
)
ulOffset
/
AFP_SectorSize1
;
}
}
/
/
sector numbers for the FLASH B boot sectors
/
*
sector numbers for the FLASH B boot sectors
*/
else
if
((
ulOffset
>=
lBootEnd
)
&&
(
ulOffset
<
lMainEnd
))
{
else
if
((
ulOffset
>=
lBootEnd
)
&&
(
ulOffset
<
lMainEnd
))
{
nSector
=
((
ulOffset
/
(
AFP_SectorSize2
))
+
7
);
nSector
=
((
ulOffset
/
(
AFP_SectorSize2
))
+
7
);
}
}
/
/
if it is a valid sector, set it
/
*
if it is a valid sector, set it
*/
if
((
nSector
>=
0
)
&&
(
nSector
<
AFP_NumSectors
))
if
((
nSector
>=
0
)
&&
(
nSector
<
AFP_NumSectors
))
*
pnSector
=
nSector
;
*
pnSector
=
nSector
;
...
...
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