projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'mpc86xx'
[oweals/u-boot.git]
/
board
/
fads
/
fads.c
diff --git
a/board/fads/fads.c
b/board/fads/fads.c
index 150714636650cdb451812336cea2d183f6d26a67..7b04af56c9f7afa9afb6192be1f47bcf956624a5 100644
(file)
--- a/
board/fads/fads.c
+++ b/
board/fads/fads.c
@@
-26,12
+26,13
@@
#include <config.h>
#include <common.h>
#include <mpc8xx.h>
#include <config.h>
#include <common.h>
#include <mpc8xx.h>
+#include <pcmcia.h>
#define _NOT_USED_ 0xFFFFFFFF
/* ========================================================================= */
#define _NOT_USED_ 0xFFFFFFFF
/* ========================================================================= */
-#ifndef CONFIG_
DUET_ADS /* No old DRAM on Duet
*/
+#ifndef CONFIG_
MPC885ADS /* No old DRAM on MPC885ADS
*/
#if defined(CONFIG_DRAM_50MHZ)
/* 50MHz tables */
#if defined(CONFIG_DRAM_50MHZ)
/* 50MHz tables */
@@
-290,7
+291,7
@@
static void _dramdisable(void)
/* maybe we should turn off upma here or something */
}
/* maybe we should turn off upma here or something */
}
-#endif /* !CONFIG_
DUET_
ADS */
+#endif /* !CONFIG_
MPC885
ADS */
/* ========================================================================= */
/* ========================================================================= */
@@
-604,7
+605,7
@@
long int initdram (int board_type)
uint sdramsz = 0; /* size of sdram in Mbytes */
uint base = 0; /* base of dram in bytes */
uint m = 0; /* size of dram in Mbytes */
uint sdramsz = 0; /* size of sdram in Mbytes */
uint base = 0; /* base of dram in bytes */
uint m = 0; /* size of dram in Mbytes */
-#ifndef CONFIG_
DUET_
ADS
+#ifndef CONFIG_
MPC885
ADS
uint k, s;
#endif
uint k, s;
#endif
@@
-614,7
+615,7
@@
long int initdram (int board_type)
printf ("(%u MB SDRAM) ", sdramsz);
}
#endif
printf ("(%u MB SDRAM) ", sdramsz);
}
#endif
-#ifndef CONFIG_
DUET_ADS /* No old DRAM on Duet
*/
+#ifndef CONFIG_
MPC885ADS /* No old DRAM on MPC885ADS
*/
k = (*((uint *) BCSR2) >> 23) & 0x0f;
switch (k & 0x3) {
k = (*((uint *) BCSR2) >> 23) & 0x0f;
switch (k & 0x3) {
@@
-665,7
+666,7
@@
long int initdram (int board_type)
_dramdisable ();
m = 0;
}
_dramdisable ();
m = 0;
}
-#endif /* !CONFIG_
DUET_
ADS */
+#endif /* !CONFIG_
MPC885
ADS */
m += sdramsz; /* add sdram size to total */
return (m << 20);
m += sdramsz; /* add sdram size to total */
return (m << 20);
@@
-725,24
+726,23
@@
static void checkdboard(void)
int checkboard (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: ");
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_DUET_ADS)
- puts ("DUET ADS");
- 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 ("FADS");
checkdboard ();
#else
puts ("ADS");
#endif
+
puts (" rev ");
switch (r) {
puts (" rev ");
switch (r) {
@@
-757,13
+757,9
@@
int checkboard (void)
puts ("A - warning, read errata \n");
break;
case 0x03:
puts ("A - warning, read errata \n");
break;
case 0x03:
- puts ("B \n");
- break;
-#elif defined(CONFIG_DUET_ADS)
- case 0x00:
- puts ("NR\n");
+ puts ("B\n");
break;
break;
-#else /* FADS
and newer
*/
+#else /* FADS */
case 0x00:
puts ("ENG\n");
break;
case 0x00:
puts ("ENG\n");
break;
@@
-775,6
+771,7
@@
int checkboard (void)
printf ("unknown (0x%x)\n", r);
return -1;
}
printf ("unknown (0x%x)\n", r);
return -1;
}
+#endif /* CONFIG_MPC86xADS */
return 0;
}
return 0;
}
@@
-790,7
+787,7
@@
volatile unsigned char *pcmcia_mem = (unsigned char*)CFG_PCMCIA_MEM_ADDR;
int pcmcia_init(void)
{
volatile pcmconf8xx_t *pcmp;
int pcmcia_init(void)
{
volatile pcmconf8xx_t *pcmp;
- uint v, slota
, slotb
;
+ uint v, slota
= 0, slotb = 0
;
/*
** Enable the PCMCIA for a Flash card.
/*
** Enable the PCMCIA for a Flash card.
@@
-805,10
+802,10
@@
int pcmcia_init(void)
/* Set all slots to zero by default. */
pcmp->pcmc_pgcra = 0;
pcmp->pcmc_pgcrb = 0;
/* Set all slots to zero by default. */
pcmp->pcmc_pgcra = 0;
pcmp->pcmc_pgcrb = 0;
-#ifdef PCMCIA_SLOT_A
+#ifdef
CONFIG_
PCMCIA_SLOT_A
pcmp->pcmc_pgcra = 0x40;
#endif
pcmp->pcmc_pgcra = 0x40;
#endif
-#ifdef PCMCIA_SLOT_B
+#ifdef
CONFIG_
PCMCIA_SLOT_B
pcmp->pcmc_pgcrb = 0x40;
#endif
pcmp->pcmc_pgcrb = 0x40;
#endif
@@
-817,17
+814,17
@@
int pcmcia_init(void)
/* Check if any PCMCIA card is plugged in. */
/* Check if any PCMCIA card is plugged in. */
+#ifdef CONFIG_PCMCIA_SLOT_A
slota = (pcmp->pcmc_pipr & 0x18000000) == 0 ;
slota = (pcmp->pcmc_pipr & 0x18000000) == 0 ;
+#endif
+#ifdef CONFIG_PCMCIA_SLOT_B
slotb = (pcmp->pcmc_pipr & 0x00001800) == 0 ;
slotb = (pcmp->pcmc_pipr & 0x00001800) == 0 ;
+#endif
if (!(slota || slotb)) {
printf("No card present\n");
if (!(slota || slotb)) {
printf("No card present\n");
-#ifdef PCMCIA_SLOT_A
pcmp->pcmc_pgcra = 0;
pcmp->pcmc_pgcra = 0;
-#endif
-#ifdef PCMCIA_SLOT_B
pcmp->pcmc_pgcrb = 0;
pcmp->pcmc_pgcrb = 0;
-#endif
return -1;
}
else
return -1;
}
else
@@
-847,7
+844,7
@@
int pcmcia_init(void)
switch ((pcmp->pcmc_pipr >> 14) & 3)
#endif
{
switch ((pcmp->pcmc_pipr >> 14) & 3)
#endif
{
- case 0x0
0
:
+ case 0x0
3
:
printf("5V");
v = 5;
break;
printf("5V");
v = 5;
break;
@@
-859,7
+856,7
@@
int pcmcia_init(void)
v = 5;
#endif
break;
v = 5;
#endif
break;
- case 0x0
3
:
+ case 0x0
0
:
printf("5V, 3V and x.xV");
#ifdef CONFIG_FADS
v = 3; /* User lower voltage if supported! */
printf("5V, 3V and x.xV");
#ifdef CONFIG_FADS
v = 3; /* User lower voltage if supported! */
@@
-908,9
+905,10
@@
int pcmcia_init(void)
udelay(20);
udelay(20);
-#ifdef PCMCIA_SLOT_A
+#ifdef
CONFIG_
PCMCIA_SLOT_A
pcmp->pcmc_pgcra = 0;
pcmp->pcmc_pgcra = 0;
-#elif PCMCIA_SLOT_B
+#endif
+#ifdef CONFIG_PCMCIA_SLOT_B
pcmp->pcmc_pgcrb = 0;
#endif
pcmp->pcmc_pgcrb = 0;
#endif