summaryrefslogtreecommitdiff
path: root/board/fads/fads.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2006-03-12 01:55:43 +0100
committerWolfgang Denk <wd@pollux.denx.de>2006-03-12 01:55:43 +0100
commit8ff0208d31223e36f7c038982589b448d7fdd217 (patch)
tree82b06fcf1c0be99268361d90e3008b700ee6501b /board/fads/fads.c
parentf47b6611419bf81a128869fa78f9772cfada9af0 (diff)
downloadu-boot-imx-8ff0208d31223e36f7c038982589b448d7fdd217.zip
u-boot-imx-8ff0208d31223e36f7c038982589b448d7fdd217.tar.gz
u-boot-imx-8ff0208d31223e36f7c038982589b448d7fdd217.tar.bz2
Switch MPC86xADS and MPC885ADS boards to use cpuclk environment
variable to set clock Patch by Yuli Barcohen, 05 Jun 2005
Diffstat (limited to 'board/fads/fads.c')
-rw-r--r--board/fads/fads.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/board/fads/fads.c b/board/fads/fads.c
index 013b3cb..7b04af5 100644
--- a/board/fads/fads.c
+++ b/board/fads/fads.c
@@ -726,24 +726,23 @@ static void checkdboard(void)
int checkboard (void)
{
- /* get revision from BCSR 3 */
+#if defined(CONFIG_MPC86xADS)
+ puts ("Board: MPC86xADS\n");
+#elif defined(CONFIG_MPC885ADS)
+ puts ("Board: MPC885ADS\n");
+#else /* Only old ADS/FADS have got revision ID in BCSR3 */
uint r = (((*((uint *) BCSR3) >> 23) & 1) << 3)
| (((*((uint *) BCSR3) >> 19) & 1) << 2)
| (((*((uint *) BCSR3) >> 16) & 3));
puts ("Board: ");
-
-#if defined(CONFIG_MPC86xADS)
- puts ("MPC86xADS");
-#elif defined(CONFIG_MPC885ADS)
- puts ("MPC885ADS");
- r = 0; /* I've got NR (No Revision) board */
-#elif defined(CONFIG_FADS)
+#if defined(CONFIG_FADS)
puts ("FADS");
checkdboard ();
#else
puts ("ADS");
#endif
+
puts (" rev ");
switch (r) {
@@ -758,13 +757,9 @@ int checkboard (void)
puts ("A - warning, read errata \n");
break;
case 0x03:
- puts ("B \n");
+ puts ("B\n");
break;
-#elif defined(CONFIG_MPC885ADS)
- case 0x00:
- puts ("NR\n");
- break;
-#else /* FADS and newer */
+#else /* FADS */
case 0x00:
puts ("ENG\n");
break;
@@ -776,6 +771,7 @@ int checkboard (void)
printf ("unknown (0x%x)\n", r);
return -1;
}
+#endif /* CONFIG_MPC86xADS */
return 0;
}
@@ -848,7 +844,7 @@ int pcmcia_init(void)
switch ((pcmp->pcmc_pipr >> 14) & 3)
#endif
{
- case 0x00 :
+ case 0x03 :
printf("5V");
v = 5;
break;
@@ -860,7 +856,7 @@ int pcmcia_init(void)
v = 5;
#endif
break;
- case 0x03 :
+ case 0x00 :
printf("5V, 3V and x.xV");
#ifdef CONFIG_FADS
v = 3; /* User lower voltage if supported! */