* [U-Boot-Users] [Patch] update mgsuvd configuration
@ 2008-03-07 7:15 Heiko Schocher
2008-03-08 9:50 ` Wolfgang Denk
0 siblings, 1 reply; 2+ messages in thread
From: Heiko Schocher @ 2008-03-07 7:15 UTC (permalink / raw)
To: u-boot
Hello,
[MGSUVD] initialize the UPIOx controller.
Signed-off-by: Heiko Schocher <hs@denx.de>
---
board/mgsuvd/mgsuvd.c | 23 +++++++++++++++++------
include/configs/mgsuvd.h | 12 ++++++++++--
2 files changed, 27 insertions(+), 8 deletions(-)
diff --git a/board/mgsuvd/mgsuvd.c b/board/mgsuvd/mgsuvd.c
index 9fd164b..e0123bf 100644
--- a/board/mgsuvd/mgsuvd.c
+++ b/board/mgsuvd/mgsuvd.c
@@ -134,6 +134,17 @@ long int initdram (int board_type)
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)
/*
* update "memory" property in the blob
@@ -179,31 +190,31 @@ void ft_blob_update(void *blob, bd_t *bd)
}
/* BRG */
brg_data[0] = cpu_to_be32(bd->bi_busfreq);
- nodeoffset = fdt_path_offset (blob, "/soc866/cpm");
+ nodeoffset = fdt_path_offset (blob, "/soc/cpm");
if (nodeoffset >= 0) {
ret = fdt_setprop(blob, nodeoffset, "brg-frequency", brg_data,
sizeof(brg_data));
if (ret < 0)
- printf("ft_blob_update): cannot set /soc866/cpm/brg-frequency "
+ printf("ft_blob_update): cannot set /soc/cpm/brg-frequency "
"property err:%s\n", fdt_strerror(ret));
}
else {
/* memory node is required in dts */
- printf("ft_blob_update(): cannot find /localbus node "
+ printf("ft_blob_update(): cannot find /soc/cpm node "
"err:%s\n", fdt_strerror(nodeoffset));
}
/* MAC Adresse */
- nodeoffset = fdt_path_offset (blob, "/soc866/cpm/ethernet");
+ nodeoffset = fdt_path_offset (blob, "/soc/cpm/ethernet");
if (nodeoffset >= 0) {
ret = fdt_setprop(blob, nodeoffset, "mac-address", bd->bi_enetaddr,
sizeof(uchar) * 6);
if (ret < 0)
- printf("ft_blob_update): cannot set /soc866/cpm/scc/mac-address "
+ printf("ft_blob_update): cannot set /soc/cpm/scc/mac-address "
"property err:%s\n", fdt_strerror(ret));
}
else {
/* memory node is required in dts */
- printf("ft_blob_update(): cannot find /localbus node "
+ printf("ft_blob_update(): cannot find /soc/cpm/ethernet node "
"err:%s\n", fdt_strerror(nodeoffset));
}
}
diff --git a/include/configs/mgsuvd.h b/include/configs/mgsuvd.h
index 8181872..5482089 100644
--- a/include/configs/mgsuvd.h
+++ b/include/configs/mgsuvd.h
@@ -36,6 +36,9 @@
#define CONFIG_MPC866 1 /* This is a MPC866 CPU */
#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 CFG_SMC_UCODE_PATCH 1 /* Relocate SMC1 */
@@ -299,7 +302,12 @@
* 64 Refresh cycle in ms per number of rows
*/
#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
@@ -318,7 +326,7 @@
#define CONFIG_OF_BOARD_SETUP 1
#define OF_CPU "PowerPC,866 at 0"
-#define OF_SOC "soc at f0000000"
+#define OF_SOC "soc@fff00000"
#define OF_TBCLK (bd->bi_busfreq / 4)
#define OF_STDOUT_PATH "/soc/cpm/serial at a80"
--
1.5.4.2
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply related [flat|nested] 2+ messages in thread* [U-Boot-Users] [Patch] update mgsuvd configuration
2008-03-07 7:15 [U-Boot-Users] [Patch] update mgsuvd configuration Heiko Schocher
@ 2008-03-08 9:50 ` Wolfgang Denk
0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2008-03-08 9:50 UTC (permalink / raw)
To: u-boot
In message <47D0EB90.1040305@denx.de> you wrote:
> Hello,
>
> [MGSUVD] initialize the UPIOx controller.
>
> Signed-off-by: Heiko Schocher <hs@denx.de>
> ---
> board/mgsuvd/mgsuvd.c | 23 +++++++++++++++++------
> include/configs/mgsuvd.h | 12 ++++++++++--
> 2 files changed, 27 insertions(+), 8 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
An Ada exception is when a routine gets in trouble and says
'Beam me up, Scotty'.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-08 9:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-07 7:15 [U-Boot-Users] [Patch] update mgsuvd configuration Heiko Schocher
2008-03-08 9:50 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox