Commit 180d3f74 authored by wdenk's avatar wdenk
Browse files

* Fix problems caused by Robert Schwebel's cramfs patch

* Patch by Scott McNutt, 02 Jan 2004:
  Add support for the Nios Active Serial Memory Interface (ASMI)
  on Cyclone devices

* Patch by Andrea Marson, 16 Dec 2003:
  Add support for the PPChameleon ME and HI modules

* Patch by Yuli Barcohen, 22 Dec 2003:
  Add support for Motorola DUET ADS board (MPC87x/88x)
parent dd875c76
......@@ -2,6 +2,16 @@
Changes since U-Boot 1.0.0:
======================================================================
* Patch by Scott McNutt, 02 Jan 2004:
Add support for the Nios Active Serial Memory Interface (ASMI)
on Cyclone devices
* Patch by Andrea Marson, 16 Dec 2003:
Add support for the PPChameleon ME and HI modules
* Patch by Yuli Barcohen, 22 Dec 2003:
Add support for Motorola DUET ADS board (MPC87x/88x)
* Patch by Robert Schwebel, 15 Dec 2003:
add support for cramfs (uses JFFS2 command interface)
......
......@@ -34,20 +34,21 @@ LIST_5xxx=" \
LIST_8xx=" \
AdderII ADS860 AMX860 c2mon \
CCM cogent_mpc8xx ESTEEM192E ETX094 \
ELPT860 FADS823 FADS850SAR FADS860T \
FLAGADM FPS850L GEN860T GEN860T_SC \
GENIETV GTH hermes IAD210 \
ICU862_100MHz IP860 IVML24 IVML24_128 \
IVML24_256 IVMS8 IVMS8_128 IVMS8_256 \
KUP4K LANTEC lwmon MBX \
MBX860T MHPC MPC86xADS MVS1 \
NETVIA NETVIA_V2 NX823 pcu_e \
QS823 QS850 QS860T R360MPI \
RBC823 rmu RPXClassic RPXlite \
RRvision SM850 SPD823TS svm_sc8xx \
SXNI855T TOP860 TQM823L TQM823L_LCD \
TQM850L TQM855L TQM860L v37 \
CCM cogent_mpc8xx DUET_ADS ESTEEM192E \
ETX094 ELPT860 FADS823 FADS850SAR \
FADS860T FLAGADM FPS850L GEN860T \
GEN860T_SC GENIETV GTH hermes \
IAD210 ICU862_100MHz IP860 IVML24 \
IVML24_128 IVML24_256 IVMS8 IVMS8_128 \
IVMS8_256 KUP4K LANTEC lwmon \
MBX MBX860T MHPC MPC86xADS \
MVS1 NETVIA NETVIA_V2 NX823 \
pcu_e QS823 QS850 QS860T \
R360MPI RBC823 rmu RPXClassic \
RPXlite RRvision SM850 SPD823TS \
svm_sc8xx SXNI855T TOP860 TQM823L \
TQM823L_LCD TQM850L TQM855L TQM860L \
v37 \
"
#########################################################################
......
......@@ -99,7 +99,7 @@ LIBS = lib_generic/libgeneric.a
LIBS += board/$(BOARDDIR)/lib$(BOARD).a
LIBS += cpu/$(CPU)/lib$(CPU).a
LIBS += lib_$(ARCH)/lib$(ARCH).a
LIBS += fs/jffs2/libjffs2.a fs/fdos/libfdos.a fs/fat/libfat.a
LIBS += fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a
LIBS += net/libnet.a
LIBS += disk/libdisk.a
LIBS += rtc/librtc.a
......@@ -249,7 +249,12 @@ TOP5200_config: unconfig
AdderII_config: unconfig
@./mkconfig $(@:_config=) ppc mpc8xx adderII
ADS860_config: unconfig
ADS860_config \
DUET_ADS_config \
FADS823_config \
FADS850SAR_config \
MPC86xADS_config \
FADS860T_config: unconfig
@./mkconfig $(@:_config=) ppc mpc8xx fads
AMX860_config : unconfig
......@@ -279,12 +284,6 @@ ESTEEM192E_config: unconfig
ETX094_config : unconfig
@./mkconfig $(@:_config=) ppc mpc8xx etx094
FADS823_config \
FADS850SAR_config \
MPC86xADS_config \
FADS860T_config: unconfig
@./mkconfig $(@:_config=) ppc mpc8xx fads
FLAGADM_config: unconfig
@./mkconfig $(@:_config=) ppc mpc8xx flagadm
......
......@@ -202,7 +202,7 @@ Directory Hierarchy:
- board/Marvell/db64460 Files specific to db64460 board
- board/mbx8xx Files specific to MBX boards
- board/mpc8260ads
Files specific to MPC8260ADS and PQ2FADS-ZU boards
Files specific to MPC826xADS and PQ2FADS-ZU/VR boards
- board/mpc8540ads
Files specific to MPC8540ADS boards
- board/mpc8560ads
......@@ -370,7 +370,7 @@ The following options need to be configured:
CONFIG_NETVIA, CONFIG_RBC823, CONFIG_ZPC1900,
CONFIG_MPC8540ADS, CONFIG_MPC8560ADS, CONFIG_QS850,
CONFIG_QS823, CONFIG_QS860T, CONFIG_DB64360,
CONFIG_DB64460
CONFIG_DB64460, CONFIG_DUET_ADS
ARM based boards:
-----------------
......@@ -407,7 +407,7 @@ The following options need to be configured:
CONFIG_ADSTYPE
Possible values are:
CFG_8260ADS - original MPC8260ADS
CFG_8266ADS - MPC8266ADS (untested)
CFG_8266ADS - MPC8266ADS
CFG_PQ2FADS - PQ2FADS-ZU or PQ2FADS-VR
......@@ -2004,7 +2004,7 @@ configurations; the following names are supported:
at91rm9200dk_config omap1510inn_config MPC8260ADS_config
omap1610inn_config ZPC1900_config MPC8540ADS_config
MPC8560ADS_config QS850_config QS823_config
QS860T_config
QS860T_config DUET_ADS_config
Note: for some board special configuration names may exist; check if
additional information is available from the board vendor; for
......@@ -3158,6 +3158,13 @@ Please note that U-Boot is implemented in C (and to some small parts
in Assembler); no C++ is used, so please do not use C++ style
comments (//) in your code.
Please also stick to the following formatiing rules:
- remove any trailing white space
- use TAB characters for indentation, not spaces
- make sure NOT to use DOS '\r\n' line feeds
- do not add more than 2 empty lines to source files
- do not add trailing empty lines to source files
Submissions which do not conform to the standards may be returned
with a request to reformat the changes.
......
/*
* (C) Copyright 2001-2003
* Stefan Roese, esd gmbh germany, stefan.roese@esd-electronics.com
* (C) Copyright 2003
* DAVE Srl
* http://www.dave-tech.it
* http://www.wawnet.biz
* mailto:info@wawnet.biz
*
* See file CREDITS for list of people who contributed to this
* project.
......
#
# (C) Copyright 2000
# (C) Copyright 2000-2004
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# Modified by, Yuli Barcohen, Arabella Software Ltd., yuli@arabellasw.com
#
# See file CREDITS for list of people who contributed to this
# project.
#
......@@ -22,9 +24,11 @@
#
#
# Motorola old MPC821/860ADS, MPC8xxFADS, and new MPC866ADS boards
# Motorola old MPC821/860ADS, MPC8xxFADS, new MPC866ADS, and DUET
# (MPC87x/88x) ADS boards
#
TEXT_BASE = 0xFE000000
#TEXT_BASE = 0x02800000
#OBJCFLAGS = --set-section-flags=.ppcenv=contents,alloc,load,data
PLATFORM_CPPFLAGS += -I$(TOPDIR)/board/fads
HOST_CFLAGS += -I$(TOPDIR)/board/fads
HOST_ENVIRO_CFLAGS += -I$(TOPDIR)/board/fads
/*
* (C) Copyright 2000
* (C) Copyright 2000-2004
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
* Modified by, Yuli Barcohen, Arabella Software Ltd., yuli@arabellasw.com
*
* See file CREDITS for list of people who contributed to this
* project.
*
......@@ -21,15 +23,16 @@
* MA 02111-1307 USA
*/
#include <common.h>
#include <config.h>
#include <common.h>
#include <mpc8xx.h>
#include "fads.h"
/* ------------------------------------------------------------------------- */
#define _NOT_USED_ 0xFFFFFFFF
/* ========================================================================= */
#ifndef CONFIG_DUET_ADS /* No old DRAM on Duet */
#if defined(CONFIG_DRAM_50MHZ)
/* 50MHz tables */
static const uint dram_60ns[] =
......@@ -183,105 +186,6 @@ static const uint edo_70ns[] =
#error dram not correctly defined - use CONFIG_DRAM_25MHZ or CONFIG_DRAM_50MHZ
#endif
/* ------------------------------------------------------------------------- */
/*
* Check Board Identity:
*/
#if defined(CONFIG_FADS) && !defined(CONFIG_MPC86xADS)
static void checkdboard(void)
{
/* get db type from BCSR 3 */
uint k = (*((uint *)BCSR3) >> 24) & 0x3f;
printf(" with db ");
switch(k) {
case 0x03 :
puts ("MPC823");
break;
case 0x20 :
puts ("MPC801");
break;
case 0x21 :
puts ("MPC850");
break;
case 0x22 :
puts ("MPC821, MPC860 / MPC860SAR / MPC860T");
break;
case 0x23 :
puts ("MPC860SAR");
break;
case 0x24 :
case 0x2A :
puts ("MPC860T");
break;
case 0x3F :
puts ("MPC850SAR");
break;
default : printf("0x%x", k);
}
}
#endif /* defined(CONFIG_FADS) && !defined(CONFIG_MPC86xADS) */
int checkboard (void)
{
/* get revision from BCSR 3 */
uint r = (((*((uint *) BCSR3) >> 23) & 1) << 3)
| (((*((uint *) BCSR3) >> 19) & 1) << 2)
| (((*((uint *) BCSR3) >> 16) & 3));
puts ("Board: ");
#ifdef CONFIG_FADS
# ifdef CONFIG_MPC86xADS
puts ("MPC86xADS");
# else
puts ("FADS");
checkdboard ();
# endif /* !CONFIG_MPC86xADS */
printf (" rev ");
switch (r) {
case 0x00:
puts ("ENG\n");
break;
case 0x01:
puts ("PILOT\n");
break;
default:
printf ("unknown (0x%x)\n", r);
return (-1);
}
#endif /* CONFIG_FADS */
#ifdef CONFIG_ADS
printf ("ADS rev ");
switch (r) {
case 0x00:
puts ("ENG - this board sucks, check the errata, not supported\n");
return -1;
case 0x01:
puts ("PILOT - warning, read errata \n");
break;
case 0x02:
puts ("A - warning, read errata \n");
break;
case 0x03:
puts ("B \n");
break;
default:
printf ("unknown revision (0x%x)\n", r);
return (-1);
}
#endif /* CONFIG_ADS */
return 0;
}
/* ------------------------------------------------------------------------- */
static long int dram_size (long int *base, long int maxsize)
{
......@@ -425,9 +329,11 @@ static void _dramdisable(void)
/* maybe we should turn off upma here or something */
}
#endif /* !CONFIG_DUET_ADS */
#ifdef CONFIG_FADS
/* SDRAM SUPPORT (FADS ONLY) */
/* ========================================================================= */
#ifdef CONFIG_FADS /* SDRAM exists on FADS and newer boards */
#if defined(CONFIG_SDRAM_100MHZ)
......@@ -728,15 +634,18 @@ static int initsdram(uint base, uint *noMbytes)
}
}
/* SDRAM SUPPORT (FADS ONLY) */
#endif /* CONFIG_FADS */
/* ========================================================================= */
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 */
#ifndef CONFIG_DUET_ADS
uint k, s;
#endif
#ifdef CONFIG_FADS
if (!initsdram (0x00000000, &sdramsz)) {
......@@ -744,7 +653,7 @@ long int initdram (int board_type)
printf ("(%u MB SDRAM) ", sdramsz);
}
#endif
#ifndef CONFIG_DUET_ADS /* No old DRAM on Duet */
k = (*((uint *) BCSR2) >> 23) & 0x0f;
switch (k & 0x3) {
......@@ -795,17 +704,9 @@ long int initdram (int board_type)
_dramdisable ();
m = 0;
}
#endif /* !CONFIG_DUET_ADS */
m += sdramsz; /* add sdram size to total */
if (!m) {
/********************************
*DRAM ERROR, HALT PROCESSOR
*********************************/
while (1);
return -1;
}
return (m << 20);
}
......@@ -819,6 +720,105 @@ int testdram (void)
return (0);
}
/* ========================================================================= */
/*
* Check Board Identity:
*/
#if defined(CONFIG_FADS) && defined(CFG_DAUGHTERBOARD)
static void checkdboard(void)
{
/* get db type from BCSR 3 */
uint k = (*((uint *)BCSR3) >> 24) & 0x3f;
puts (" with db ");
switch(k) {
case 0x03 :
puts ("MPC823");
break;
case 0x20 :
puts ("MPC801");
break;
case 0x21 :
puts ("MPC850");
break;
case 0x22 :
puts ("MPC821, MPC860 / MPC860SAR / MPC860T");
break;
case 0x23 :
puts ("MPC860SAR");
break;
case 0x24 :
case 0x2A :
puts ("MPC860T");
break;
case 0x3F :
puts ("MPC850SAR");
break;
default : printf("0x%x", k);
}
}
#endif /* defined(CONFIG_FADS) && defined(CFG_DAUGHTERBOARD) */
int checkboard (void)
{
/* get revision from BCSR 3 */
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)
puts ("FADS");
checkdboard ();
#else
puts ("ADS");
#endif
puts (" rev ");
switch (r) {
#if defined(CONFIG_ADS)
case 0x00:
puts ("ENG - this board sucks, check the errata, not supported\n");
return -1;
case 0x01:
puts ("PILOT - warning, read errata \n");
break;
case 0x02:
puts ("A - warning, read errata \n");
break;
case 0x03:
puts ("B \n");
break;
#elif defined(CONFIG_DUET_ADS)
case 0x00:
puts ("NR\n");
break;
#else /* FADS and newer */
case 0x00:
puts ("ENG\n");
break;
case 0x01:
puts ("PILOT\n");
break;
#endif /* CONFIG_ADS */
default:
printf ("unknown (0x%x)\n", r);
return -1;
}
return 0;
}
/* ========================================================================= */
#if (CONFIG_COMMANDS & CFG_CMD_PCMCIA)
......@@ -964,7 +964,7 @@ int pcmcia_init(void)
#endif /* CFG_CMD_PCMCIA */
/* ------------------------------------------------------------------------- */
/* ========================================================================= */
#ifdef CFG_PC_IDE_RESET
......@@ -988,4 +988,3 @@ void ide_set_reset(int on)
}
#endif /* CFG_PC_IDE_RESET */
/* ------------------------------------------------------------------------- */
/*
* (C) Copyright 2000
* (C) Copyright 2000-2004
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
* Derived from FADS860T definitions by Magnus Damm, Helmut Buchsbaum,
* and Dan Malek
*
* Modified by, Yuli Barcohen, Arabella Software Ltd., yuli@arabellasw.com
*
* This header file contains values common to all FADS family boards.
*
* See file CREDITS for list of people who contributed to this
* project.
*
......@@ -22,23 +29,435 @@
*/
/****************************************************************************
* FLASH Memory Map as used by FADS Monitor:
* Flash Memory Map as used by U-Boot:
*
* Start Address Length
* +-----------------------+ 0xFE00_0000 Start of Flash -----------------
* | MON8xx code | 0xFE00_0100 Reset Vector
* +-----------------------+ 0xFE0?_????
* | (unused) |
* +-----------------------+ 0xFE01_FF00
* | Ethernet Addresses | 0x78
* +-----------------------+ 0xFE01_FF78
* | (Reserved for MON8xx) | 0x44
* +-----------------------+ 0xFE01_FFBC
* | Lock Address | 0x04
* +-----------------------+ 0xFE01_FFC0 ^
* | Hardware Information | 0x40 | MON8xx
* +=======================+ 0xFE02_0000 (sector border) -----------------
* | Autostart Header | | Applications
* | | 0xFE00_0100 Reset Vector
* + + 0xFE0?_????
* | U-Boot code |
* | |
* +-----------------------+ 0xFE04_0000 (sector border)
* | |
* | |
* | U-Boot environment |
* | | ^
* | | | U-Boot
* +=======================+ 0xFE08_0000 (sector border) -----------------
* | Available | | Applications
* | ... | v
*
*****************************************************************************/
/* should ALWAYS define this, measure_gclk in speed.c is unreliable */
/* in general, we always know this for FADS+new ADS anyway */
#define CONFIG_8xx_GCLK_FREQ ((CFG_8XX_XIN) * (CFG_8XX_FACT))
#if 0
#define CONFIG_BOOTDELAY -1 /* autoboot disabled */
#else
#define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */
#endif
#undef CONFIG_BOOTARGS
#define CONFIG_BOOTCOMMAND \
"dhcp;" \
"setenv bootargs root=/dev/nfs rw nfsroot=$(serverip):$(rootpath) " \
"ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname)::off;" \
"bootm"
#undef CONFIG_WATCHDOG /* watchdog disabled */
/*
* New MPC86xADS and Duet provide two Ethernet connectivity options:
* 10Mbit/s on SCC and 100Mbit/s on FEC. FADS provides SCC Ethernet on
* motherboard and FEC Ethernet on daughterboard. All new PQ1 chips have
* got FEC so FEC is the default.
*/
#ifndef CONFIG_ADS
#undef CONFIG_SCC1_ENET /* Disable SCC1 ethernet */
#define CONFIG_FEC_ENET /* Use FEC ethernet */
#else /* Old ADS has not got FEC option */
#define CONFIG_SCC1_ENET /* Use SCC1 ethernet */
#undef CONFIG_FEC_ENET /* No FEC ethernet */
#endif /* !CONFIG_ADS */
#if defined(CONFIG_SCC1_ENET) && defined(CONFIG_FEC_ENET)
#error Both CONFIG_SCC1_ENET and CONFIG_FEC_ENET configured
#endif
#ifdef CONFIG_FEC_ENET
#define CFG_DISCOVER_PHY
#endif
#ifndef CONFIG_COMMANDS
#define CONFIG_COMMANDS (CONFIG_CMD_DFL \
| CFG_CMD_DHCP \
| CFG_CMD_IMMAP \
| CFG_CMD_MII \
| CFG_CMD_PING \
)
#endif /* !CONFIG_COMMANDS */
/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
#include <cmd_confdefs.h>
/*
* Miscellaneous configurable options
*/
#undef CFG_LONGHELP /* undef to save memory */
#define CFG_PROMPT "=>" /* Monitor Command Prompt */
#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
#define CFG_CBSIZE 1024 /* Console I/O Buffer Size */
#else
#define CFG_CBSIZE 256 /* Console I/O Buffer Size */
#endif
#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
#define CFG_MAXARGS 16 /* max number of command args */
#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
#define CFG_LOAD_ADDR 0x00100000
#define CFG_HZ 1000 /* decrementer freq: 1 ms ticks */
#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
/*
* Low Level Configuration Settings
* (address mappings, register initial values, etc.)
* You should know what you are doing if you make changes here.
*/
/*-----------------------------------------------------------------------
* Internal Memory Mapped Register
*/
#define CFG_IMMR 0xFF000000
/*-----------------------------------------------------------------------
* Definitions for initial stack pointer and data area (in DPRAM)
*/
#define CFG_INIT_RAM_ADDR CFG_IMMR
#define CFG_INIT_RAM_END 0x2F00 /* End of used area in DPRAM */
#define CFG_GBL_DATA_SIZE 64 /* size in bytes reserved for initial data */
#define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
#define CFG_INIT_SP_OFFSET CFG_GBL_DATA_OFFSET
/*-----------------------------------------------------------------------
* Start addresses for the final memory configuration
* (Set up by the startup code)
* Please note that CFG_SDRAM_BASE _must_ start at 0