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
d2995fe3
Commit
d2995fe3
authored
17 years ago
by
Wolfgang Denk
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
git://www.denx.de/git/u-boot-cfi-flash
parents
feaa43f3
0dc80e27
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/mtd/cfi_flash.c
+51
-1
51 additions, 1 deletion
drivers/mtd/cfi_flash.c
with
51 additions
and
1 deletion
drivers/mtd/cfi_flash.c
+
51
−
1
View file @
d2995fe3
...
@@ -769,7 +769,7 @@ static int flash_write_cfiword (flash_info_t * info, ulong dest,
...
@@ -769,7 +769,7 @@ static int flash_write_cfiword (flash_info_t * info, ulong dest,
}
}
if
(
!
flag
)
{
if
(
!
flag
)
{
unmap_physmem
(
dstaddr
,
info
->
portwidth
);
unmap_physmem
(
dstaddr
,
info
->
portwidth
);
return
2
;
return
ERR_NOT_ERASED
;
}
}
/* Disable interrupts which might cause a timeout here */
/* Disable interrupts which might cause a timeout here */
...
@@ -826,7 +826,57 @@ static int flash_write_cfibuffer (flash_info_t * info, ulong dest, uchar * cp,
...
@@ -826,7 +826,57 @@ static int flash_write_cfibuffer (flash_info_t * info, ulong dest, uchar * cp,
int
retcode
;
int
retcode
;
void
*
src
=
cp
;
void
*
src
=
cp
;
void
*
dst
=
map_physmem
(
dest
,
len
,
MAP_NOCACHE
);
void
*
dst
=
map_physmem
(
dest
,
len
,
MAP_NOCACHE
);
void
*
dst2
=
dst
;
int
flag
=
0
;
switch
(
info
->
portwidth
)
{
case
FLASH_CFI_8BIT
:
cnt
=
len
;
break
;
case
FLASH_CFI_16BIT
:
cnt
=
len
>>
1
;
break
;
case
FLASH_CFI_32BIT
:
cnt
=
len
>>
2
;
break
;
case
FLASH_CFI_64BIT
:
cnt
=
len
>>
3
;
break
;
default:
retcode
=
ERR_INVAL
;
goto
out_unmap
;
}
while
((
cnt
--
>
0
)
&&
(
flag
==
0
))
{
switch
(
info
->
portwidth
)
{
case
FLASH_CFI_8BIT
:
flag
=
((
flash_read8
(
dst2
)
&
flash_read8
(
src
))
==
flash_read8
(
src
));
src
+=
1
,
dst2
+=
1
;
break
;
case
FLASH_CFI_16BIT
:
flag
=
((
flash_read16
(
dst2
)
&
flash_read16
(
src
))
==
flash_read16
(
src
));
src
+=
2
,
dst2
+=
2
;
break
;
case
FLASH_CFI_32BIT
:
flag
=
((
flash_read32
(
dst2
)
&
flash_read32
(
src
))
==
flash_read32
(
src
));
src
+=
4
,
dst2
+=
4
;
break
;
case
FLASH_CFI_64BIT
:
flag
=
((
flash_read64
(
dst2
)
&
flash_read64
(
src
))
==
flash_read64
(
src
));
src
+=
8
,
dst2
+=
8
;
break
;
}
}
if
(
!
flag
)
{
retcode
=
ERR_NOT_ERASED
;
goto
out_unmap
;
}
src
=
cp
;
sector
=
find_sector
(
info
,
dest
);
sector
=
find_sector
(
info
,
dest
);
switch
(
info
->
vendor
)
{
switch
(
info
->
vendor
)
{
...
...
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