Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Evan Lojewski
ast2050-flashrom
Commits
6041bcda
Commit
6041bcda
authored
22 years ago
by
Ollie Lho
Browse files
Options
Download
Email Patches
Plain Diff
Add sst39vf020 support
Corresponding to coreboot v1 svn r606.
parent
b1934902
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
14 deletions
+18
-14
flash.h
flash.h
+1
-0
flash_rom.c
flash_rom.c
+2
-0
sst39sf020.c
sst39sf020.c
+15
-14
No files found.
flash.h
View file @
6041bcda
...
...
@@ -28,6 +28,7 @@ struct flashchip {
#define SST_29EE020A 0x10
/* SST 29EE020 device code */
#define SST_28SF040 0x04
/* SST 29EE040 device code */
#define SST_39SF020 0xB6
/* SST 39SF020 device */
#define SST_39VF020 0xD6
/* SST 39SF020 device */
#define WINBOND_ID 0xDA
/* Winbond Manufacture ID code */
#define W_29C020C 0x45
/* Winbond w29c020c device code*/
...
...
This diff is collapsed.
Click to expand it.
flash_rom.c
View file @
6041bcda
...
...
@@ -50,6 +50,8 @@ struct flashchip flashchips[] = {
probe_28sf040
,
erase_28sf040
,
write_28sf040
},
{
"SST39SF020A"
,
SST_ID
,
SST_39SF020
,
NULL
,
256
,
4096
,
probe_39sf020
,
erase_39sf020
,
write_39sf020
},
{
"SST39VF020"
,
SST_ID
,
SST_39VF020
,
NULL
,
256
,
4096
,
probe_39sf020
,
erase_39sf020
,
write_39sf020
},
{
"W29C020C"
,
WINBOND_ID
,
W_29C020C
,
NULL
,
256
,
128
,
probe_jedec
,
erase_jedec
,
write_jedec
},
{
"M29F400BT"
,
ST_ID
,
ST_M29F400BT
,
NULL
,
512
,
64
*
1024
,
...
...
This diff is collapsed.
Click to expand it.
sst39sf020.c
View file @
6041bcda
...
...
@@ -81,26 +81,27 @@ static __inline__ write_sector_39sf020(volatile char * bios,
volatile
char
*
Temp
;
for
(
i
=
0
;
i
<
page_size
;
i
++
)
{
if
(
*
dst
!=
0xff
)
{
printf
(
"FATAL: dst %p not erased (val 0x%x
\n
"
,
dst
,
*
dst
);
return
;
}
if
(
*
dst
!=
0xff
)
{
printf
(
"FATAL: dst %p not erased (val 0x%x
\n
"
,
dst
,
*
dst
);
return
;
}
/* transfer data from source to destination */
if
(
*
src
==
0xFF
)
{
dst
++
,
src
++
;
/* If the data is 0xFF, don't program it */
continue
;
}
Temp
=
(
bios
+
0x5555
);
*
Temp
=
0xAA
;
Temp
=
bios
+
0x2AAA
;
*
Temp
=
0x55
;
Temp
=
bios
+
0x5555
;
*
Temp
=
0xA0
;
Temp
=
(
bios
+
0x5555
);
*
Temp
=
0xAA
;
Temp
=
bios
+
0x2AAA
;
*
Temp
=
0x55
;
Temp
=
bios
+
0x5555
;
*
Temp
=
0xA0
;
*
dst
=
*
src
;
toggle_ready_jedec
(
bios
);
if
(
*
dst
!=
*
src
)
printf
(
"BAD! dst 0x%x val 0x%x src 0x%x
\n
"
,
dst
,
*
dst
,
*
src
);
if
(
*
dst
!=
*
src
)
printf
(
"BAD! dst 0x%x val 0x%x src 0x%x
\n
"
,
dst
,
*
dst
,
*
src
);
dst
++
,
src
++
;
}
}
...
...
@@ -137,9 +138,9 @@ int probe_39sf020 (struct flashchip * flash)
int
erase_39sf020
(
struct
flashchip
*
flash
)
{
volatile
unsigned
char
*
bios
=
flash
->
virt_addr
;
volatile
unsigned
char
*
Temp
;
volatile
unsigned
char
*
Temp
;
/* Issue the Sector Erase command to 39SF020 */
printf
(
__FUNCTION__
" bios is %p
\n
"
,
bios
);
Temp
=
bios
+
0x5555
;
/* set up address to be C000:5555h */
*
Temp
=
0xAA
;
/* write data 0xAA to the address */
myusec_delay
(
10
);
...
...
This diff is collapsed.
Click to expand it.
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