summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-07-01 21:40:08 +0000
committerwdenk <wdenk>2004-07-01 21:40:08 +0000
commite55ca7e2624988f82d6f77ddab54246621260c8b (patch)
tree4ad4972b23b77b712d1cc0d4894dadad17a811c9 /board
parent93f6a6771ba04b217e4c8bbca9196fd16e364479 (diff)
Patch by Andrea Marson, 11 Jun 2004:
Update for PPChameleon board: - support for SysClk @ 25MHz - support for Silicon Motion SM712 VGA controller - some clean ups
Diffstat (limited to 'board')
-rw-r--r--board/dave/PPChameleonEVB/PPChameleonEVB.c72
-rw-r--r--board/dave/PPChameleonEVB/flash.c9
-rw-r--r--board/dave/common/flash.c2
3 files changed, 61 insertions, 22 deletions
diff --git a/board/dave/PPChameleonEVB/PPChameleonEVB.c b/board/dave/PPChameleonEVB/PPChameleonEVB.c
index b08b119600f..2b12f979a48 100644
--- a/board/dave/PPChameleonEVB/PPChameleonEVB.c
+++ b/board/dave/PPChameleonEVB/PPChameleonEVB.c
@@ -29,22 +29,9 @@
#include <command.h>
#include <malloc.h>
-/* ------------------------------------------------------------------------- */
-#if 0
-#define FPGA_DEBUG
-#endif
-
-/* fpga configuration data - gzip compressed and generated by bin2c */
-const unsigned char fpgadata[] =
-{
-#include "fpgadata.c"
-};
+/* ------------------------------------------------------------------------- */
-/*
- * include common fpga code (for esd boards)
- */
-#include "../common/fpga.c"
/* Prototypes */
@@ -60,13 +47,13 @@ int board_early_init_f (void)
* IRQ 0-15 405GP internally generated; active high; level sensitive
* IRQ 16 405GP internally generated; active low; level sensitive
* IRQ 17-24 RESERVED
- * IRQ 25 (EXT IRQ 0) CAN0; active low; level sensitive
- * IRQ 26 (EXT IRQ 1) SER0 ; active low; level sensitive
- * IRQ 27 (EXT IRQ 2) SER1; active low; level sensitive
- * IRQ 28 (EXT IRQ 3) FPGA 0; active low; level sensitive
- * IRQ 29 (EXT IRQ 4) FPGA 1; active low; level sensitive
- * IRQ 30 (EXT IRQ 5) PCI INTA; active low; level sensitive
- * IRQ 31 (EXT IRQ 6) COMPACT FLASH; active high; level sensitive
+ * IRQ 25 (EXT IRQ 0)
+ * IRQ 26 (EXT IRQ 1)
+ * IRQ 27 (EXT IRQ 2)
+ * IRQ 28 (EXT IRQ 3)
+ * IRQ 29 (EXT IRQ 4)
+ * IRQ 30 (EXT IRQ 5)
+ * IRQ 31 (EXT IRQ 6)
*/
mtdcr(uicsr, 0xFFFFFFFF); /* clear all ints */
mtdcr(uicer, 0x00000000); /* disable all ints */
@@ -268,8 +255,13 @@ nand_init(void)
{
ulong totlen = 0;
-#if (CONFIG_PPCHAMELEON_MODULE_MODEL == CONFIG_PPCHAMELEON_MODULE_ME) || \
+/*
+ The HI model is equipped with a large block NAND chip not supported yet
+ by U-Boot
(CONFIG_PPCHAMELEON_MODULE_MODEL == CONFIG_PPCHAMELEON_MODULE_HI)
+*/
+
+#if (CONFIG_PPCHAMELEON_MODULE_MODEL == CONFIG_PPCHAMELEON_MODULE_ME)
debug ("Probing at 0x%.8x\n", CFG_NAND0_BASE);
totlen += nand_probe (CFG_NAND0_BASE);
#endif /* CONFIG_PPCHAMELEON_MODULE_ME, CONFIG_PPCHAMELEON_MODULE_HI */
@@ -280,3 +272,39 @@ nand_init(void)
printf ("%4lu MB\n", totlen >>20);
}
#endif
+
+#ifdef CONFIG_CFB_CONSOLE
+# ifdef CONFIG_CONSOLE_EXTRA_INFO
+# include <video_fb.h>
+extern GraphicDevice smi;
+
+void video_get_info_str (int line_number, char *info)
+{
+ uint pvr = get_pvr ();
+
+ /* init video info strings for graphic console */
+ switch (line_number) {
+ case 1:
+ switch (pvr) {
+ case PVR_405EP_RB:
+ sprintf (info, " IBM PowerPC 405EP Rev. B");
+ break;
+ default:
+ sprintf (info, " IBM PowerPC 405EP Rev. <unknown>");
+ break;
+ }
+ return;
+ case 2:
+ sprintf (info, " DAVE Srl PPChameleonEVB - www.dave-tech.it");
+ return;
+ case 3:
+ sprintf (info, " %s", smi.modeIdent);
+ return;
+ }
+
+ /* no more info lines */
+ *info = 0;
+ return;
+}
+# endif /* CONFIG_CONSOLE_EXTRA_INFO */
+#endif /* CONFIG_CFB_CONSOLE */
diff --git a/board/dave/PPChameleonEVB/flash.c b/board/dave/PPChameleonEVB/flash.c
index 5f67360a454..692d275a59e 100644
--- a/board/dave/PPChameleonEVB/flash.c
+++ b/board/dave/PPChameleonEVB/flash.c
@@ -50,6 +50,9 @@ unsigned long flash_init (void)
unsigned long base;
int size_val = 0;
+ debug("[%s, %d] Entering ...\n", __FUNCTION__, __LINE__);
+ debug("[%s, %d] flash_info = 0x%08X ...\n", __FUNCTION__, __LINE__, flash_info);
+
/* Init: no FLASHes known */
for (i=0; i<CFG_MAX_FLASH_BANKS; ++i) {
flash_info[i].flash_id = FLASH_UNKNOWN;
@@ -57,6 +60,7 @@ unsigned long flash_init (void)
/* Static FLASH Bank configuration here - FIXME XXX */
+ debug("[%s, %d] Calling flash_get_size ...\n", __FUNCTION__, __LINE__);
size = flash_get_size((vu_long *)FLASH_BASE0_PRELIM, &flash_info[0]);
if (flash_info[0].flash_id == FLASH_UNKNOWN) {
@@ -64,8 +68,11 @@ unsigned long flash_init (void)
size, size<<20);
}
+ debug("[%s, %d] Test point ...\n", __FUNCTION__, __LINE__);
+
/* Setup offsets */
flash_get_offsets (-size, &flash_info[0]);
+ debug("[%s, %d] Test point ...\n", __FUNCTION__, __LINE__);
/* Re-do sizing to get full correct info */
mtdcr(ebccfga, pb0cr);
@@ -91,6 +98,7 @@ unsigned long flash_init (void)
}
pbcr = (pbcr & 0x0001ffff) | base | (size_val << 17);
mtdcr(ebccfgd, pbcr);
+ debug("[%s, %d] Test point ...\n", __FUNCTION__, __LINE__);
/* Monitor protection ON by default */
(void)flash_protect(FLAG_PROTECT_SET,
@@ -98,6 +106,7 @@ unsigned long flash_init (void)
0xffffffff,
&flash_info[0]);
+ debug("[%s, %d] Test point ...\n", __FUNCTION__, __LINE__);
flash_info[0].size = size;
return (size);
diff --git a/board/dave/common/flash.c b/board/dave/common/flash.c
index 446defc4b9b..bf0f2bf282f 100644
--- a/board/dave/common/flash.c
+++ b/board/dave/common/flash.c
@@ -220,6 +220,8 @@ static ulong flash_get_size (vu_long *addr, flash_info_t *info)
ulong base = (ulong)addr;
volatile CFG_FLASH_WORD_SIZE *addr2 = (CFG_FLASH_WORD_SIZE *)addr;
+ debug("[%s, %d] Entering ...\n", __FUNCTION__, __LINE__);
+
/* Write auto select command: read Manufacturer ID */
addr2[CFG_FLASH_ADDR0] = (CFG_FLASH_WORD_SIZE)0x00AA00AA;
addr2[CFG_FLASH_ADDR1] = (CFG_FLASH_WORD_SIZE)0x00550055;