summaryrefslogtreecommitdiff
path: root/board/esd/dp405/dp405.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2009-06-14 22:05:42 +0200
committerWolfgang Denk <wd@denx.de>2009-06-14 22:05:42 +0200
commit92afd368bba7d98b2b7bfb51082c3639bb2119b3 (patch)
tree74ffc8a3f4980f7c6bad6bf80bb41d3974eff685 /board/esd/dp405/dp405.c
parent6b1f78ae6ad037382ad430b07064105c88f7ac02 (diff)
parent388517e4b745b00256c2fa201ce7bccb67b4f245 (diff)
downloadu-boot-imx-92afd368bba7d98b2b7bfb51082c3639bb2119b3.zip
u-boot-imx-92afd368bba7d98b2b7bfb51082c3639bb2119b3.tar.gz
u-boot-imx-92afd368bba7d98b2b7bfb51082c3639bb2119b3.tar.bz2
Merge branch 'next' of ../master
Diffstat (limited to 'board/esd/dp405/dp405.c')
-rw-r--r--board/esd/dp405/dp405.c40
1 files changed, 26 insertions, 14 deletions
diff --git a/board/esd/dp405/dp405.c b/board/esd/dp405/dp405.c
index c32c7c7..8f4b78d 100644
--- a/board/esd/dp405/dp405.c
+++ b/board/esd/dp405/dp405.c
@@ -29,14 +29,6 @@
DECLARE_GLOBAL_DATA_PTR;
-/* fpga configuration data - not compressed, generated by bin2c */
-const unsigned char fpgadata[] =
-{
-#include "fpgadata.c"
-};
-int filesize = sizeof(fpgadata);
-
-
int board_early_init_f (void)
{
/*
@@ -97,20 +89,40 @@ int checkboard (void)
int i = getenv_r ("serial#", str, sizeof(str));
unsigned char trans[16] = {0x0,0x8,0x4,0xc,0x2,0xa,0x6,0xe,
0x1,0x9,0x5,0xd,0x3,0xb,0x7,0xf};
- unsigned char id1, id2;
+ unsigned char id1, id2, rev;
puts ("Board: ");
- if (i == -1) {
+ if (i == -1)
puts ("### No HW ID - assuming DP405");
- } else {
+ else
puts(str);
- }
id1 = trans[(~(in_be32((void *)GPIO0_IR) >> 5)) & 0x0000000f];
id2 = trans[(~(in_be32((void *)GPIO0_IR) >> 9)) & 0x0000000f];
- printf(" (ID=0x%1X%1X, PLD=0x%02X)\n",
- id2, id1, in_8((void *)0xf0001000));
+
+ rev = in_8((void *)0xf0001000);
+ if (rev & 0x10) /* old DP405 compatibility */
+ rev = in_8((void *)0xf0000800);
+
+ switch (rev & 0xc0) {
+ case 0x00:
+ puts(" (HW=DP405");
+ break;
+ case 0x80:
+ puts(" (HW=DP405/CO");
+ break;
+ case 0xc0:
+ puts(" (HW=DN405");
+ break;
+ }
+ printf(", ID=0x%1X%1X, PLD=0x%02X", id2, id1, rev & 0x0f);
+
+ if ((rev & 0xc0) == 0xc0) {
+ printf(", C5V=%s",
+ in_be32((void *)GPIO0_IR) & 0x40000000 ? "off" : "on");
+ }
+ puts(")\n");
return 0;
}