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
82afabfe
Commit
82afabfe
authored
17 years ago
by
Heiko Schocher
Committed by
Wolfgang Denk
17 years ago
Browse files
Options
Downloads
Patches
Plain Diff
mgsuvd: update board configuration
initialize the UPIOx controller. Signed-off-by:
Heiko Schocher
<
hs@denx.de
>
parent
e492c90c
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
board/mgsuvd/mgsuvd.c
+17
-6
17 additions, 6 deletions
board/mgsuvd/mgsuvd.c
include/configs/mgsuvd.h
+10
-2
10 additions, 2 deletions
include/configs/mgsuvd.h
with
27 additions
and
8 deletions
board/mgsuvd/mgsuvd.c
+
17
−
6
View file @
82afabfe
...
@@ -134,6 +134,17 @@ long int initdram (int board_type)
...
@@ -134,6 +134,17 @@ long int initdram (int board_type)
return
(
size
);
return
(
size
);
}
}
/*
* Early board initalization.
*/
int
board_early_init_r
(
void
)
{
/* setup the UPIOx */
*
(
char
*
)(
CFG_PIGGY_BASE
+
0x02
)
=
0xc0
;
*
(
char
*
)(
CFG_PIGGY_BASE
+
0x03
)
=
0x35
;
return
0
;
}
#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
/*
/*
* update "memory" property in the blob
* update "memory" property in the blob
...
@@ -179,31 +190,31 @@ void ft_blob_update(void *blob, bd_t *bd)
...
@@ -179,31 +190,31 @@ void ft_blob_update(void *blob, bd_t *bd)
}
}
/* BRG */
/* BRG */
brg_data
[
0
]
=
cpu_to_be32
(
bd
->
bi_busfreq
);
brg_data
[
0
]
=
cpu_to_be32
(
bd
->
bi_busfreq
);
nodeoffset
=
fdt_path_offset
(
blob
,
"/soc
866
/cpm"
);
nodeoffset
=
fdt_path_offset
(
blob
,
"/soc/cpm"
);
if
(
nodeoffset
>=
0
)
{
if
(
nodeoffset
>=
0
)
{
ret
=
fdt_setprop
(
blob
,
nodeoffset
,
"brg-frequency"
,
brg_data
,
ret
=
fdt_setprop
(
blob
,
nodeoffset
,
"brg-frequency"
,
brg_data
,
sizeof
(
brg_data
));
sizeof
(
brg_data
));
if
(
ret
<
0
)
if
(
ret
<
0
)
printf
(
"ft_blob_update): cannot set /soc
866
/cpm/brg-frequency "
printf
(
"ft_blob_update): cannot set /soc/cpm/brg-frequency "
"property err:%s
\n
"
,
fdt_strerror
(
ret
));
"property err:%s
\n
"
,
fdt_strerror
(
ret
));
}
}
else
{
else
{
/* memory node is required in dts */
/* memory node is required in dts */
printf
(
"ft_blob_update(): cannot find /
l
oc
albus
node "
printf
(
"ft_blob_update(): cannot find /
s
oc
/cpm
node "
"err:%s
\n
"
,
fdt_strerror
(
nodeoffset
));
"err:%s
\n
"
,
fdt_strerror
(
nodeoffset
));
}
}
/* MAC Adresse */
/* MAC Adresse */
nodeoffset
=
fdt_path_offset
(
blob
,
"/soc
866
/cpm/ethernet"
);
nodeoffset
=
fdt_path_offset
(
blob
,
"/soc/cpm/ethernet"
);
if
(
nodeoffset
>=
0
)
{
if
(
nodeoffset
>=
0
)
{
ret
=
fdt_setprop
(
blob
,
nodeoffset
,
"mac-address"
,
bd
->
bi_enetaddr
,
ret
=
fdt_setprop
(
blob
,
nodeoffset
,
"mac-address"
,
bd
->
bi_enetaddr
,
sizeof
(
uchar
)
*
6
);
sizeof
(
uchar
)
*
6
);
if
(
ret
<
0
)
if
(
ret
<
0
)
printf
(
"ft_blob_update): cannot set /soc
866
/cpm/scc/mac-address "
printf
(
"ft_blob_update): cannot set /soc/cpm/scc/mac-address "
"property err:%s
\n
"
,
fdt_strerror
(
ret
));
"property err:%s
\n
"
,
fdt_strerror
(
ret
));
}
}
else
{
else
{
/* memory node is required in dts */
/* memory node is required in dts */
printf
(
"ft_blob_update(): cannot find /
l
oc
albus
node "
printf
(
"ft_blob_update(): cannot find /
s
oc
/cpm/ethernet
node "
"err:%s
\n
"
,
fdt_strerror
(
nodeoffset
));
"err:%s
\n
"
,
fdt_strerror
(
nodeoffset
));
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
include/configs/mgsuvd.h
+
10
−
2
View file @
82afabfe
...
@@ -36,6 +36,9 @@
...
@@ -36,6 +36,9 @@
#define CONFIG_MPC866 1
/* This is a MPC866 CPU */
#define CONFIG_MPC866 1
/* This is a MPC866 CPU */
#define CONFIG_MGSUVD 1
/* ...on a mgsuvd board */
#define CONFIG_MGSUVD 1
/* ...on a mgsuvd board */
/* Do boardspecific init */
#define CONFIG_BOARD_EARLY_INIT_R 1
#define CONFIG_8xx_GCLK_FREQ 66000000
#define CONFIG_8xx_GCLK_FREQ 66000000
#define CFG_SMC_UCODE_PATCH 1
/* Relocate SMC1 */
#define CFG_SMC_UCODE_PATCH 1
/* Relocate SMC1 */
...
@@ -299,7 +302,12 @@
...
@@ -299,7 +302,12 @@
* 64 Refresh cycle in ms per number of rows
* 64 Refresh cycle in ms per number of rows
*/
*/
#define CFG_PTA_PER_CLK ((4096 * 64 * 1000) / (4 * 64))
#define CFG_PTA_PER_CLK ((4096 * 64 * 1000) / (4 * 64))
/* HS HS noch zu setzen */
/* GPIO/PIGGY on CS3 initialization values
*/
#define CFG_PIGGY_BASE (0x30000000)
#define CFG_OR3_PRELIM (0xfe000d24)
#define CFG_BR3_PRELIM (0x30000401)
/*
/*
* Internal Definitions
* Internal Definitions
...
@@ -318,7 +326,7 @@
...
@@ -318,7 +326,7 @@
#define CONFIG_OF_BOARD_SETUP 1
#define CONFIG_OF_BOARD_SETUP 1
#define OF_CPU "PowerPC,866@0"
#define OF_CPU "PowerPC,866@0"
#define OF_SOC "soc@f
00
00000"
#define OF_SOC "soc@f
ff
00000"
#define OF_TBCLK (bd->bi_busfreq / 4)
#define OF_TBCLK (bd->bi_busfreq / 4)
#define OF_STDOUT_PATH "/soc/cpm/serial@a80"
#define OF_STDOUT_PATH "/soc/cpm/serial@a80"
...
...
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