Compare commits

...

17 Commits

Author SHA1 Message Date
wdenk
fa1399ed12 Accelerate booting on TRAB board: read and check autoupdate image
headers first instead of always reading the whole images.
2003-12-06 11:20:01 +00:00
wdenk
b96619a117 Fix typo in MPC5XXX code (pointed out by Victor Wren) 2003-12-05 21:08:38 +00:00
wdenk
af6d1dfc7f * Enabled password check on RMU board
* Fix configuration problem with IceCube in LOWBOOT configuration:
  environment got embedded, corrupting the image layout.
2003-12-03 23:53:42 +00:00
wdenk
fd3103bb8e Add support for BMS2003 board
(featuring a NEC NL6448BC33-54. 10.4", 640x480 TFT display).
Fix NEC display names (it's 6440 [for 640x480], not 6640).
2003-11-25 16:55:19 +00:00
wdenk
b4757cee52 Fix flash driver for TRAB board (must use Unlock Bypass Reset command
to exit Unlock Bypass Mode); adjust timings for flash, SRAM and CPLD
2003-11-17 21:45:27 +00:00
wdenk
5bb226e821 * Use "-fPIC" instead of "-mrelocatable" to prevent problems with
recent tools

* Add checksum verification to 'imls' command

* Add bd_info fields needed for 4xx Linux I2C driver

* Patch by Martin Krause, 4 Nov. 2003:
  Fix error in cmd_vfd.c (TRAB board: "vfd /1" shows now only one Bitmap)

* Print used network interface when CONFIG_NET_MULTI is set
2003-11-17 21:14:37 +00:00
wdenk
5cf9da4821 * Patch by Bernhard Kuhn, 28 Oct 2003:
Add low boot support for MPC5200

* Fix problem with dual PCMCIA support (NSCU)

* Fix MPC5200 I2C initialization function
2003-11-07 13:42:26 +00:00
wdenk
b13fb01a62 * Fix parameter passing to standalone images with bootm command
* Patch by Kyle Harris, 30 Oct 2003:
  Fix build errors for ixdp425 board

* Patch by David M. Horn, 29 Oct 2003:
  Fixes to build under CYGWIN

* Get IceCube MGT5100 working (again)
2003-10-30 21:49:38 +00:00
wdenk
5fa66df63a * Prepare for release
* Fix problems in memory test on some boards (which was not
  non-destructive as intended)

* Patch by Gary Jennejohn, 28 Oct 2003:
  Change fs/fat/fat.c to put I/O buffers in BSS instead on the stack
  to prevent stack overflow on ARM systems
2003-10-29 23:18:55 +00:00
wdenk
a0f2fe524c * Patch by Stephan Linz, 28 Oct 2003:
fix init sequence error for NIOS port

* Allow lowercase spelling for IceCube_5200; support MPC5200LITE name

* Add CONFIG_VERSION_VARIABLE to TRAB configuration
2003-10-28 09:14:21 +00:00
wdenk
a57a496f4d * Patch by Xiao Xianghua, 23 Oct 2003:
small patch for mpc85xx

* Fix small problem in MPC5200 I2C driver

* Fix FCC3 support on ATC board
2003-10-26 22:52:58 +00:00
dzu
8cb8143ef7 * Correct header printing for multi-image files in do_bootm()
* Make CONFIG_SILENT_CONSOLE work with CONFIG_AUTOBOOT_KEYED
2003-10-24 13:14:45 +00:00
wdenk
4654af27b8 Fix PCI problems on PPChameleon board 2003-10-22 09:00:28 +00:00
wdenk
a3ad8e26a4 * Patch by Steven Scholz, 18 Oct 2003:
Fix AT91RM9200 ethernet driver

* Patch by Nye Liu, 17 Oct 2003:
  Fix typo in include/mpc8xx.h

* Patch by Richard Woodruff, 16 Oct 03:
  Fixes for cpu/arm925/interrupt.c
  - Initialize timestamp & lastdec vars.
  - fix timestamp overflows.
  - fix lastdec overflow.
  - smarter normalization to allow udelay() below 1ms to work.

* Patch by Scott McNutt, 16 Oct
  add networking support for the Altera Nios Development Kit,
  Cyclone Edition (DK-1C20)

* Patch by Jon Diekema, 14 Oct 2003:
  add hint about doc/README.silent to README file
2003-10-19 23:22:11 +00:00
wdenk
d7281f4109 * Fix PCI problems on PPChameleonEVB
* TRAB auto-update: image type patch by Martin Krause, 17 Oct 2003
2003-10-19 22:30:08 +00:00
dzu
e7df029f1a Add CompactFlash support for NSCU 2003-10-19 21:43:26 +00:00
wdenk
3d1e8a9d4e TRAB auto-update: Base decision if we have to strip the image
header on image type as encoded in the header
2003-10-16 12:53:35 +00:00
70 changed files with 856 additions and 300 deletions

107
CHANGELOG
View File

@@ -1,7 +1,114 @@
======================================================================
Changes since U-Boot 1.0.0:
======================================================================
* Accelerate booting on TRAB board: read and check autoupdate image
headers first instead of always reading the whole images.
* Fix type in MPC5XXX code (pointed out by Victor Wren)
* Enabled password check on RMU board
* Fix configuration problem with IceCube in LOWBOOT configuration:
envrionment got embedded, corrupting the image layout.
* Fix NEC display names (it's 6440 [for 640x480], not 6640).
* Added BMS2003 board
add support for NEC NL6448BC33-54. 10.4", 640x480 TFT display
* Fix flash driver for TRAB board (must use Unlock Bypass Reset
command to exit Unlock Bypass Mode); adjust timings for flash, SRAM
and CPLD
* Use "-fPIC" instead of "-mrelocatable" to prevent problems with
recent tools
* Add checksum verification to 'imls' command
* Add bd_info fields needed for 4xx Linux I2C driver
* Patch by Martin Krause, 4 Nov. 2003:
Fix error in cmd_vfd.c (TRAB board: "vfd /1" shows now only one Bitmap)
* Print used network interface when CONFIG_NET_MULTI is set
* Patch by Bernhard Kuhn, 28 Oct 2003:
Add low boot support for MPC5200
* Fix problem with dual PCMCIA support (NSCU)
* Fix MPC5200 I2C initialization function
======================================================================
Changes for U-Boot 1.0.0:
======================================================================
* Fix parameter passing to standalone images with bootm command
* Patch by Kyle Harris, 30 Oct 2003:
Fix build errors for ixdp425 board
* Patch by David M. Horn, 29 Oct 2003:
Fixes to build under CYGWIN
* Get IceCube MGT5100 working (again)
* Fix problems in memory test on some boards (which was not
non-destructive as intended)
* Patch by Gary Jennejohn, 28 Oct 2003:
Change fs/fat/fat.c to put I/O buffers in BSS instead on the stack
to prevent stack overflow on ARM systems
* Patch by Stephan Linz, 28 Oct 2003:
fix init sequence error for NIOS port
* Allow lowercase spelling for IceCube_5200; support MPC5200LITE name
* Add CONFIG_VERSION_VARIABLE to TRAB configuration
* Patch by Xiao Xianghua, 23 Oct 2003:
small patch for mpc85xx
* Fix small problem in MPC5200 I2C driver
* Fix FCC3 support on ATC board
* Correct header printing for multi-image files in do_bootm()
* Make CONFIG_SILENT_CONSOLE work with CONFIG_AUTOBOOT_KEYED
* Fix PCI problems on PPChameleon board
* Patch by Steven Scholz, 18 Oct 2003:
Fix AT91RM9200 ethernet driver
* Patch by Nye Liu, 17 Oct 2003:
Fix typo in include/mpc8xx.h
* Patch by Richard Woodruff, 16 Oct 03:
Fixes for cpu/arm925/interrupt.c
- Initialize timestamp & lastdec vars.
- fix timestamp overflows.
- fix lastdec overflow.
- smarter normalization to allow udelay() below 1ms to work.
* Patch by Scott McNutt, 16 Oct
add networking support for the Altera Nios Development Kit,
Cyclone Edition (DK-1C20)
* Patch by Jon Diekema, 14 Oct 2003:
add hint about doc/README.silent to README file
* Add CompactFlash support for NSCU
* Fix PCI problems on PPChameleonEVB
* TRAB auto-update: Base decision if we have to strip the image
header on image type as encoded in the header
(include image type patch by Martin Krause, 17 Oct 2003)
* Patches by Xianghua Xiao, 15 Oct 2003:
- Added Motorola CPU 8540/8560 support (cpu/85xx)

View File

@@ -203,14 +203,26 @@ cmi_mpc5xx_config: unconfig
#########################################################################
## MPC5xxx Systems
#########################################################################
IceCube_5200_config \
MPC5200LITE_config \
MPC5200LITE_LOWBOOT_config \
MPC5200LITE_LOWBOOT08_config \
icecube_5200_config \
IceCube_5200_config \
IceCube_5100_config: unconfig
@ >include/config.h
@[ -z "$(findstring _5200,$@)" ] || \
@[ -z "$(findstring LOWBOOT,$@)" ] || \
{ echo "TEXT_BASE = 0xFF000000" >board/icecube/config.tmp ; \
echo "... with LOWBOOT configuration" ; \
}
@[ -z "$(findstring LOWBOOT08,$@)" ] || \
{ echo "TEXT_BASE = 0xFF800000" >board/icecube/config.tmp ; \
echo "... with 8 MB flash only" ; \
}
@[ -z "$(findstring 5200,$@)" ] || \
{ echo "#define CONFIG_MPC5200" >>include/config.h ; \
echo "... with MPC5200 processor" ; \
}
@[ -z "$(findstring _5100,$@)" ] || \
@[ -z "$(findstring 5100,$@)" ] || \
{ echo "#define CONFIG_MGT5100" >>include/config.h ; \
echo "... with MGT5100 processor" ; \
}
@@ -229,6 +241,12 @@ ADS860_config: unconfig
AMX860_config : unconfig
@./mkconfig $(@:_config=) ppc mpc8xx amx860 westel
bms2003_config : unconfig
@echo "#define CONFIG_BMS2003" >include/config.h
@echo "#define CONFIG_LCD" >>include/config.h
@echo "#define CONFIG_NEC_NL6448BC33_54" >>include/config.h
@./mkconfig -a TQM823L ppc mpc8xx tqm8xx
c2mon_config: unconfig
@./mkconfig $(@:_config=) ppc mpc8xx c2mon
@@ -461,7 +479,7 @@ TQM862M_100MHz_config: unconfig
}
@[ -z "$(findstring _LCD,$@)" ] || \
{ echo "#define CONFIG_LCD" >>include/config.h ; \
echo "#define CONFIG_NEC_NL6648BC20" >>include/config.h ; \
echo "#define CONFIG_NEC_NL6448BC20" >>include/config.h ; \
echo "... with LCD display" ; \
}
@./mkconfig -a $(call xtract_8xx,$@) ppc mpc8xx tqm8xx
@@ -997,7 +1015,7 @@ clean:
rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend
rm -f tools/env/fw_printenv tools/env/fw_setenv
rm -f board/cray/L1/bootscript.c board/cray/L1/bootscript.image
rm -f board/trab/trab_fkt board/trab/config.tmp
rm -f board/trab/trab_fkt board/*/config.tmp
clobber: clean
find . -type f \

22
README
View File

@@ -487,6 +487,11 @@ The following options need to be configured:
default i/o. Serial console can be forced with
environment 'console=serial'.
When CONFIG_SILENT_CONSOLE is defined, all console
messages (by U-Boot and Linux!) can be silenced with
the "silent" environment variable. See
doc/README.silent for more information.
- Console Baudrate:
CONFIG_BAUDRATE - in bps
Select one of the baudrates listed in
@@ -845,13 +850,18 @@ The following options need to be configured:
display); also select one of the supported displays
by defining one of these:
CONFIG_NEC_NL6648AC33:
CONFIG_NEC_NL6448AC33:
NEC NL6648AC33-18. Active, color, single scan.
NEC NL6448AC33-18. Active, color, single scan.
CONFIG_NEC_NL6648BC20
CONFIG_NEC_NL6448BC20
NEC NL6648BC20-08. 6.5", 640x480.
NEC NL6448BC20-08. 6.5", 640x480.
Active, color, single scan.
CONFIG_NEC_NL6448BC33_54
NEC NL6448BC33-54. 10.4", 640x480.
Active, color, single scan.
CONFIG_SHARP_16x9
@@ -2325,8 +2335,8 @@ defines the following image properties:
LynxOS, pSOS, QNX, RTEMS, ARTOS;
Currently supported: Linux, NetBSD, VxWorks, QNX, RTEMS, ARTOS, LynxOS).
* Target CPU Architecture (Provisions for Alpha, ARM, Intel x86,
IA64, MIPS, MIPS, PowerPC, IBM S390, SuperH, Sparc, Sparc 64 Bit;
Currently supported: PowerPC).
IA64, MIPS, NIOS, PowerPC, IBM S390, SuperH, Sparc, Sparc 64 Bit;
Currently supported: ARM, Intel x86, MIPS, NIOS, PowerPC).
* Compression Type (uncompressed, gzip, bzip2)
* Load Address
* Entry Point

View File

@@ -63,7 +63,7 @@ $(TARGETDEBUGLIB): $(DEBUGOBJS)
$(AR) rv $(TARGETDEBUGLIB) $(DEBUGOBJS)
INCS = -I. -Ix86emu -I../../include
CFLAGS = -D__DRIVER__ -DFORCE_POST -D_CEXPORT= -DNO_LONG_LONG -Dprintk=printf -fsigned-char -fomit-frame-pointer -mrelocatable -ffixed-r14 -meabi -mrelocatable -ffixed-r14 -meabi
CFLAGS = -D__DRIVER__ -DFORCE_POST -D_CEXPORT= -DNO_LONG_LONG -Dprintk=printf -fsigned-char -fomit-frame-pointer -fPIC -ffixed-r14 -meabi
CDEBUGFLAGS = -DDEBUG
.c.o:

View File

@@ -61,7 +61,7 @@ $(TARGETDEBUGLIB): $(DEBUGOBJS)
$(AR) rv $(TARGETDEBUGLIB) $(DEBUGOBJS)
INCS = -I. -Ix86emu -I../../include
CFLAGS = -D__DRIVER__ -DFORCE_POST -D_CEXPORT= -DNO_LONG_LONG -Dprintk=printf -fsigned-char -fomit-frame-pointer -mrelocatable -ffixed-r14 -meabi -mrelocatable -ffixed-r14 -meabi
CFLAGS = -D__DRIVER__ -DFORCE_POST -D_CEXPORT= -DNO_LONG_LONG -Dprintk=printf -fsigned-char -fomit-frame-pointer -fPIC -ffixed-r14 -meabi
CDEBUGFLAGS = -DDEBUG
.c.o:

View File

@@ -230,8 +230,8 @@ static long int dram_size (long int mamr_value, long int *base,
volatile immap_t *immap = (immap_t *) CFG_IMMR;
volatile memctl8xx_t *memctl = &immap->im_memctl;
volatile long int *addr;
ulong cnt, val;
ulong save[32]; /* to make test non-destructive */
ulong cnt, val, size;
ulong save[32]; /* to make test non-destructive */
unsigned char i = 0;
memctl->memc_mamr = mamr_value;
@@ -250,7 +250,13 @@ static long int dram_size (long int mamr_value, long int *base,
/* check at base address */
if ((val = *addr) != 0) {
/* Restore the original data before leaving the function.
*/
*addr = save[i];
for (cnt = 1; cnt <= maxsize / sizeof(long); cnt <<= 1) {
addr = (volatile ulong *) base + cnt;
*addr = save[--i];
}
return (0);
}
@@ -261,7 +267,14 @@ static long int dram_size (long int mamr_value, long int *base,
*addr = save[--i];
if (val != (~cnt)) {
return (cnt * sizeof (long));
size = cnt * sizeof (long);
/* Restore the original data before returning
*/
for (cnt <<= 1; cnt <= maxsize / sizeof (long); cnt <<= 1) {
addr = (volatile ulong *) base + cnt;
*addr = save[--i];
}
return (size);
}
}
return (maxsize);

View File

@@ -92,20 +92,20 @@ const iop_conf_t iop_conf_tab[4][32] = {
/* PB20 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII RxD[1] */
/* PB19 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII RxD[2] */
/* PB18 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII RxD[3] */
/* PB17 */ { 0, 0, 0, 0, 0, 0 }, /* PB17 */
/* PB16 */ { 0, 0, 0, 0, 0, 0 }, /* PB16 */
/* PB15 */ { 0, 0, 0, 0, 0, 0 }, /* PB15 */
/* PB14 */ { 0, 0, 0, 0, 0, 0 }, /* PB14 */
/* PB13 */ { 0, 0, 0, 0, 0, 0 }, /* PB13 */
/* PB12 */ { 0, 0, 0, 0, 0, 0 }, /* PB12 */
/* PB11 */ { 0, 0, 0, 0, 0, 0 }, /* PB11 */
/* PB10 */ { 0, 0, 0, 0, 0, 0 }, /* PB10 */
/* PB9 */ { 0, 0, 0, 0, 0, 0 }, /* PB9 */
/* PB8 */ { 0, 0, 0, 0, 0, 0 }, /* PB8 */
/* PB7 */ { 0, 0, 0, 0, 0, 0 }, /* PB7 */
/* PB6 */ { 0, 0, 0, 0, 0, 0 }, /* PB6 */
/* PB5 */ { 0, 0, 0, 0, 0, 0 }, /* PB5 */
/* PB4 */ { 0, 0, 0, 0, 0, 0 }, /* PB4 */
/* PB17 */ { 1, 1, 0, 0, 0, 0 }, /* FCC3 MII RX_DV */
/* PB16 */ { 1, 1, 0, 0, 0, 0 }, /* FCC3 MII RX_ER */
/* PB15 */ { 1, 1, 0, 1, 0, 0 }, /* FCC3 MII TX_ER */
/* PB14 */ { 1, 1, 0, 1, 0, 0 }, /* FCC3 MII TX_EN */
/* PB13 */ { 1, 1, 0, 0, 0, 0 }, /* FCC3 MII COL */
/* PB12 */ { 1, 1, 0, 0, 0, 0 }, /* FCC3 MII CRS */
/* PB11 */ { 1, 1, 0, 0, 0, 0 }, /* FCC3 MII RxD */
/* PB10 */ { 1, 1, 0, 0, 0, 0 }, /* FCC3 MII RxD */
/* PB9 */ { 1, 1, 0, 0, 0, 0 }, /* FCC3 MII RxD */
/* PB8 */ { 1, 1, 0, 0, 0, 0 }, /* FCC3 MII RxD */
/* PB7 */ { 1, 1, 0, 1, 0, 0 }, /* FCC3 MII TxD */
/* PB6 */ { 1, 1, 0, 1, 0, 0 }, /* FCC3 MII TxD */
/* PB5 */ { 1, 1, 0, 1, 0, 0 }, /* FCC3 MII TxD */
/* PB4 */ { 1, 1, 0, 1, 0, 0 }, /* FCC3 MII TxD */
/* PB3 */ { 0, 0, 0, 0, 0, 0 }, /* PB3 */
/* PB2 */ { 0, 0, 0, 0, 0, 0 }, /* PB2 */
/* PB1 */ { 0, 0, 0, 0, 0, 0 }, /* PB1 */
@@ -128,8 +128,8 @@ const iop_conf_t iop_conf_tab[4][32] = {
/* PC20 */ { 1, 1, 0, 0, 0, 0 }, /* FCC1 MII TX_CLK */
/* PC19 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII RX_CLK */
/* PC18 */ { 1, 1, 0, 0, 0, 0 }, /* FCC2 MII TX_CLK */
/* PC17 */ { 0, 0, 0, 0, 0, 0 }, /* PC17 */
/* PC16 */ { 0, 0, 0, 0, 0, 0 }, /* PC16 */
/* PC17 */ { 1, 1, 0, 0, 0, 0 }, /* FCC3 MII RX_CLK */
/* PC16 */ { 1, 1, 0, 0, 0, 0 }, /* FCC3 MII TX_CLK */
#if 0
/* PC15 */ { 0, 0, 0, 0, 0, 0 }, /* PC15 */
#else
@@ -269,7 +269,7 @@ static long int try_init (volatile memctl8260_t * memctl, ulong sdmr,
ulong orx, volatile uchar * base)
{
volatile uchar c = 0xff;
ulong cnt, val;
ulong cnt, val, size;
volatile ulong *addr;
volatile uint *sdmr_ptr;
volatile uint *orx_ptr;
@@ -344,7 +344,13 @@ static long int try_init (volatile memctl8260_t * memctl, ulong sdmr,
*addr = 0;
if ((val = *addr) != 0) {
/* Restore the original data before leaving the function.
*/
*addr = save[i];
for (cnt = 1; cnt <= maxsize / sizeof(long); cnt <<= 1) {
addr = (volatile ulong *) base + cnt;
*addr = save[--i];
}
return (0);
}
@@ -353,10 +359,17 @@ static long int try_init (volatile memctl8260_t * memctl, ulong sdmr,
val = *addr;
*addr = save[--i];
if (val != ~cnt) {
size = cnt * sizeof (long);
/* Restore the original data before returning
*/
for (cnt <<= 1; cnt <= maxsize / sizeof (long); cnt <<= 1) {
addr = (volatile ulong *) base + cnt;
*addr = save[--i];
}
/* Write the actual size to ORx
*/
*orx_ptr = orx | ~(cnt * sizeof (long) - 1);
return (cnt * sizeof (long));
*orx_ptr = orx | ~(size - 1);
return (size);
}
}
return (maxsize);

View File

@@ -228,8 +228,8 @@ static long int dram_size (long int mamr_value, long int *base,
volatile immap_t *immap = (immap_t *) CFG_IMMR;
volatile memctl8xx_t *memctl = &immap->im_memctl;
volatile long int *addr;
ulong cnt, val;
ulong save[32]; /* to make test non-destructive */
ulong cnt, val, size;
ulong save[32]; /* to make test non-destructive */
unsigned char i = 0;
memctl->memc_mamr = mamr_value;
@@ -248,7 +248,13 @@ static long int dram_size (long int mamr_value, long int *base,
/* check at base address */
if ((val = *addr) != 0) {
/* Restore the original data before leaving the function.
*/
*addr = save[i];
for (cnt = 1; cnt <= maxsize / sizeof(long); cnt <<= 1) {
addr = (volatile ulong *) base + cnt;
*addr = save[--i];
}
return (0);
}
@@ -259,7 +265,14 @@ static long int dram_size (long int mamr_value, long int *base,
*addr = save[--i];
if (val != (~cnt)) {
return (cnt * sizeof (long));
size = cnt * sizeof (long);
/* Restore the original data before returning
*/
for (cnt <<= 1; cnt <= maxsize / sizeof (long); cnt <<= 1) {
addr = (volatile ulong *) base + cnt;
*addr = save[--i];
}
return (size);
}
}
return (maxsize);

View File

@@ -68,7 +68,7 @@ int board_pre_init (void)
mtdcr(uicsr, 0xFFFFFFFF); /* clear all ints */
mtdcr(uicer, 0x00000000); /* disable all ints */
mtdcr(uiccr, 0x00000000); /* set all to be non-critical*/
mtdcr(uicpr, 0xFFFFFF81); /* set int polarities */
mtdcr(uicpr, 0xFFFFFF80); /* set int polarities */
mtdcr(uictr, 0x10000000); /* set int trigger levels */
mtdcr(uicvcr, 0x00000001); /* set vect base=0,INT0 highest priority*/
mtdcr(uicsr, 0xFFFFFFFF); /* clear all ints */

View File

@@ -321,8 +321,8 @@ static long int dram_size (long int mamr_value, long int *base,
volatile immap_t *immap = (immap_t *) CFG_IMMR;
volatile memctl8xx_t *memctl = &immap->im_memctl;
volatile long int *addr;
ulong cnt, val;
ulong save[32]; /* to make test non-destructive */
ulong cnt, val, size;
ulong save[32]; /* to make test non-destructive */
unsigned char i = 0;
memctl->memc_mamr = mamr_value;
@@ -341,7 +341,13 @@ static long int dram_size (long int mamr_value, long int *base,
/* check at base address */
if ((val = *addr) != 0) {
/* Restore the original data before leaving the function.
*/
*addr = save[i];
for (cnt = 1; cnt <= maxsize / sizeof(long); cnt <<= 1) {
addr = (volatile ulong *) base + cnt;
*addr = save[--i];
}
return (0);
}
@@ -352,7 +358,14 @@ static long int dram_size (long int mamr_value, long int *base,
*addr = save[--i];
if (val != (~cnt)) {
return (cnt * sizeof (long));
size = cnt * sizeof (long);
/* Restore the original data before returning
*/
for (cnt <<= 1; cnt <= maxsize / sizeof (long); cnt <<= 1) {
addr = (volatile ulong *) base + cnt;
*addr = save[--i];
}
return (size);
}
}
return (maxsize);

View File

@@ -97,7 +97,7 @@ flash_init (void)
#ifndef CONFIG_P3G4
printf("[");
print_size (size, "");
printf("@%08lX] ", size>>20, base);
printf("@%08lX] ", base);
#endif
if (flash_info[i].flash_id == FLASH_UNKNOWN) {

View File

@@ -22,10 +22,23 @@
#
#
# IceCube board
# IceCube board:
#
# Valid values for TEXT_BASE are:
#
# 0xFFF00000 boot high (standard configuration)
# 0xFF000000 boot low for 16 MiB boards
# 0xFF800000 boot low for 8 MiB boards
# 0x00100000 boot from RAM (for testing only)
#
TEXT_BASE = 0xfff00000
sinclude $(TOPDIR)/board/$(BOARDDIR)/config.tmp
ifndef TEXT_BASE
## Standard: boot high
TEXT_BASE = 0xFFF00000
## For testing: boot from RAM
# TEXT_BASE = 0x00100000
endif
PLATFORM_CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) -I$(TOPDIR)/board

View File

@@ -134,7 +134,7 @@ long int initdram (int board_type)
*(vu_long *)MPC5XXX_SDRAM_STOP = ((dramsize - 1) >> 15);
#endif
#else
#else /* CFG_RAMBOOT */
#ifdef CONFIG_MGT5100
*(vu_long *)MPC5XXX_ADDECR |= (1 << 22); /* Enable SDRAM */
dramsize = ((*(vu_long *)MPC5XXX_SDRAM_STOP + 1) << 15);

View File

@@ -44,6 +44,10 @@ SECTIONS
. = ALIGN(4);
.got : { *(.got) }
__u_boot_cmd_start = .;
.u_boot_cmd : { *(.u_boot_cmd) }
__u_boot_cmd_end = .;
armboot_end_data = .;
. = ALIGN(4);

View File

@@ -94,39 +94,41 @@ int checkboard (void)
long int initdram (int board_type)
{
volatile immap_t *immap = (immap_t *)CFG_IMMR;
volatile memctl8xx_t *memctl = &immap->im_memctl;
long int size9 ;
volatile immap_t *immap = (immap_t *) CFG_IMMR;
volatile memctl8xx_t *memctl = &immap->im_memctl;
long int size9;
upmconfig(UPMA, (uint *)sdram_table, sizeof(sdram_table)/sizeof(uint));
upmconfig (UPMA, (uint *) sdram_table,
sizeof (sdram_table) / sizeof (uint));
/* Refresh clock prescalar */
memctl->memc_mptpr = CFG_MPTPR ;
memctl->memc_mptpr = CFG_MPTPR;
memctl->memc_mar = 0x00000088;
memctl->memc_mar = 0x00000088;
/* Map controller banks 1 to the SDRAM bank */
memctl->memc_or1 = CFG_OR1_PRELIM;
memctl->memc_br1 = CFG_BR1_PRELIM;
memctl->memc_or1 = CFG_OR1_PRELIM;
memctl->memc_br1 = CFG_BR1_PRELIM;
memctl->memc_mamr = CFG_MAMR_9COL & (~(MAMR_PTAE)); /* no refresh yet */
memctl->memc_mamr = CFG_MAMR_9COL & (~(MAMR_PTAE)); /* no refresh yet */
udelay(200);
udelay (200);
/* perform SDRAM initializsation sequence */
/* perform SDRAM initializsation sequence */
memctl->memc_mcr = 0x80002136 ; /* SDRAM bank 0 */
udelay(1);
memctl->memc_mcr = 0x80002136; /* SDRAM bank 0 */
udelay (1);
memctl->memc_mamr |= MAMR_PTAE; /* enable refresh */
memctl->memc_mamr |= MAMR_PTAE; /* enable refresh */
udelay (1000);
udelay (1000);
/* Check Bank 0 Memory Size,
* 9 column mode
*/
size9 = dram_size (CFG_MAMR_9COL, (ulong *)SDRAM_BASE_PRELIM, SDRAM_MAX_SIZE) ;
size9 = dram_size (CFG_MAMR_9COL, (ulong *) SDRAM_BASE_PRELIM,
SDRAM_MAX_SIZE);
/*
* Final mapping:
@@ -135,7 +137,7 @@ long int initdram (int board_type)
memctl->memc_or1 = ((-size9) & 0xFFFF0000) | CFG_OR_TIMING_SDRAM;
udelay (1000);
return (size9);
return (size9);
}
/* ------------------------------------------------------------------------- */
@@ -148,44 +150,58 @@ long int initdram (int board_type)
* - short between data lines
*/
static long int dram_size (long int mamr_value, long int *base, long int maxsize)
static long int dram_size (long int mamr_value, long int *base,
long int maxsize)
{
volatile immap_t *immap = (immap_t *)CFG_IMMR;
volatile memctl8xx_t *memctl = &immap->im_memctl;
volatile long int *addr;
ulong cnt, val;
ulong save[32]; /* to make test non-destructive */
unsigned char i = 0;
volatile immap_t *immap = (immap_t *) CFG_IMMR;
volatile memctl8xx_t *memctl = &immap->im_memctl;
volatile long int *addr;
ulong cnt, val, size;
ulong save[32]; /* to make test non-destructive */
unsigned char i = 0;
memctl->memc_mamr = mamr_value;
memctl->memc_mamr = mamr_value;
for (cnt = maxsize/sizeof(long); cnt > 0; cnt >>= 1) {
addr = base + cnt; /* pointer arith! */
for (cnt = maxsize / sizeof (long); cnt > 0; cnt >>= 1) {
addr = base + cnt; /* pointer arith! */
save[i++] = *addr;
*addr = ~cnt;
}
/* write 0 to base address */
addr = base;
save[i] = *addr;
*addr = 0;
/* check at base address */
if ((val = *addr) != 0) {
*addr = save[i];
return (0);
}
for (cnt = 1; cnt <= maxsize/sizeof(long); cnt <<= 1) {
addr = base + cnt; /* pointer arith! */
val = *addr;
*addr = save[--i];
if (val != (~cnt)) {
return (cnt * sizeof(long));
save[i++] = *addr;
*addr = ~cnt;
}
}
return (maxsize);
/* write 0 to base address */
addr = base;
save[i] = *addr;
*addr = 0;
/* check at base address */
if ((val = *addr) != 0) {
/* Restore the original data before leaving the function.
*/
*addr = save[i];
for (cnt = 1; cnt <= maxsize / sizeof(long); cnt <<= 1) {
addr = (volatile ulong *) base + cnt;
*addr = save[--i];
}
return (0);
}
for (cnt = 1; cnt <= maxsize / sizeof (long); cnt <<= 1) {
addr = base + cnt; /* pointer arith! */
val = *addr;
*addr = save[--i];
if (val != (~cnt)) {
size = cnt * sizeof (long);
/* Restore the original data before returning
*/
for (cnt <<= 1; cnt <= maxsize / sizeof (long); cnt <<= 1) {
addr = (volatile ulong *) base + cnt;
*addr = save[--i];
}
return (size);
}
}
return (maxsize);
}

View File

@@ -230,7 +230,7 @@ static long int try_init (volatile memctl8260_t * memctl, ulong sdmr,
volatile uint *orx_ptr;
int i;
ulong save[32]; /* to make test non-destructive */
ulong maxsize;
ulong maxsize, size;
/* We must be able to test a location outsize the maximum legal size
* to find out THAT we are outside; but this address still has to be
@@ -299,7 +299,13 @@ static long int try_init (volatile memctl8260_t * memctl, ulong sdmr,
*addr = 0;
if ((val = *addr) != 0) {
/* Restore the original data before leaving the function.
*/
*addr = save[i];
for (cnt = 1; cnt <= maxsize / sizeof(long); cnt <<= 1) {
addr = (volatile ulong *) base + cnt;
*addr = save[--i];
}
return (0);
}
@@ -308,10 +314,17 @@ static long int try_init (volatile memctl8260_t * memctl, ulong sdmr,
val = *addr;
*addr = save[--i];
if (val != ~cnt) {
size = cnt * sizeof (long);
/* Restore the original data before leaving the function.
*/
for (cnt <<= 1; cnt <= maxsize / sizeof (long); cnt <<= 1) {
addr = (volatile ulong *) base + cnt;
*addr = save[--i];
}
/* Write the actual size to ORx
*/
*orx_ptr = orx | ~(cnt * sizeof (long) - 1);
return (cnt * sizeof (long));
*orx_ptr = orx | ~(size - 1);
return (size);
}
}
return (maxsize);

View File

@@ -328,7 +328,7 @@ long int initdram (int board_type)
memctl->memc_br3 = CFG_BR3_CAN;
/* Initialize MBMR */
memctl->memc_mbmr = MAMR_GPL_B4DIS; /* GPL_B4 ouput line Disable */
memctl->memc_mbmr = MBMR_GPL_B4DIS; /* GPL_B4 ouput line Disable */
/* Initialize UPMB for CAN: single read */
memctl->memc_mdr = 0xFFFFC004;
@@ -389,8 +389,8 @@ static long int dram_size (long int mamr_value, long int *base,
volatile immap_t *immap = (immap_t *) CFG_IMMR;
volatile memctl8xx_t *memctl = &immap->im_memctl;
volatile long int *addr;
ulong cnt, val;
ulong save[32]; /* to make test non-destructive */
ulong cnt, val, size;
ulong save[32]; /* to make test non-destructive */
unsigned char i = 0;
memctl->memc_mamr = mamr_value;
@@ -409,7 +409,13 @@ static long int dram_size (long int mamr_value, long int *base,
/* check at base address */
if ((val = *addr) != 0) {
/* Restore the original data before leaving the function.
*/
*addr = save[i];
for (cnt = 1; cnt <= maxsize / sizeof(long); cnt <<= 1) {
addr = (volatile ulong *) base + cnt;
*addr = save[--i];
}
return (0);
}
@@ -420,7 +426,14 @@ static long int dram_size (long int mamr_value, long int *base,
*addr = save[--i];
if (val != (~cnt)) {
return (cnt * sizeof (long));
size = cnt * sizeof (long);
/* Restore the original data before returning
*/
for (cnt <<= 1; cnt <= maxsize / sizeof (long); cnt <<= 1) {
addr = (volatile ulong *) base + cnt;
*addr = save[--i];
}
return (size);
}
}
return (maxsize);

View File

@@ -207,7 +207,32 @@ extern block_dev_desc_t *get_dev (char*, int);
extern int u_boot_hush_start(void);
int
au_check_valid(int idx, long nbytes)
au_check_cksum_valid(int idx, long nbytes)
{
image_header_t *hdr;
unsigned long checksum;
hdr = (image_header_t *)LOAD_ADDR;
if (nbytes != (sizeof(*hdr) + ntohl(hdr->ih_size)))
{
printf ("Image %s bad total SIZE\n", aufile[idx]);
return -1;
}
/* check the data CRC */
checksum = ntohl(hdr->ih_dcrc);
if (crc32 (0, (char *)(LOAD_ADDR + sizeof(*hdr)), ntohl(hdr->ih_size))
!= checksum)
{
printf ("Image %s bad data checksum\n", aufile[idx]);
return -1;
}
return 0;
}
int
au_check_header_valid(int idx, long nbytes)
{
image_header_t *hdr;
unsigned long checksum;
@@ -222,11 +247,14 @@ au_check_valid(int idx, long nbytes)
printf("size %#x %#lx ", ntohl(hdr->ih_size), nbytes);
printf("type %#x %#x ", hdr->ih_type, IH_TYPE_KERNEL);
#endif
if (ntohl(hdr->ih_magic) != IH_MAGIC ||
hdr->ih_arch != IH_CPU_ARM ||
nbytes != (sizeof(*hdr) + ntohl(hdr->ih_size)))
if (nbytes < sizeof(*hdr))
{
printf ("Image %s bad MAGIC or ARCH or SIZE\n", aufile[idx]);
printf ("Image %s bad header SIZE\n", aufile[idx]);
return -1;
}
if (ntohl(hdr->ih_magic) != IH_MAGIC || hdr->ih_arch != IH_CPU_ARM)
{
printf ("Image %s bad MAGIC or ARCH\n", aufile[idx]);
return -1;
}
/* check the hdr CRC */
@@ -238,15 +266,6 @@ au_check_valid(int idx, long nbytes)
return -1;
}
hdr->ih_hcrc = htonl(checksum);
/* check the data CRC */
checksum = ntohl(hdr->ih_dcrc);
if (crc32 (0, (char *)(LOAD_ADDR + sizeof(*hdr)), ntohl(hdr->ih_size))
!= checksum)
{
printf ("Image %s bad data checksum\n", aufile[idx]);
return -1;
}
/* check the type - could do this all in one gigantic if() */
if ((idx == IDX_FIRMWARE) && (hdr->ih_type != IH_TYPE_FIRMWARE)) {
printf ("Image %s wrong type\n", aufile[idx]);
@@ -260,7 +279,8 @@ au_check_valid(int idx, long nbytes)
printf ("Image %s wrong type\n", aufile[idx]);
return -1;
}
if ((idx == IDX_APP) && (hdr->ih_type != IH_TYPE_RAMDISK)) {
if ((idx == IDX_APP) && (hdr->ih_type != IH_TYPE_RAMDISK)
&& (hdr->ih_type != IH_TYPE_FILESYSTEM)) {
printf ("Image %s wrong type\n", aufile[idx]);
return -1;
}
@@ -352,8 +372,12 @@ au_do_update(int idx, long sz)
debug ("flash_sect_erase(%lx, %lx);\n", start, end);
flash_sect_erase(start, end);
wait_ms(100);
/* strip the header - except for the kernel and app */
if (idx == IDX_FIRMWARE || idx == IDX_DISK) {
/* strip the header - except for the kernel and ramdisk */
if (hdr->ih_type == IH_TYPE_KERNEL || hdr->ih_type == IH_TYPE_RAMDISK) {
addr = (char *)hdr;
off = sizeof(*hdr);
nbytes = sizeof(*hdr) + ntohl(hdr->ih_size);
} else {
addr = (char *)((char *)hdr + sizeof(*hdr));
#ifdef AU_UPDATE_TEST
/* copy it to where Linux goes */
@@ -362,10 +386,6 @@ au_do_update(int idx, long sz)
#endif
off = 0;
nbytes = ntohl(hdr->ih_size);
} else {
addr = (char *)hdr;
off = sizeof(*hdr);
nbytes = sizeof(*hdr) + ntohl(hdr->ih_size);
}
/* copy the data from RAM to FLASH */
@@ -547,6 +567,18 @@ do_auto_update(void)
bitmap_first = 0;
/* just loop thru all the possible files */
for (i = 0; i < AU_MAXFILES; i++) {
/* just read the header */
sz = file_fat_read(aufile[i], LOAD_ADDR, sizeof(image_header_t));
debug ("read %s sz %ld hdr %d\n",
aufile[i], sz, sizeof(image_header_t));
if (sz <= 0 || sz < sizeof(image_header_t)) {
debug ("%s not found\n", aufile[i]);
continue;
}
if (au_check_header_valid(i, sz) < 0) {
debug ("%s header not valid\n", aufile[i]);
continue;
}
sz = file_fat_read(aufile[i], LOAD_ADDR, MAX_LOADSZ);
debug ("read %s sz %ld hdr %d\n",
aufile[i], sz, sizeof(image_header_t));
@@ -554,8 +586,8 @@ do_auto_update(void)
debug ("%s not found\n", aufile[i]);
continue;
}
if (au_check_valid(i, sz) < 0) {
debug ("%s not valid\n", aufile[i]);
if (au_check_cksum_valid(i, sz) < 0) {
debug ("%s checksum not valid\n", aufile[i]);
continue;
}
#ifdef CONFIG_VFD

View File

@@ -39,7 +39,10 @@ flash_info_t flash_info[CFG_MAX_FLASH_BANKS];
#define CMD_PROGRAM 0x00A000A0
#define CMD_UNLOCK_BYPASS 0x00200020
#define CMD_READ_MANF_ID 0x00900090
#define CMD_UNLOCK_BYPASS_RES1 0x00900090
#define CMD_UNLOCK_BYPASS_RES2 0x00000000
#define MEM_FLASH_ADDR (*(volatile u32 *)CFG_FLASH_BASE)
#define MEM_FLASH_ADDR1 (*(volatile u32 *)(CFG_FLASH_BASE + (0x00000555 << 2)))
#define MEM_FLASH_ADDR2 (*(volatile u32 *)(CFG_FLASH_BASE + (0x000002AA << 2)))
@@ -331,9 +334,6 @@ volatile static int write_word (flash_info_t * info, ulong dest,
#endif
iflag = disable_interrupts ();
MEM_FLASH_ADDR1 = CMD_UNLOCK1;
MEM_FLASH_ADDR2 = CMD_UNLOCK2;
MEM_FLASH_ADDR1 = CMD_UNLOCK_BYPASS;
*addr = CMD_PROGRAM;
*addr = data;
@@ -402,6 +402,10 @@ int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt)
int l;
int i, rc;
MEM_FLASH_ADDR1 = CMD_UNLOCK1;
MEM_FLASH_ADDR2 = CMD_UNLOCK2;
MEM_FLASH_ADDR1 = CMD_UNLOCK_BYPASS;
wp = (addr & ~3); /* get lower word aligned address */
/*
@@ -422,7 +426,7 @@ int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt)
}
if ((rc = write_word (info, wp, data)) != 0) {
return (rc);
goto Done;
}
wp += 4;
}
@@ -441,7 +445,7 @@ int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt)
}
if ((rc = write_word (info, wp, data)) != 0) {
return (rc);
goto Done;
}
src += 4;
wp += 4;
@@ -449,7 +453,8 @@ int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt)
}
if (cnt == 0) {
return ERR_OK;
rc = ERR_OK;
goto Done;
}
/*
@@ -464,7 +469,14 @@ int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt)
data = (data >> 8) | (*(uchar *) cp << 24);
}
return write_word (info, wp, data);
rc = write_word (info, wp, data);
Done:
MEM_FLASH_ADDR = CMD_UNLOCK_BYPASS_RES1;
MEM_FLASH_ADDR = CMD_UNLOCK_BYPASS_RES2;
return (rc);
}
/*-----------------------------------------------------------------------

View File

@@ -48,29 +48,29 @@
#define BWSCON 0x14000000
/* Bank0 */
#define B0_Tacs 0x3 /* 4 clk */
#define B0_Tcos 0x3 /* 4 clk */
#define B0_Tacc 0x7 /* 14 clk */
#define B0_Tcoh 0x0 /* 0 clk */
#define B0_Tah 0x0 /* 0 clk */
#define B0_Tacs 0x1 /* 1 clk */
#define B0_Tcos 0x1 /* 1 clk */
#define B0_Tacc 0x5 /* 8 clk */
#define B0_Tcoh 0x1 /* 1 clk */
#define B0_Tah 0x1 /* 1 clk */
#define B0_Tacp 0x0
#define B0_PMC 0x0 /* normal */
/* Bank1 - SRAM */
#define B1_Tacs 0x0 /* 0 clk */
#define B1_Tcos 0x0 /* 0 clk */
#define B1_Tacc 0x7 /* 14 clk */
#define B1_Tcoh 0x0 /* 0 clk */
#define B1_Tah 0x0 /* 0 clk */
#define B1_Tacs 0x1 /* 1 clk */
#define B1_Tcos 0x1 /* 1 clk */
#define B1_Tacc 0x5 /* 8 clk */
#define B1_Tcoh 0x1 /* 1 clk */
#define B1_Tah 0x1 /* 1 clk */
#define B1_Tacp 0x0
#define B1_PMC 0x0 /* normal */
/* Bank2 - CPLD */
#define B2_Tacs 0x0 /* 0 clk */
#define B2_Tcos 0x4 /* 4 clk */
#define B2_Tacc 0x7 /* 14 clk */
#define B2_Tcoh 0x4 /* 4 clk */
#define B2_Tah 0x0 /* 0 clk */
#define B2_Tacs 0x1 /* 1 clk */
#define B2_Tcos 0x1 /* 1 clk */
#define B2_Tacc 0x5 /* 8 clk */
#define B2_Tcoh 0x1 /* 1 clk */
#define B2_Tah 0x1 /* 1 clk */
#define B2_Tacp 0x0
#define B2_PMC 0x0 /* normal */

View File

@@ -149,7 +149,7 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
uint unc_len = 0x400000;
int i, verify;
char *name, *s;
int (*appl)(cmd_tbl_t *, int, int, char *[]);
int (*appl)(int, char *[]);
image_header_t *hdr = &header;
s = getenv ("verify");
@@ -205,7 +205,7 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
SHOW_BOOT_PROGRESS (3);
/* for multi-file images we need the data part, too */
print_image_hdr (hdr);
print_image_hdr ((image_header_t *)addr);
data = addr + sizeof(image_header_t);
len = ntohl(hdr->ih_size);
@@ -251,21 +251,24 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
SHOW_BOOT_PROGRESS (5);
switch (hdr->ih_type) {
case IH_TYPE_STANDALONE: name = "Standalone Application";
/* A second argument overwrites the load address */
if (argc > 2) {
hdr->ih_load = simple_strtoul(argv[2], NULL, 16);
}
break;
case IH_TYPE_KERNEL: name = "Kernel Image";
break;
case IH_TYPE_MULTI: name = "Multi-File Image";
len = ntohl(len_ptr[0]);
/* OS kernel is always the first image */
data += 8; /* kernel_len + terminator */
for (i=1; len_ptr[i]; ++i)
data += 4;
break;
case IH_TYPE_STANDALONE:
name = "Standalone Application";
/* A second argument overwrites the load address */
if (argc > 2) {
hdr->ih_load = simple_strtoul(argv[2], NULL, 16);
}
break;
case IH_TYPE_KERNEL:
name = "Kernel Image";
break;
case IH_TYPE_MULTI:
name = "Multi-File Image";
len = ntohl(len_ptr[0]);
/* OS kernel is always the first image */
data += 8; /* kernel_len + terminator */
for (i=1; len_ptr[i]; ++i)
data += 4;
break;
default: printf ("Wrong Image Type for %s command\n", cmdtp->name);
SHOW_BOOT_PROGRESS (-5);
return 1;
@@ -362,8 +365,8 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
setenv("filesize", buf);
return 0;
}
appl = (int (*)(cmd_tbl_t *, int, int, char *[]))ntohl(hdr->ih_ep);
(*appl)(cmdtp, flag, argc-1, &argv[1]);
appl = (int (*)(int, char *[]))ntohl(hdr->ih_ep);
(*appl)(argc-1, &argv[1]);
return 0;
case IH_TYPE_KERNEL:
case IH_TYPE_MULTI:
@@ -564,10 +567,10 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
kbd->bi_sccfreq /= 1000000L;
kbd->bi_vco /= 1000000L;
#endif /* CONFIG_8260 */
#if defined(CONFIG_MPC5XXXX)
#if defined(CONFIG_MPC5XXX)
kbd->bi_ipbfreq /= 1000000L;
kbd->bi_pcifreq /= 1000000L;
#endif /* CONFIG_MPC5XXXX */
#endif /* CONFIG_MPC5XXX */
}
kernel = (void (*)(bd_t *, ulong, ulong, ulong, ulong))hdr->ih_ep;
@@ -1053,7 +1056,7 @@ int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
flash_info_t *info;
int i, j;
image_header_t *hdr;
ulong checksum;
ulong data, len, checksum;
for (i=0, info=&flash_info[0]; i<CFG_MAX_FLASH_BANKS; ++i, ++info) {
if (info->flash_id == FLASH_UNKNOWN)
@@ -1076,7 +1079,15 @@ int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
printf ("Image at %08lX:\n", (ulong)hdr);
print_image_hdr( hdr );
putc ('\n');
data = (ulong)hdr + sizeof(image_header_t);
len = ntohl(hdr->ih_size);
printf (" Verifying Checksum ... ");
if (crc32 (0, (char *)data, len) != ntohl(hdr->ih_dcrc)) {
printf (" Bad Data CRC\n");
}
printf ("OK\n");
next_sector: ;
}
next_bank: ;

View File

@@ -631,6 +631,7 @@ void ide_init (void)
#ifdef CONFIG_IDE_LED
int led = (IDE_BUS(i) == 0) ? LED_IDE1 : LED_IDE2;
#endif
ide_dev_desc[i].type=DEV_TYPE_UNKNOWN;
ide_dev_desc[i].if_type=IF_TYPE_IDE;
ide_dev_desc[i].dev=i;
ide_dev_desc[i].part_type=PART_TYPE_UNKNOWN;
@@ -991,11 +992,9 @@ static void ide_ident (block_dev_desc_t *dev_desc)
if (retries == 0) {
do_retry = 1;
} else {
dev_desc->type=DEV_TYPE_UNKNOWN;
return;
}
#else
dev_desc->type=DEV_TYPE_UNKNOWN;
return;
#endif /* CONFIG_AMIGAONEG3SE */
}

View File

@@ -160,7 +160,7 @@ int pcmcia_on (void)
}
#else
#if defined(CONFIG_LWMON)
#if defined(CONFIG_LWMON) || defined(CONFIG_NSCU)
# define CFG_PCMCIA_TIMING (PCMCIA_SHT(9) | PCMCIA_SST(3) | PCMCIA_SL(12))
#else
# define CFG_PCMCIA_TIMING (PCMCIA_SHT(2) | PCMCIA_SST(4) | PCMCIA_SL(9))
@@ -594,8 +594,8 @@ static int hardware_enable(int slot)
sysp->sc_siumcr &= ~SIUMCR_DBGC11; /* set DBGC to 00 */
/* clear interrupt state, and disable interrupts */
pcmp->pcmc_pscr = PCMCIA_MASK(_slot_);
pcmp->pcmc_per &= ~PCMCIA_MASK(_slot_);
pcmp->pcmc_pscr = PCMCIA_MASK(slot);
pcmp->pcmc_per &= ~PCMCIA_MASK(slot);
/*
* Disable interrupts, DMA, and PCMCIA buffers
@@ -604,10 +604,13 @@ static int hardware_enable(int slot)
debug ("Disable PCMCIA buffers and assert RESET\n");
reg = 0;
reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
#ifndef NSCU_OE_INV
reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
PCMCIA_PGCRX(_slot_) = reg;
#endif
PCMCIA_PGCRX(slot) = reg;
udelay(500);
#ifndef CONFIG_NSCU
/*
* Configure Port C pins for
* 5 Volts Enable and 3 Volts enable
@@ -617,6 +620,7 @@ static int hardware_enable(int slot)
/* remove all power */
immap->im_ioport.iop_pcdat &= ~(0x0002 | 0x0004);
#endif
/*
* Make sure there is a card in the slot, then configure the interface.
@@ -639,6 +643,7 @@ static int hardware_enable(int slot)
reg,
(reg&PCMCIA_VS1(slot))?"n":"ff",
(reg&PCMCIA_VS2(slot))?"n":"ff");
#ifndef CONFIG_NSCU
if ((reg & mask) == mask) {
immap->im_ioport.iop_pcdat |= 0x0004;
puts (" 5.0V card found: ");
@@ -647,6 +652,13 @@ static int hardware_enable(int slot)
puts (" 3.3V card found: ");
}
immap->im_ioport.iop_pcdir |= (0x0002 | 0x0004);
#else
if ((reg & mask) == mask) {
puts (" 5.0V card found: ");
} else {
puts (" 3.3V card found: ");
}
#endif
#if 0
/* VCC switch error flag, PCMCIA slot INPACK_ pin */
cp->cp_pbdir &= ~(0x0020 | 0x0010);
@@ -655,10 +667,14 @@ static int hardware_enable(int slot)
#endif
udelay(1000);
debug ("Enable PCMCIA buffers and stop RESET\n");
reg = PCMCIA_PGCRX(_slot_);
reg = PCMCIA_PGCRX(slot);
reg &= ~__MY_PCMCIA_GCRX_CXRESET; /* active high */
#ifndef NSCU_OE_INV
reg &= ~__MY_PCMCIA_GCRX_CXOE; /* active low */
PCMCIA_PGCRX(_slot_) = reg;
#else
reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
#endif
PCMCIA_PGCRX(slot) = reg;
udelay(250000); /* some cards need >150 ms to come up :-( */
@@ -680,14 +696,18 @@ static int hardware_disable(int slot)
immap = (immap_t *)CFG_IMMR;
pcmp = (pcmconf8xx_t *)(&(((immap_t *)CFG_IMMR)->im_pcmcia));
#ifndef CONFIG_NSCU
/* remove all power */
immap->im_ioport.iop_pcdat &= ~(0x0002 | 0x0004);
#endif
debug ("Disable PCMCIA buffers and assert RESET\n");
reg = 0;
reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
#ifndef NSCU_OE_INV
reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
PCMCIA_PGCRX(_slot_) = reg;
#endif
PCMCIA_PGCRX(slot) = reg;
udelay(10000);
@@ -695,7 +715,12 @@ static int hardware_disable(int slot)
}
#endif /* CFG_CMD_PCMCIA */
#ifdef CONFIG_NSCU
static int voltage_set(int slot, int vcc, int vpp)
{
return 0;
}
#else
static int voltage_set(int slot, int vcc, int vpp)
{
volatile immap_t *immap;
@@ -714,10 +739,14 @@ static int voltage_set(int slot, int vcc, int vpp)
* and assert RESET signal
*/
debug ("Disable PCMCIA buffers and assert RESET\n");
reg = PCMCIA_PGCRX(_slot_);
reg = PCMCIA_PGCRX(slot);
reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
#ifndef NSCU_OE_INV
reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
PCMCIA_PGCRX(_slot_) = reg;
#else
reg &= ~__MY_PCMCIA_GCRX_CXOE; /* active low */
#endif
PCMCIA_PGCRX(slot) = reg;
udelay(500);
/*
@@ -755,16 +784,21 @@ static int voltage_set(int slot, int vcc, int vpp)
done:
debug ("Enable PCMCIA buffers and stop RESET\n");
reg = PCMCIA_PGCRX(_slot_);
reg = PCMCIA_PGCRX(slot);
reg &= ~__MY_PCMCIA_GCRX_CXRESET; /* active high */
#ifndef NSCU_OE_INV
reg &= ~__MY_PCMCIA_GCRX_CXOE; /* active low */
PCMCIA_PGCRX(_slot_) = reg;
#else
reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
#endif
PCMCIA_PGCRX(slot) = reg;
udelay(500);
debug ("voltage_set: " PCMCIA_BOARD_MSG " Slot %c, DONE\n",
slot+'A');
return (0);
}
#endif
#endif /* TQM8xxL */

View File

@@ -90,8 +90,6 @@ int trab_vfd (ulong bitmap)
}
break;
case VFD_REMOTE_LOGO_BMPNR:
transfer_pic(3, &vfd_remote_logo_bitmap[0],
VFD_LOGO_HEIGHT, VFD_LOGO_WIDTH);
if ((s = getenv ("bitmap1")) != NULL) {
addr = (uchar *)simple_strtoul (s, NULL, 16);
} else {

View File

@@ -102,6 +102,18 @@ static __inline__ int abortboot(int bootdelay)
u_int presskey_max = 0;
u_int i;
#ifdef CONFIG_SILENT_CONSOLE
{
DECLARE_GLOBAL_DATA_PTR;
if (gd->flags & GD_FLG_SILENT) {
/* Restore serial console */
console_assign (stdout, "serial");
console_assign (stderr, "serial");
}
}
#endif
# ifdef CONFIG_AUTOBOOT_PROMPT
printf (CONFIG_AUTOBOOT_PROMPT, bootdelay);
# endif
@@ -180,6 +192,21 @@ static __inline__ int abortboot(int bootdelay)
printf("key timeout\n");
# endif
#ifdef CONFIG_SILENT_CONSOLE
{
DECLARE_GLOBAL_DATA_PTR;
if (abort) {
/* permanently enable normal console output */
gd->flags &= ~(GD_FLG_SILENT);
} else if (gd->flags & GD_FLG_SILENT) {
/* Restore silent console */
console_assign (stdout, "nulldev");
console_assign (stderr, "nulldev");
}
}
#endif
return abort;
}

View File

@@ -21,7 +21,6 @@
# MA 02111-1307 USA
#
PLATFORM_RELFLAGS += -mrelocatable -ffixed-r14 -meabi
PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi
PLATFORM_CPPFLAGS += -DCONFIG_74xx_7xx -ffixed-r2 -ffixed-r29 -mstring
##PLATFORM_CPPFLAGS += -DCONFIG_74xx_7xx -ffixed-r2 -mstring

View File

@@ -185,9 +185,14 @@ int interrupt_init (void)
{
int32_t val;
/* Start the decrementer ticking down from 0xffffffff */
*((int32_t *) (CFG_TIMERBASE + LOAD_TIM)) = TIMER_LOAD_VAL;
val = MPUTIM_ST | MPUTIM_AR | MPUTIM_CLOCK_ENABLE | (CFG_PVT << MPUTIM_PTV_BIT);
*((int32_t *) (CFG_TIMERBASE + CNTL_TIMER)) = val;
/* init the timestamp and lastdec value */
reset_timer_masked();
return (0);
}
@@ -210,7 +215,7 @@ void set_timer (ulong t)
timestamp = t;
}
/* very rough timer... */
/* delay x useconds AND perserve advance timstamp value */
void udelay (unsigned long usec)
{
#ifdef CONFIG_INNOVATOROMAP1510
@@ -220,16 +225,24 @@ void udelay (unsigned long usec)
for (i = time_remaining; i > 0; i--) {
}
#else
ulong tmo, tmp;
ulong tmo;
if(usec >= 1000){ /* if "big" number, spread normalization to seconds */
tmo = usec / 1000; /* start to normalize for usec to ticks per sec */
tmo *= CFG_HZ; /* find number of "ticks" to wait to achieve target */
tmo /= 1000; /* finish normalize. */
}else{ /* else small number, don't kill it prior to HZ multiply */
tmo = usec * CFG_HZ;
tmo /= (1000*1000);
}
tmo = usec / 1000;
tmo *= CFG_HZ;
tmo /= 1000;
tmp = get_timer (0); /* get current timestamp */
if( (tmo + tmp) < tmp ) /* if setting this fordward will roll time stamp */
reset_timer_masked (); /* reset "advancing" timestamp to 0, set lastdec value */
else
tmo += tmp; /* else, set advancing stamp wake up time */
tmo += get_timer (0);
while (get_timer_masked () < tmo)
while (get_timer_masked () < tmo)/* loop till event */
/*NOP*/;
#endif
}
@@ -237,19 +250,23 @@ void udelay (unsigned long usec)
void reset_timer_masked (void)
{
/* reset time */
lastdec = READ_TIMER;
timestamp = 0;
lastdec = READ_TIMER; /* capure current decrementer value time */
timestamp = 0; /* start "advancing" time stamp from 0 */
}
ulong get_timer_masked (void)
{
ulong now = READ_TIMER; /* current tick value */
ulong now = READ_TIMER; /* current tick value */
if (lastdec >= now) { /* did I roll (rem decrementer) */
if (lastdec >= now) { /* normal mode (non roll) */
/* normal mode */
timestamp += lastdec - now; /* record amount of time since last check */
} else {
/* we have an overflow ... */
timestamp += lastdec - now; /* move stamp fordward with absoulte diff ticks */
} else { /* we have overflow of the count down timer */
/* nts = ts + ld + (TLV - now)
* ts=old stamp, ld=time that passed before passing through -1
* (TLV-now) amount of time after passing though -1
* nts = new "advancing time stamp"...it could also roll and cause problems.
*/
timestamp += lastdec + TIMER_LOAD_VAL - now;
}
lastdec = now;
@@ -257,6 +274,7 @@ ulong get_timer_masked (void)
return timestamp;
}
/* waits specified delay value and resets timestamp */
void udelay_masked (unsigned long usec)
{
#ifdef CONFIG_INNOVATOROMAP1510
@@ -265,15 +283,20 @@ void udelay_masked (unsigned long usec)
for (i=time_remaining; i>0; i--) { }
#else
ulong tmo;
ulong tmo, tmp;
tmo = usec / 1000;
tmo *= CFG_HZ;
tmo /= 1000;
if(usec >= 1000){ /* if "big" number, spread normalization to seconds */
tmo = usec / 1000; /* start to normalize for usec to ticks per sec */
tmo *= CFG_HZ; /* find number of "ticks" to wait to achieve target */
tmo /= 1000; /* finish normalize. */
}else{ /* else small number, don't kill it prior to HZ multiply */
tmo = usec * CFG_HZ;
tmo /= (1000*1000);
}
reset_timer_masked ();
reset_timer_masked (); /* set "advancing" timestamp to 0, set lastdec vaule */
while (get_timer_masked () < tmo)
while (get_timer_masked () < tmo) /* wait for time stamp to overtake tick number.*/
/*NOP*/;
#endif
}
@@ -292,7 +315,7 @@ unsigned long long get_ticks(void)
* On ARM it returns the number of timer ticks per second.
*/
ulong get_tbclk (void)
{ /* poor timer, may need to improve especiall for bootp. */
{
ulong tbclk;
tbclk = CFG_HZ;

View File

@@ -334,12 +334,12 @@ static UCHAR at91rm9200_EmacReadPhy (AT91PS_EMAC p_mac,
* TRUE - if data read successfully
*/
static UCHAR at91rm9200_EmacWritePhy (AT91PS_EMAC p_mac,
unsigned char RegisterAddress,
unsigned short *pOutput)
unsigned char RegisterAddress,
unsigned short *pOutput)
{
p_mac->EMAC_MAN = (AT91C_EMAC_HIGH & ~AT91C_EMAC_LOW) |
AT91C_EMAC_CODE_802_3 | AT91C_EMAC_RW_W |
(RegisterAddress << 18);
(RegisterAddress << 18) | *pOutput;
udelay (10000);

View File

@@ -30,6 +30,11 @@
#include <common.h>
#include <asm/arch/ixp425.h>
ulong get_timer (ulong base)
{
return get_timer_masked () - base;
}
void ixp425_udelay(unsigned long usec)
{
/*

View File

@@ -28,6 +28,6 @@
#
PLATFORM_RELFLAGS += -mrelocatable -ffixed-r14 -meabi
PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi
PLATFORM_CPPFLAGS += -DCONFIG_5xx -ffixed-r2 -ffixed-r29 -mpowerpc -msoft-float
PLATFORM_CPPFLAGS += -DCONFIG_5xx -ffixed-r2 -ffixed-r29 -mpowerpc -msoft-float

View File

@@ -21,7 +21,7 @@
# MA 02111-1307 USA
#
PLATFORM_RELFLAGS += -mrelocatable -ffixed-r14 -meabi
PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi
PLATFORM_CPPFLAGS += -DCONFIG_MPC5XXX -ffixed-r2 -ffixed-r29 \
-mstring -mcpu=603e -mmultiple

View File

@@ -229,9 +229,10 @@ static int mpc_get_fdr(int speed)
{
DECLARE_GLOBAL_DATA_PTR;
static int fdr = -1;
static int best_speed = 0;
if (fdr == -1) {
ulong best_speed = 0;
ulong divider;
ulong ipb, scl;
ulong bestmatch = 0xffffffffUL;
int best_i = 0, best_j = 0, i, j;
@@ -262,8 +263,13 @@ static int mpc_get_fdr(int speed)
}
}
}
fdr = (best_i & 3) | ((best_i & 4) << 3) | (best_j << 2);
printf("%d kHz, ", best_speed / 1000);
divider = (best_i & 3) | ((best_i & 4) << 3) | (best_j << 2);
if (gd->flags & GD_FLG_RELOC) {
fdr = divider;
} else {
printf("%ld kHz, ", best_speed / 1000);
return divider;
}
}
return fdr;

View File

@@ -103,6 +103,47 @@ boot_cold:
boot_warm:
mfmsr r5 /* save msr contents */
#if defined(CFG_LOWBOOT)
lis r4, CFG_DEFAULT_MBAR@h
lis r3, 0x0000FF00@h
ori r3, r3, 0x0000FF00@l
stw r3, 0x4(r4)
lis r3, 0x0000FFFF@h
ori r3, r3, 0x0000FFFF@l
stw r3, 0x8(r4)
lis r3, 0x00047800@h
ori r3, r3, 0x00047800@l
stw r3, 0x300(r4)
lis r3, 0x02010000@h
ori r3, r3, 0x02010000@l
stw r3, 0x54(r4)
#if defined(CFG_LOWBOOT08)
lis r3, 0xff800160@h
ori r3, r3, 0xff800160@l
#endif
#if defined(CFG_LOWBOOT16)
lis r3, 0xff000160@h
ori r3, r3, 0xff000160@l
#endif
mtlr r3
blr
lowboot_reentry: /* FLASH_BASE + 0x160 */
lis r3, 0x0000FF00@h
ori r3, r3, 0x0000FF00@l
stw r3, 0x4c(r4)
lis r3, 0x0000FFFF@h
ori r3, r3, 0x0000FFFF@l
stw r3, 0x50(r4)
lis r3, 0x00047800@h
ori r3, r3, 0x00047800@l
stw r3, 0x300(r4)
lis r3, 0x02000001@h
ori r3, r3, 0x02000001@l
stw r3, 0x54(r4)
#endif /* CFG_LOWBOOT */
#if defined(CFG_DEFAULT_MBAR) && !defined(CFG_RAMBOOT)
lis r3, CFG_MBAR@h
ori r3, r3, CFG_MBAR@l

View File

@@ -21,7 +21,6 @@
# MA 02111-1307 USA
#
PLATFORM_RELFLAGS += -mrelocatable -ffixed-r14 -meabi
PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi
PLATFORM_CPPFLAGS += -DCONFIG_MPC824X -ffixed-r2 -ffixed-r29 -mstring -mcpu=603e -msoft-float
##PLATFORM_CPPFLAGS += -DCONFIG_MPC824X -ffixed-r2 -mstring -mcpu=603e -msoft-float

View File

@@ -21,7 +21,7 @@
# MA 02111-1307 USA
#
PLATFORM_RELFLAGS += -mrelocatable -ffixed-r14 -meabi
PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi
PLATFORM_CPPFLAGS += -DCONFIG_8260 -ffixed-r2 -ffixed-r29 \
-mstring -mcpu=603e -mmultiple

View File

@@ -21,6 +21,6 @@
# MA 02111-1307 USA
#
PLATFORM_RELFLAGS += -mrelocatable -ffixed-r14 -meabi
PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi
PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx -DCONFIG_E500 -ffixed-r2 -ffixed-r29 -Wa,-me500 -msoft-float

View File

@@ -362,10 +362,12 @@ _start:
isync
#if defined(CONFIG_ADDR_STREAMING)
li r0,0x2000
li r0,0x3000
#else
li r0,0x1000
#endif
mtspr HID1,r0
isync
#endif
/* Enable Branch Prediction */
#if defined(CONFIG_BTB)

View File

@@ -21,7 +21,6 @@
# MA 02111-1307 USA
#
PLATFORM_RELFLAGS += -mrelocatable -ffixed-r14 -meabi
PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi
PLATFORM_CPPFLAGS += -DCONFIG_8xx -ffixed-r2 -ffixed-r29 -mstring -mcpu=860 -msoft-float
##PLATFORM_CPPFLAGS += -DCONFIG_8xx -ffixed-r2 -mstring -mcpu=860 -msoft-float

View File

@@ -150,28 +150,40 @@ static vidinfo_t panel_info = {
/*----------------------------------------------------------------------*/
/*----------------------------------------------------------------------*/
#ifdef CONFIG_NEC_NL6648AC33
#ifdef CONFIG_NEC_NL6448AC33
/*
* NEC NL6648AC33-18. Active, color, single scan.
* NEC NL6448AC33-18. Active, color, single scan.
*/
static vidinfo_t panel_info = {
640, 480, 132, 99, CFG_HIGH, CFG_HIGH, CFG_LOW, CFG_LOW, CFG_HIGH,
3, 0, 0, 1, 1, 144, 2, 0, 33
/* wbl, vpw, lcdac, wbf */
};
#endif /* CONFIG_NEC_NL6648AC33 */
#endif /* CONFIG_NEC_NL6448AC33 */
/*----------------------------------------------------------------------*/
#ifdef CONFIG_NEC_NL6648BC20
#ifdef CONFIG_NEC_NL6448BC20
/*
* NEC NL6648BC20-08. 6.5", 640x480. Active, color, single scan.
* NEC NL6448BC20-08. 6.5", 640x480. Active, color, single scan.
*/
static vidinfo_t panel_info = {
640, 480, 132, 99, CFG_HIGH, CFG_HIGH, CFG_LOW, CFG_LOW, CFG_HIGH,
3, 0, 0, 1, 1, 144, 2, 0, 33
/* wbl, vpw, lcdac, wbf */
};
#endif /* CONFIG_NEC_NL6648BC20 */
#endif /* CONFIG_NEC_NL6448BC20 */
/*----------------------------------------------------------------------*/
#ifdef CONFIG_NEC_NL6448BC33_54
/*
* NEC NL6448BC33-54. 10.4", 640x480. Active, color, single scan.
*/
static vidinfo_t panel_info = {
640, 480, 212, 158, CFG_HIGH, CFG_HIGH, CFG_LOW, CFG_LOW, CFG_HIGH,
3, 0, 0, 1, 1, 144, 2, 0, 33
/* wbl, vpw, lcdac, wbf */
};
#endif /* CONFIG_NEC_NL6448BC33_54 */
/*----------------------------------------------------------------------*/
#ifdef CONFIG_SHARP_LQ104V7DS01

View File

@@ -206,11 +206,14 @@ void pci_405gp_init(struct pci_controller *hose)
*--------------------------------------------------------------------------*/
out32r(PTM1LA, ptmla[0]); /* insert address */
out32r(PTM1MS, ptmms[0]); /* insert size, enable bit is 1 */
pci_write_config_dword(PCIDEVID_405GP, PCI_BASE_ADDRESS_1, ptmpcila[0]);
/*--------------------------------------------------------------------------+
* 405GP PCI Target configuration. (PTM2)
*--------------------------------------------------------------------------*/
out32r(PTM2LA, ptmla[1]); /* insert address */
pci_write_config_dword(PCIDEVID_405GP, PCI_BASE_ADDRESS_2, ptmpcila[1]);
if (ptmms[1] == 0)
{
out32r(PTM2MS, 0x00000001); /* set enable bit */
@@ -251,7 +254,7 @@ void pci_405gp_init(struct pci_controller *hose)
}
#if (CONFIG_PCI_HOST != PCI_HOST_ADAPTER)
#if (CONFIG_PCI_HOSE == PCI_HOST_AUTO)
#if (CONFIG_PCI_HOST == PCI_HOST_AUTO)
if (mfdcr(strap) & PSR_PCI_ARBIT_EN)
#endif
{

View File

@@ -21,7 +21,6 @@
# MA 02111-1307 USA
#
PLATFORM_RELFLAGS += -mrelocatable -ffixed-r14 -meabi
PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi
PLATFORM_CPPFLAGS += -DCONFIG_4xx -ffixed-r2 -ffixed-r29 -mstring -Wa,-m405 -mcpu=405 -msoft-float
##PLATFORM_CPPFLAGS += -DCONFIG_4xx -ffixed-r2 -mstring -mcpu=403 -msoft-float

View File

@@ -2,7 +2,7 @@
Nios Development Kit
Cyclone Editions
Last Update: October 4, 2003
Last Update: October 15, 2003
====================================================================
This file contains information regarding U-Boot and the Altera
@@ -34,7 +34,10 @@ The hello_world example works fine.
Programming U-Boot into FLASH with GERMS
-----------------------------------------
The current version of the DK-1C20 port occupies less than
60 KByte. So everything will fit into a single Flash sector.
60 KByte with network support disabled. So everything will fit
into a single flash sector. With network support (e.g. bootp,
tftpboot, ping, etc) the flash footprint is about 77K.
To program U-Boot into the DK-1C20 flash using GERMS do the
following:

View File

@@ -4,6 +4,10 @@ Xianghua Xiao(X.Xiao@motorola.com)
Created 10/15/03
-----------------------------------------
0. Toolchain
The Binutils in current ELDK toolchain will not support MPC85xx chip. You need
use the newest binutils-2.14.tar.bz2 from http://ftp.gnu.org/gnu/binutils.
1. SWITCH SETTINGS & JUMPERS
1.1 First, make sure the board default setting is consistent with the document
shipped with your board. Then apply the following changes:

View File

@@ -1,7 +1,7 @@
U-Boot for Nios-32
Last Update: October 4, 2003
Last Update: October 15, 2003
====================================================================
This file contains information regarding U-Boot and the Altera
@@ -173,8 +173,6 @@ BTW, thats a 'zero' ... not the letter 'O'.
There are plenty of areas where help is needed. Here's are some ideas
for those interested in contributing:
-SMC 91C111 support. E.g. add in tftpboot, etc.
-CompactFlash. Port & test CF/FAT.
-ASMI support. Use ASMI for environment, etc.

View File

@@ -321,7 +321,7 @@ ns8382x_initialize(bd_t * bis)
if ((devno = pci_find_devices(supported, idx++)) < 0)
break;
pci_read_config_dword(devno, PCI_BASE_ADDRESS_0, &iobase);
pci_read_config_dword(devno, PCI_BASE_ADDRESS_1, &iobase);
iobase &= ~0x3; /* 1: unused and 0:I/O Space Indicator */
#ifdef NS8382X_DEBUG

View File

@@ -428,11 +428,9 @@ int pci_hose_scan_bus(struct pci_controller *hose, int bus)
dev < PCI_BDF(bus,PCI_MAX_PCI_DEVICES-1,PCI_MAX_PCI_FUNCTIONS-1);
dev += PCI_BDF(0,0,1))
{
#if ((!defined(CONFIG_405GP)) && (!defined(CONFIG_405EP))) /* don't skip host bridge on ppc405gp and 405ep */
/* Skip our host bridge */
if ( dev == PCI_BDF(hose->first_busno,0,0) )
continue;
#endif
if (PCI_FUNC(dev) && !found_multi)
continue;

View File

@@ -178,6 +178,31 @@ typedef unsigned long int dword;
})
#endif
#if defined(CONFIG_SMC_USE_32_BIT)
#define SMC_inl(r) (*((volatile dword *)(SMC_BASE_ADDRESS+(r))))
#define SMC_insl(r,b,l) ({ int __i ; \
dword *__b2; \
__b2 = (dword *) b; \
for (__i = 0; __i < l; __i++) { \
*(__b2 + __i) = SMC_inl(r); \
SMC_inl(0); \
}; \
})
#define SMC_outl(d,r) (*((volatile dword *)(SMC_BASE_ADDRESS+(r))) = d)
#define SMC_outsl(r,b,l) ({ int __i; \
dword *__b2; \
__b2 = (dword *) b; \
for (__i = 0; __i < l; __i++) { \
SMC_outl( *(__b2 + __i), r); \
} \
})
#endif /* CONFIG_SMC_USE_32_BIT */
#endif
/*---------------------------------------------------------------

View File

@@ -33,11 +33,6 @@
#if (CONFIG_COMMANDS & CFG_CMD_FAT)
#ifdef CONFIG_AUTO_UPDATE
/* the VFAT code has a bug which breaks auto update */
#undef CONFIG_SUPPORT_VFAT
#endif
/*
* Convert a string to lowercase.
*/
@@ -429,6 +424,7 @@ slot2str(dir_slot *slotptr, char *l_name, int *idx)
* into 'retdent'
* Return 0 on success, -1 otherwise.
*/
__u8 get_vfatname_block[MAX_CLUSTSIZE];
static int
get_vfatname(fsdata *mydata, int curclust, __u8 *cluster,
dir_entry *retdent, char *l_name)
@@ -447,7 +443,6 @@ get_vfatname(fsdata *mydata, int curclust, __u8 *cluster,
}
if ((__u8*)slotptr >= nextclust) {
__u8 block[MAX_CLUSTSIZE];
dir_slot *slotptr2;
slotptr--;
@@ -457,18 +452,18 @@ get_vfatname(fsdata *mydata, int curclust, __u8 *cluster,
FAT_ERROR("Invalid FAT entry\n");
return -1;
}
if (get_cluster(mydata, curclust, block,
if (get_cluster(mydata, curclust, get_vfatname_block,
mydata->clust_size * SECTOR_SIZE) != 0) {
FAT_DPRINT("Error: reading directory block\n");
return -1;
}
slotptr2 = (dir_slot*) block;
slotptr2 = (dir_slot*) get_vfatname_block;
while (slotptr2->id > 0x01) {
slotptr2++;
}
/* Save the real directory entry */
realdent = (dir_entry*)slotptr2 + 1;
while ((__u8*)slotptr2 >= block) {
while ((__u8*)slotptr2 >= get_vfatname_block) {
slot2str(slotptr2, l_name, &idx);
slotptr2--;
}
@@ -514,12 +509,12 @@ mkcksum(const char *str)
* Get the directory entry associated with 'filename' from the directory
* starting at 'startsect'
*/
__u8 get_dentfromdir_block[MAX_CLUSTSIZE];
static dir_entry *get_dentfromdir (fsdata * mydata, int startsect,
char *filename, dir_entry * retdent,
int dols)
{
__u16 prevcksum = 0xffff;
__u8 block[MAX_CLUSTSIZE];
__u32 curclust = START (retdent);
int files = 0, dirs = 0;
@@ -528,12 +523,12 @@ static dir_entry *get_dentfromdir (fsdata * mydata, int startsect,
dir_entry *dentptr;
int i;
if (get_cluster (mydata, curclust, block,
if (get_cluster (mydata, curclust, get_dentfromdir_block,
mydata->clust_size * SECTOR_SIZE) != 0) {
FAT_DPRINT ("Error: reading directory block\n");
return NULL;
}
dentptr = (dir_entry *) block;
dentptr = (dir_entry *) get_dentfromdir_block;
for (i = 0; i < DIRENTSPERCLUST; i++) {
char s_name[14], l_name[256];
@@ -544,7 +539,7 @@ static dir_entry *get_dentfromdir (fsdata * mydata, int startsect,
(dentptr->name[0] & 0x40)) {
prevcksum = ((dir_slot *) dentptr)
->alias_checksum;
get_vfatname (mydata, curclust, block,
get_vfatname (mydata, curclust, get_dentfromdir_block,
dentptr, l_name);
if (dols) {
int isdir = (dentptr->attr & ATTR_DIR);
@@ -716,11 +711,11 @@ read_bootsectandvi(boot_sector *bs, volume_info *volinfo, int *fatsize)
}
__u8 do_fat_read_block[MAX_CLUSTSIZE]; /* Block buffer */
static long
do_fat_read (const char *filename, void *buffer, unsigned long maxsize,
int dols)
{
__u8 block[MAX_CLUSTSIZE]; /* Block buffer */
char fnamecopy[2048];
boot_sector bs;
volume_info volinfo;
@@ -792,11 +787,11 @@ do_fat_read (const char *filename, void *buffer, unsigned long maxsize,
while (1) {
int i;
if (disk_read (cursect, mydata->clust_size, block) < 0) {
if (disk_read (cursect, mydata->clust_size, do_fat_read_block) < 0) {
FAT_DPRINT ("Error: reading rootdir block\n");
return -1;
}
dentptr = (dir_entry *) block;
dentptr = (dir_entry *) do_fat_read_block;
for (i = 0; i < DIRENTSPERBLOCK; i++) {
char s_name[14], l_name[256];
@@ -806,7 +801,7 @@ do_fat_read (const char *filename, void *buffer, unsigned long maxsize,
if ((dentptr->attr & ATTR_VFAT) &&
(dentptr->name[0] & 0x40)) {
prevcksum = ((dir_slot *) dentptr)->alias_checksum;
get_vfatname (mydata, 0, block, dentptr, l_name);
get_vfatname (mydata, 0, do_fat_read_block, dentptr, l_name);
if (dols == LS_ROOT) {
int isdir = (dentptr->attr & ATTR_DIR);
char dirc;

View File

@@ -92,6 +92,10 @@ typedef struct bd_info {
/* third onboard ethernet port */
unsigned char bi_enet2addr[6];
#endif
#if defined(CONFIG_405GP) || defined(CONFIG_405EP)
unsigned int bi_opbfreq; /* OPB clock in Hz */
int bi_iic_fast[2]; /* Use fast i2c mode */
#endif
#if defined(CONFIG_NX823)
unsigned char bi_sernum[8];
#endif

View File

@@ -96,12 +96,10 @@
/*------------------------------------------------------------------------
* Ethernet -- needs work!
*----------------------------------------------------------------------*/
#if 0
#define CONFIG_DRIVER_SMC91111 /* Using SMC91c111 */
#define CONFIG_SMC91111_BASE 0x00910000 /* Base address */
#undef CONFIG_SMC91111_EXT_PHY /* No external PHY */
#define CONFIG_SMC_USE_32_BIT 1 /* 32-bit i/f */
#endif
#define CONFIG_SMC91111_BASE 0x00910300 /* Base address */
#undef CONFIG_SMC91111_EXT_PHY /* Internal PHY */
#define CONFIG_SMC_USE_32_BIT /* 32-bit data rd/wr */
#define CONFIG_ETHADDR 08:00:3e:26:0a:5b
#define CONFIG_NETMASK 255.255.255.0
@@ -131,7 +129,6 @@
CFG_CMD_JFFS2 | \
CFG_CMD_KGDB | \
CFG_CMD_NAND | \
CFG_CMD_NET | \
CFG_CMD_MMC | \
CFG_CMD_MII | \
CFG_CMD_PCI | \

View File

@@ -90,12 +90,44 @@
/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
#include <cmd_confdefs.h>
#if (TEXT_BASE == 0xFF000000) /* Boot low with 16 MB Flash */
# define CFG_LOWBOOT 1
# define CFG_LOWBOOT16 1
#endif
#if (TEXT_BASE == 0xFF800000) /* Boot low with 8 MB Flash */
# define CFG_LOWBOOT 1
# define CFG_LOWBOOT08 1
#endif
/*
* Autobooting
*/
#define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */
#define CONFIG_BOOTCOMMAND "bootm 100000" /* autoboot command */
#define CONFIG_BOOTARGS "root=/dev/ram rw"
#define CONFIG_PREBOOT "echo;" \
"echo Type \"run flash_nfs\" to mount root filesystem over NFS;" \
"echo"
#undef CONFIG_BOOTARGS
#define CONFIG_EXTRA_ENV_SETTINGS \
"netdev=eth0\0" \
"nfsargs=setenv bootargs root=/dev/nfs rw " \
"nfsroot=$(serverip):$(rootpath)\0" \
"ramargs=setenv bootargs root=/dev/ram rw\0" \
"addip=setenv bootargs $(bootargs) " \
"ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask)" \
":$(hostname):$(netdev):off panic=1\0" \
"flash_nfs=run nfsargs addip;" \
"bootm $(kernel_addr)\0" \
"flash_self=run ramargs addip;" \
"bootm $(kernel_addr) $(ramdisk_addr)\0" \
"net_nfs=tftp 200000 $(bootfile);run nfsargs addip;bootm\0" \
"rootpath=/opt/eldk/ppc_82xx\0" \
"bootfile=/tftpboot/MPC5200/uImage\0" \
""
#define CONFIG_BOOTCOMMAND "run flash_self"
#if defined(CONFIG_MPC5200)
/*
@@ -123,19 +155,19 @@
/*
* Flash configuration
*/
#define CFG_FLASH_16M 1
#if !defined(CFG_FLASH_16M) /* 8Mb chips support only */
#define CFG_FLASH_BASE 0xff800000
#define CFG_FLASH_SIZE 0x00800000
#define CFG_MAX_FLASH_BANKS 1 /* max num of memory banks */
#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x740000)
#else
#define CFG_FLASH_BASE 0xff000000
#define CFG_FLASH_SIZE 0x01000000
#if !defined(CFG_LOWBOOT)
#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x740000 + 0x800000)
#define CFG_MAX_FLASH_BANKS 2 /* max num of memory banks */
#else /* CFG_LOWBOOT */
#if defined(CFG_LOWBOOT08)
#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x30000 + 0x800000)
#endif
#if defined(CFG_LOWBOOT16)
#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x30000)
#endif
#endif /* CFG_LOWBOOT */
#define CFG_MAX_FLASH_BANKS 2 /* max num of memory banks */
#define CFG_MAX_FLASH_SECT 128 /* max num of sects on one chip */
@@ -174,7 +206,7 @@
# define CFG_RAMBOOT 1
#endif
#define CFG_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */
#define CFG_MONITOR_LEN (192 << 10) /* Reserve 192 kB for Monitor */
#define CFG_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */
#define CFG_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
@@ -213,8 +245,13 @@
/*
* Various low-level settings
*/
#if defined(CONFIG_MPC5200)
#define CFG_HID0_INIT HID0_ICE | HID0_ICFI
#define CFG_HID0_FINAL HID0_ICE
#else
#define CFG_HID0_INIT 0
#define CFG_HID0_FINAL 0
#endif
#define CFG_BOOTCS_START CFG_FLASH_BASE
#define CFG_BOOTCS_SIZE CFG_FLASH_SIZE

View File

@@ -35,6 +35,7 @@
#define CONFIG_MPC855 1 /* This is a MPC855 CPU */
#define CONFIG_TQM855M 1 /* ...on a TQM8xxM module */
#define CONFIG_NSCU 1
#define CONFIG_8xx_CONS_SCC1 1 /* Console is on SMC1 */
@@ -285,6 +286,9 @@
*-----------------------------------------------------------------------
*
*/
/* NSCU use both slots, SLOT_A as "primary". */
#define CONFIG_PCMCIA_SLOT_A 1
#define CFG_PCMCIA_MEM_ADDR (0xE0000000)
#define CFG_PCMCIA_MEM_SIZE ( 64 << 20 )
#define CFG_PCMCIA_DMA_ADDR (0xE4000000)
@@ -293,6 +297,9 @@
#define CFG_PCMCIA_ATTRB_SIZE ( 64 << 20 )
#define CFG_PCMCIA_IO_ADDR (0xEC000000)
#define CFG_PCMCIA_IO_SIZE ( 64 << 20 )
#define PCMCIA_MEM_WIN_NO 8 /* override default 4 in pcmcia.h */
#define PCMCIA_SOCKETS_NO 2 /* we have two sockets */
#define NSCU_OE_INV 1 /* PCMCIA_GCRX_CXOE is inverted on early boards */
/*-----------------------------------------------------------------------
* IDE/ATA stuff (Supports IDE harddisk on PCMCIA Adapter)
@@ -305,10 +312,11 @@
#undef CONFIG_IDE_LED /* LED for ide not supported */
#undef CONFIG_IDE_RESET /* reset for ide not supported */
#define CFG_IDE_MAXBUS 1 /* max. 1 IDE bus */
#define CFG_IDE_MAXDEVICE 1 /* max. 1 drive per IDE bus */
#define CFG_IDE_MAXBUS 2 /* max. 2 IDE buses */
#define CFG_IDE_MAXDEVICE 4 /* max. 2 drives per IDE bus */
#define CFG_ATA_IDE0_OFFSET 0x0000
#define CFG_ATA_IDE1_OFFSET (4 * CFG_PCMCIA_MEM_SIZE) /* starts @ 4th window */
#define CFG_ATA_BASE_ADDR CFG_PCMCIA_MEM_ADDR

View File

@@ -282,7 +282,7 @@
#define PCI_HOST_AUTO 2 /* detected via arbiter enable */
#define CONFIG_PCI /* include pci support */
#define CONFIG_PCI_HOST PCI_HOST_HOST /* select pci host function */
#define CONFIG_PCI_HOST PCI_HOST_FORCE /* select pci host function */
#undef CONFIG_PCI_PNP /* do pci plug-and-play */
/* resource configuration */
@@ -691,4 +691,6 @@
#endif
#endif
#define CFG_OPB_FREQ 50000000
#endif /* __CONFIG_H */

View File

@@ -86,7 +86,11 @@
# define CONFIG_STATUS_LED 1 /* Status LED enabled */
#endif /* CONFIG_LCD */
#undef CONFIG_CAN_DRIVER /* CAN Driver support disabled */
#ifdef CONFIG_BMS2003
# define CONFIG_CAN_DRIVER 1 /* CAN Driver support enabled */
#else
# undef CONFIG_CAN_DRIVER /* CAN Driver support disabled */
#endif
#define CONFIG_BOOTP_MASK (CONFIG_BOOTP_DEFAULT | CONFIG_BOOTP_BOOTFILESIZE)

View File

@@ -37,7 +37,7 @@
#define CONFIG_TQM823M 1 /* ...on a TQM8xxM module */
#ifdef CONFIG_LCD /* with LCD controller ? */
/* #define CONFIG_NEC_NL6648BC20 1 / * use NEC NL6648BC20 display */
/* #define CONFIG_NEC_NL6448BC20 1 / * use NEC NL6448BC20 display */
#endif
#define CONFIG_8xx_CONS_SMC1 1 /* Console is on SMC1 */

View File

@@ -99,6 +99,10 @@
/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
#include <cmd_confdefs.h>
#define CONFIG_AUTOBOOT_KEYED /* Enable password protection */
#define CONFIG_AUTOBOOT_PROMPT "\nEnter password - autoboot in %d sec...\n"
#define CONFIG_AUTOBOOT_DELAY_STR "system"
/*
* Miscellaneous configurable options
*/

View File

@@ -71,7 +71,7 @@
#define CONFIG_SVM_SC8xx 1 /* ...on SVM SC8xx series */
#ifdef CONFIG_LCD /* with LCD controller ? */
/* #define CONFIG_NEC_NL6648BC20 1 / * use NEC NL6648BC20 display */
/* #define CONFIG_NEC_NL6448BC20 1 / * use NEC NL6448BC20 display */
#endif
#define CONFIG_8xx_CONS_SMC1 1 /* Console is on SMC1 */

View File

@@ -62,6 +62,8 @@
#define CFG_DEVICE_NULLDEV 1 /* enble null device */
#define CONFIG_SILENT_CONSOLE 1 /* enable silent startup */
#define CONFIG_VERSION_VARIABLE 1 /* include version env variable */
/***********************************************************
* I2C stuff:
* the TRAB is equipped with an ATMEL 24C04 EEPROM at
@@ -204,7 +206,7 @@
"loadaddr=c400000\0" \
"net_load=tftpboot $loadaddr $loadfile\0" \
"net_nfs=run net_load nfs_args add_net add_misc;bootm\0" \
"kernel_addr=000C0000\0" \
"kernel_addr=00060000\0" \
"flash_nfs=run nfs_args add_net add_misc;bootm $kernel_addr\0" \
"mdm_init1=ATZ\0" \
"mdm_init2=ATS0=1\0" \

View File

@@ -41,6 +41,11 @@
#include <inttypes.h>
#elif defined(__linux__) && defined(USE_HOSTCC)
#include <stdint.h>
#elif defined(__WIN32__)
#include <unistd.h>
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
#endif
/*

View File

@@ -138,7 +138,7 @@
#define PLPRCR_MF_MSK 0xffff001e /* Multiplication factor + PDF bits */
#define PLPRCR_MFN_MSK 0xf8000000 /* Multiplication factor numerator bits */
#define PLPRCR_MFN_SHIFT 0x0000001b /* Multiplication factor numerator shift*/
#define PLPRCR_MFD_MSK 0x03c00000 /* Multiplication factor denominator bits */
#define PLPRCR_MFD_MSK 0x07c00000 /* Multiplication factor denominator bits */
#define PLPRCR_MFD_SHIFT 0x00000017 /* Multiplication factor denominator shift*/
#define PLPRCR_S_MSK 0x00300000 /* Multiplication factor integer bits */
#define PLPRCR_S_SHIFT 0x00000014 /* Multiplication factor integer shift */

View File

@@ -117,6 +117,7 @@ extern int eth_init(bd_t *bis); /* Initialize the device */
extern int eth_send(volatile void *packet, int length); /* Send a packet */
extern int eth_rx(void); /* Check for received packets */
extern void eth_halt(void); /* stop SCC */
extern char *eth_get_name(void); /* get name of current device */
/**********************************************************************/

View File

@@ -24,6 +24,6 @@
#ifndef __VERSION_H__
#define __VERSION_H__
#define U_BOOT_VERSION "U-Boot 1.0.0-pre"
#define U_BOOT_VERSION "U-Boot 1.0.1"
#endif /* __VERSION_H__ */

View File

@@ -111,9 +111,9 @@ static int init_baudrate (void)
static int display_banner (void)
{
#ifdef CONFIG_SILENT_CONSOLE
DECLARE_GLOBAL_DATA_PTR;
#ifdef CONFIG_SILENT_CONSOLE
if (gd->flags & GD_FLG_SILENT)
return (0);
#endif
@@ -161,9 +161,9 @@ static int display_dram_config (void)
static void display_flash_config (ulong size)
{
#ifdef CONFIG_SILENT_CONSOLE
DECLARE_GLOBAL_DATA_PTR;
#ifdef CONFIG_SILENT_CONSOLE
if (gd->flags & GD_FLG_SILENT)
return;
#endif

View File

@@ -27,6 +27,7 @@
#include <common.h>
#include <devices.h>
#include <watchdog.h>
#include <net.h>
/*
@@ -107,6 +108,8 @@ void board_init (void)
bd_t *bd;
init_fnc_t **init_fnc_ptr;
char *s, *e;
int i;
/* Pointer is writable since we allocated a register for it.
* Nios treats CFG_GBL_DATA_OFFSET as an address.
@@ -142,6 +145,13 @@ void board_init (void)
malloc_bin_reloc();
env_relocate();
bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
s = getenv ("ethaddr");
for (i = 0; i < 6; ++i) {
bd->bi_enetaddr[i] = s ? simple_strtoul (s, &e, 16) : 0;
if (s) s = (*e) ? e + 1 : e;
}
devices_init();
jumptable_init();
console_init_r();
@@ -164,3 +174,4 @@ void hang (void)
puts("### ERROR ### Please reset board ###\n");
for (;;);
}

View File

@@ -501,6 +501,14 @@ void board_init_f (ulong bootflag)
bd->bi_plb_busfreq = gd->bus_clk;
#if defined(CONFIG_405GP) || defined(CONFIG_405EP)
bd->bi_pci_busfreq = get_PCI_freq ();
#ifdef CFG_OPB_FREQ
bd->bi_opbfreq = CFG_OPB_FREQ;
#else
bd->bi_opbfreq = 50000000;
#endif
bd->bi_iic_fast[0] = 0;
bd->bi_iic_fast[1] = 0;
#endif
#endif

View File

@@ -324,4 +324,8 @@ void eth_try_another(int first_restart)
}
}
char *eth_get_name (void)
{
return (eth_current ? eth_current->name : "unknown");
}
#endif

View File

@@ -294,6 +294,9 @@ TftpStart (void)
tftp_filename = BootFile;
}
#if defined(CONFIG_NET_MULTI)
printf ("Using %s device\n", eth_get_name());
#endif
puts ("TFTP from server "); print_IPaddr (NetServerIP);
puts ("; our IP address is "); print_IPaddr (NetOurIP);

View File

@@ -96,6 +96,7 @@ endif
#
ifeq ($(HOSTOS),cygwin)
SFX = .exe
HOST_CFLAGS += -D__WIN32__
else
SFX =
endif

View File

@@ -11,11 +11,6 @@
#endif
#endif
#ifdef __CYGWIN__
typedef unsigned short ushort;
#endif /* __CYGWIN__ */
typedef struct bitmap_s { /* bitmap description */
uint16_t width;
uint16_t height;

View File

@@ -291,7 +291,7 @@ NXTARG: ;
exit (EXIT_FAILURE);
}
if (sbuf.st_size < sizeof(image_header_t)) {
if ((unsigned)sbuf.st_size < sizeof(image_header_t)) {
fprintf (stderr,
"%s: Bad size: \"%s\" is no valid image\n",
cmdname, imagefile);
@@ -530,7 +530,7 @@ copy_file (int ifd, const char *datafile, int pad)
* reserved for it.
*/
if (sbuf.st_size < sizeof(image_header_t)) {
if ((unsigned)sbuf.st_size < sizeof(image_header_t)) {
fprintf (stderr,
"%s: Bad size: \"%s\" is too small for XIP\n",
cmdname, datafile);