Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
u-boot-2015.04
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
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
vesta
u-boot-2015.04
Commits
9ede3cc5
Commit
9ede3cc5
authored
18 years ago
by
Stefan Roese
Browse files
Options
Downloads
Patches
Plain Diff
Add Macronix MXLV320T flash support for AMCC Bamboo
Patch by Stefan Roese, 07 Aug 2006
parent
e335496a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG
+3
-0
3 additions, 0 deletions
CHANGELOG
board/amcc/common/flash.c
+30
-0
30 additions, 0 deletions
board/amcc/common/flash.c
with
33 additions
and
0 deletions
CHANGELOG
+
3
−
0
View file @
9ede3cc5
...
@@ -2,6 +2,9 @@
...
@@ -2,6 +2,9 @@
Changes since U-Boot 1.1.4:
Changes since U-Boot 1.1.4:
======================================================================
======================================================================
* Add Macronix MXLV320T flash support for AMCC Bamboo
Patch by Stefan Roese, 07 Aug 2006
* Change "mii info" to not print an error upon missing PHY at address
* Change "mii info" to not print an error upon missing PHY at address
Patch by Stefan Roese, 07 Aug 2006
Patch by Stefan Roese, 07 Aug 2006
...
...
This diff is collapsed.
Click to expand it.
board/amcc/common/flash.c
+
30
−
0
View file @
9ede3cc5
...
@@ -76,6 +76,9 @@ void flash_print_info(flash_info_t * info)
...
@@ -76,6 +76,9 @@ void flash_print_info(flash_info_t * info)
case
FLASH_MAN_SST
:
case
FLASH_MAN_SST
:
printf
(
"SST "
);
printf
(
"SST "
);
break
;
break
;
case
FLASH_MAN_MX
:
printf
(
"MACRONIX "
);
break
;
default:
default:
printf
(
"Unknown Vendor "
);
printf
(
"Unknown Vendor "
);
break
;
break
;
...
@@ -124,6 +127,9 @@ void flash_print_info(flash_info_t * info)
...
@@ -124,6 +127,9 @@ void flash_print_info(flash_info_t * info)
case
FLASH_STMW320DT
:
case
FLASH_STMW320DT
:
printf
(
"M29W320DT (32 M, top sector)
\n
"
);
printf
(
"M29W320DT (32 M, top sector)
\n
"
);
break
;
break
;
case
FLASH_MXLV320T
:
printf
(
"MXLV320T (32 Mbit, top sector)
\n
"
);
break
;
default:
default:
printf
(
"Unknown Chip Type
\n
"
);
printf
(
"Unknown Chip Type
\n
"
);
break
;
break
;
...
@@ -375,6 +381,7 @@ int flash_erase(flash_info_t * info, int s_first, int s_last)
...
@@ -375,6 +381,7 @@ int flash_erase(flash_info_t * info, int s_first, int s_last)
{
{
if
(((
info
->
flash_id
&
FLASH_TYPEMASK
)
==
FLASH_AM320B
)
||
if
(((
info
->
flash_id
&
FLASH_TYPEMASK
)
==
FLASH_AM320B
)
||
((
info
->
flash_id
&
FLASH_TYPEMASK
)
==
FLASH_AM320T
)
||
((
info
->
flash_id
&
FLASH_TYPEMASK
)
==
FLASH_AM320T
)
||
((
info
->
flash_id
&
FLASH_TYPEMASK
)
==
FLASH_MXLV320T
)
||
((
info
->
flash_id
&
FLASH_TYPEMASK
)
==
FLASH_STMW320DT
))
{
((
info
->
flash_id
&
FLASH_TYPEMASK
)
==
FLASH_STMW320DT
))
{
return
flash_erase_2
(
info
,
s_first
,
s_last
);
return
flash_erase_2
(
info
,
s_first
,
s_last
);
}
else
{
}
else
{
...
@@ -555,6 +562,7 @@ static int write_word(flash_info_t * info, ulong dest, ulong data)
...
@@ -555,6 +562,7 @@ static int write_word(flash_info_t * info, ulong dest, ulong data)
{
{
if
(((
info
->
flash_id
&
FLASH_TYPEMASK
)
==
FLASH_AM320B
)
||
if
(((
info
->
flash_id
&
FLASH_TYPEMASK
)
==
FLASH_AM320B
)
||
((
info
->
flash_id
&
FLASH_TYPEMASK
)
==
FLASH_AM320T
)
||
((
info
->
flash_id
&
FLASH_TYPEMASK
)
==
FLASH_AM320T
)
||
((
info
->
flash_id
&
FLASH_TYPEMASK
)
==
FLASH_MXLV320T
)
||
((
info
->
flash_id
&
FLASH_TYPEMASK
)
==
FLASH_STMW320DT
))
{
((
info
->
flash_id
&
FLASH_TYPEMASK
)
==
FLASH_STMW320DT
))
{
return
write_word_2
(
info
,
dest
,
data
);
return
write_word_2
(
info
,
dest
,
data
);
}
else
{
}
else
{
...
@@ -648,6 +656,9 @@ static ulong flash_get_size_2(vu_long * addr, flash_info_t * info)
...
@@ -648,6 +656,9 @@ static ulong flash_get_size_2(vu_long * addr, flash_info_t * info)
case
(
CFG_FLASH_WORD_SIZE
)
STM_MANUFACT
:
case
(
CFG_FLASH_WORD_SIZE
)
STM_MANUFACT
:
info
->
flash_id
=
FLASH_MAN_STM
;
info
->
flash_id
=
FLASH_MAN_STM
;
break
;
break
;
case
(
CFG_FLASH_WORD_SIZE
)
MX_MANUFACT
:
info
->
flash_id
=
FLASH_MAN_MX
;
break
;
default:
default:
info
->
flash_id
=
FLASH_UNKNOWN
;
info
->
flash_id
=
FLASH_UNKNOWN
;
info
->
sector_count
=
0
;
info
->
sector_count
=
0
;
...
@@ -676,6 +687,12 @@ static ulong flash_get_size_2(vu_long * addr, flash_info_t * info)
...
@@ -676,6 +687,12 @@ static ulong flash_get_size_2(vu_long * addr, flash_info_t * info)
info
->
sector_count
=
67
;
info
->
sector_count
=
67
;
info
->
size
=
0x00400000
;
break
;
/* => 4 MB */
info
->
size
=
0x00400000
;
break
;
/* => 4 MB */
case
(
CFG_FLASH_WORD_SIZE
)
MX_ID_LV320T
:
info
->
flash_id
+=
FLASH_MXLV320T
;
info
->
sector_count
=
71
;
info
->
size
=
0x00400000
;
break
;
/* => 4 MB */
default:
default:
info
->
flash_id
=
FLASH_UNKNOWN
;
info
->
flash_id
=
FLASH_UNKNOWN
;
return
(
0
);
/* => no or unknown flash */
return
(
0
);
/* => no or unknown flash */
...
@@ -711,6 +728,19 @@ static ulong flash_get_size_2(vu_long * addr, flash_info_t * info)
...
@@ -711,6 +728,19 @@ static ulong flash_get_size_2(vu_long * addr, flash_info_t * info)
--
i
;
--
i
;
info
->
start
[
i
]
=
base
;
info
->
start
[
i
]
=
base
;
}
}
}
else
if
((
info
->
flash_id
&
FLASH_TYPEMASK
)
==
FLASH_MXLV320T
)
{
i
=
info
->
sector_count
-
1
;
info
->
start
[
i
--
]
=
base
+
info
->
size
-
0x00002000
;
info
->
start
[
i
--
]
=
base
+
info
->
size
-
0x00004000
;
info
->
start
[
i
--
]
=
base
+
info
->
size
-
0x00006000
;
info
->
start
[
i
--
]
=
base
+
info
->
size
-
0x00008000
;
info
->
start
[
i
--
]
=
base
+
info
->
size
-
0x0000a000
;
info
->
start
[
i
--
]
=
base
+
info
->
size
-
0x0000c000
;
info
->
start
[
i
--
]
=
base
+
info
->
size
-
0x0000e000
;
info
->
start
[
i
--
]
=
base
+
info
->
size
-
0x00010000
;
for
(;
i
>=
0
;
i
--
)
info
->
start
[
i
]
=
base
+
i
*
0x00010000
;
}
else
{
}
else
{
if
(
info
->
flash_id
&
FLASH_BTYPE
)
{
if
(
info
->
flash_id
&
FLASH_BTYPE
)
{
/* set sector offsets for bottom boot block type */
/* set sector offsets for bottom boot block type */
...
...
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