Modifications for 1.1.5:
======================================================================
+* Fix output for CFG_FLASH_CHECKSUM
+ (based on patch by Greg Allen, 12 Feb 2002
+
* Patch by Jonathan De Bruyne, 01 Feb 2002:
Add support for Siemens IAD210 board
if ((flash_size = flash_init ()) > 0) {
#ifdef CFG_FLASH_CHECKSUM
- int flash_crc = 0;
-
+ if (flash_size >= (1 << 20)) {
+ printf ("%2ld MB", flash_size >> 20);
+ } else {
+ printf ("%2ld kB", flash_size >> 10);
+ }
/*
* Compute and print flash CRC if flashchecksum is set to 'y'
*
*/
s = getenv ("flashchecksum");
if (s && (*s == 'y')) {
- flash_crc = crc32 (0, (const unsigned char *)CFG_FLASH_BASE,
- flash_size);
+ printf (" CRC: %08X",
+ crc32 ( 0,
+ (const unsigned char *)CFG_FLASH_BASE,
+ flash_size)
+ );
}
- if (flash_size >= (1 << 20)) {
- printf ("%2ld MB", flash_size >> 20);
- } else {
- printf ("%2ld kB", flash_size >> 10);
- }
- printf (" CRC: %08X\n", flash_crc);
+ putc('\n');
#else
- if (flash_size >= (1 << 20)) {
+ if (flash_size >= (1 << 20)) {
printf ("%2ld MB\n", flash_size >> 20);
} else {
printf ("%2ld kB\n", flash_size >> 10);
* no function pointer passed, this protects against calling it. Also define
* the global variable that holds the passed pointer.
*/
-#define DELAY_US 100000
+#define TIMEOUT 10*CFG_HZ
#define PRINT if ( app_print ) app_print
static int (*app_print)(char *,...);
{
I2CStatus rval;
unsigned int dev_stat;
- int time_is_up = 0;
if (act == I2C_MASTER_RCV)
{
/* set up for master-receive transaction */
*/
while ( rval == I2CSUCCESS || rval == I2CADDRESS )
{
+ int timeval = get_timer(0);
+
/* poll the device until something happens */
do
{
rval = I2C_Timer_Event( Global_eumbbar, 0 );
- if ((rval == I2CNOEVENT && !time_is_up))
- {
- udelay(DELAY_US);
- time_is_up++;
- } else {
- if ((time_is_up && rval == I2CNOEVENT))
- {
- rval = I2CERROR;
- }
- }
}
- while ( rval == I2CNOEVENT );
- time_is_up = 0;
+ while ( rval == I2CNOEVENT && get_timer(timeval) < TIMEOUT);
/* check for error condition */
if ( rval == I2CSUCCESS || rval == I2CBUFFFULL ||
*-----------------------------------------------------------------------
*/
-#define CONFIG_IDE_PCCARD 1 /* Use IDE with PC Card Adapter */
+#define CONFIG_IDE_8xx_PCCARD 1 /* Use IDE with PC Card Adapter */
-#undef CONFIG_IDE_PCMCIA /* Direct IDE not supported */
+#undef CONFIG_IDE_8xx_DIRECT /* Direct IDE not supported */
#undef CONFIG_IDE_LED /* LED for ide not supported */
#undef CONFIG_IDE_RESET /* reset for ide not supported */
#define CONFIG_I2C 1 /* To enable I2C support */
#define CFG_I2C_EEPROM_ADDR 0x57 /* EEPROM IS24C02 */
+#define CFG_EEPROM_PAGE_WRITE_BITS 3
+#define CFG_EEPROM_PAGE_WRITE_DELAY_MS 10 /* and takes up to 10 msec */
#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
#define CFG_FLASH_BANKS { FLASH_BASE0_PRELIM , FLASH_BASE1_PRELIM }
#if (CONFIG_COMMANDS & CFG_CMD_NET)
#define TIMEOUT 5 /* Seconds before trying ARP again */
-#define TIMEOUT_COUNT 10 /* # of timeouts before giving up */
+#define TIMEOUT_COUNT 1 /* # of timeouts before giving up */
static void ArpHandler(uchar *pkt, unsigned dest, unsigned src, unsigned len);
static void ArpTimeout(void);
#if (CONFIG_COMMANDS & CFG_CMD_NET)
#define TIMEOUT 5 /* Seconds before trying BOOTP again */
-#define TIMEOUT_COUNT 10 /* # of timeouts before giving up */
+#define TIMEOUT_COUNT 1 /* # of timeouts before giving up */
#define PORT_BOOTPS 67 /* BOOTP server UDP port */
#define PORT_BOOTPC 68 /* BOOTP client UDP port */
void
NetStartAgain(void)
{
+#ifndef CONFIG_NET_MULTI
NetSetTimeout(10 * CFG_HZ, startAgainTimeout);
NetSetHandler(startAgainHandler);
+#else
+ NetState = NETLOOP_RESTART;
+#endif
}
/**********************************************************************/
#if (CONFIG_COMMANDS & CFG_CMD_NET)
#define TIMEOUT 5 /* Seconds before trying BOOTP again */
-#define TIMEOUT_COUNT 10 /* # of timeouts before giving up */
+#define TIMEOUT_COUNT 1 /* # of timeouts before giving up */
int RarpTry;