Changes for U-Boot 1.0.0:
======================================================================
+* Patches by Anders Larsen, 17 Sep 2003:
+ - fix spelling errors
+ - set GD_FLG_DEVINIT flag only after device function pointers
+ are valid
+ - Allow CFG_ALT_MEMTEST on systems where address zero isn't
+ writeable
+ - enable 3.rd UART (ST-UART) on PXA(XScale) CPUs
+ - trigger watchdog while waiting in serial driver
+
* Add auto-update code for TRAB board using USB memory sticks,
support new configuration with more memory
- CFG_ALT_MEMTEST:
Enable an alternate, more extensive memory test.
+- CFG_MEMTEST_SCRATCH:
+ Scratch address used by the alternate memory test
+ You only need to set this if address zero isn't writeable
+
- CFG_TFTP_LOADADDR:
Default load address for network file downloads
if (i == 0)
flashbase = PHYS_FLASH_1;
else
- panic ("configured to many flash banks!\n");
+ panic ("configured too many flash banks!\n");
sector = 0;
start_address = flashbase;
flashbase = PHYS_FLASH_2;
break;
default:
- panic("configured to many flash banks!\n");
+ panic("configured too many flash banks!\n");
break;
}
for (j = 0; j < flash_info[i].sector_count; j++)
flashbase = PHYS_FLASH_1;
break;
default:
- panic("configured to many flash banks!\n");
+ panic("configured too many flash banks!\n");
break;
}
for (j = 0; j < flash_info[i].sector_count; j++) {
flash_get_offsets(PHYS_FLASH_1, &flash_info[i]);
break;
default:
- panic("configured to many flash banks!\n");
+ panic("configured too many flash banks!\n");
break;
}
size += flash_info[i].size;
if (i == 0)
flashbase = PHYS_FLASH_1;
else
- panic ("configured to many flash banks!\n");
+ panic ("configured too many flash banks!\n");
for (j = 0; j < flash_info[i].sector_count; j++) {
flash_info[i].start[j] = flashbase + j * MAIN_SECT_SIZE;
}
else if (i == 1)
flashbase = PHYS_FLASH_2;
else
- panic("configured to many flash banks!\n");
+ panic("configured too many flash banks!\n");
for (j = 0; j < flash_info[i].sector_count; j++)
{
if (j <= 7)
flashbase = PHYS_FLASH_1;
break;
default:
- panic("configured to many flash banks!\n");
+ panic("configured too many flash banks!\n");
break;
}
for (j = 0; j < flash_info[i].sector_count; j++) {
if (i == 0)
flashbase = PHYS_FLASH_1;
else
- panic("configured to many flash banks!\n");
+ panic("configured too many flash banks!\n");
for (j = 0; j < flash_info[i].sector_count; j++)
{
if (j <= 7)
flashbase = PHYS_FLASH_2;
break;
default:
- panic("configured to many flash banks!\n");
+ panic("configured too many flash banks!\n");
break;
}
for (j = 0; j < flash_info[i].sector_count; j++)
flash_get_offsets (PHYS_FLASH_2, &flash_info[i]);
break;
default:
- panic ("configured to many flash banks!\n");
+ panic ("configured too many flash banks!\n");
break;
}
size += flash_info[i].size;
if (i==0)
flashbase = CFG_FLASH_BASE;
else
- panic("configured to many flash banks!\n");
+ panic("configured too many flash banks!\n");
for (j = 0; j < flash_info[i].sector_count; j++)
flash_info[i].start[j]=flashbase + j * SECT_SIZE;
if (i == 0)
flashbase = PHYS_FLASH_1;
else
- panic("configured to many flash banks!\n");
+ panic("configured too many flash banks!\n");
for (j = 0; j < flash_info[i].sector_count; j++)
{
if (j <= 3)
flash_get_offsets (PHYS_FLASH_1, &flash_info[i]);
break;
default:
- panic ("configured to many flash banks!\n");
+ panic ("configured too many flash banks!\n");
break;
}
size += flash_info[i].size;
flash_get_offsets (PHYS_FLASH_1, &flash_info[i]);
break;
default:
- panic ("configured to many flash banks!\n");
+ panic ("configured too many flash banks!\n");
break;
}
size += flash_info[i].size;
flashbase = SC520_FLASH_BANK2_BASE;
break;
default:
- panic("configured to many flash banks!\n");
+ panic("configured too many flash banks!\n");
}
id = identify_flash(flashbase, 4);
flashbase = SC520_FLASH_BANK0_BASE;
break;
default:
- panic("configured to many flash banks!\n");
+ panic("configured too many flash banks!\n");
}
for (j = 0; j < flash_info[i].sector_count; j++) {
flashbase = SC520_FLASH_BANK0_BASE;
break;
default:
- panic("configured to many flash banks!\n");
+ panic("configured too many flash banks!\n");
}
id = identify_flash(flashbase, 2);
if (i == 0)
flashbase = PHYS_FLASH_1;
else
- panic("configured to many flash banks!\n");
+ panic("configured too many flash banks!\n");
for (j = 0; j < flash_info[i].sector_count; j++)
{
*(unsigned long *)temp = 0x00060006;
}
-#endif /* CONFIG_INIT_CRITICAL */
+#endif /* CONFIG_INFERNO */
/* arch number for shannon */
gd->bd->bi_arch_number = 97;
if (i == 0)
flashbase = PHYS_FLASH_1;
else
- panic("configured to many flash banks!\n");
+ panic("configured too many flash banks!\n");
for (j = 0; j < flash_info[i].sector_count; j++)
{
if (j <= 3)
vu_long temp;
vu_long anti_pattern;
vu_long num_words;
+#if defined(CFG_MEMTEST_SCRATCH)
+ vu_long *dummy = (vu_long*)CFG_MEMTEST_SCRATCH;
+#else
vu_long *dummy = NULL;
+#endif
int j;
int iterations = 1;
console_setfile (stdin, inputdev);
}
+ gd->flags |= GD_FLG_DEVINIT; /* device initialization completed */
+
#ifndef CFG_CONSOLE_INFO_QUIET
/* Print information */
printf ("In: ");
/* Called after the relocation - use desired console functions */
int console_init_r (void)
{
+ DECLARE_GLOBAL_DATA_PTR;
+
device_t *inputdev = NULL, *outputdev = NULL;
int i, items = ListNumItems (devlist);
console_setfile (stdin, inputdev);
}
+ gd->flags |= GD_FLG_DEVINIT; /* device initialization completed */
+
#ifndef CFG_CONSOLE_INFO_QUIET
/* Print information */
printf ("In: ");
int devices_init (void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
#ifndef CONFIG_ARM /* already relocated for current ARM implementation */
ulong relocation_offset = gd->reloc_off;
int i;
#endif
drv_system_init ();
- gd-> flags |= GD_FLG_DEVINIT; /* device initialization done */
-
return (0);
}
int i;
USB_PRINTF("New Device %d\n",dev_index);
if(dev_index==USB_MAX_DEVICE) {
- printf("ERROR, to many USB Devices max=%d\n",USB_MAX_DEVICE);
+ printf("ERROR, too many USB Devices, max=%d\n",USB_MAX_DEVICE);
return NULL;
}
usb_dev[dev_index].devnum=dev_index+1; /* default Address is 0, real addresses start with 1 */
{
extern void reset_cpu (ulong addr);
- printf ("reseting ...\n");
+ printf ("resetting ...\n");
udelay (50000); /* wait 50 ms */
disable_interrupts ();
*/
#include <common.h>
+#include <watchdog.h>
#include <asm/arch/pxa-regs.h>
void serial_setbrg (void)
unsigned int quot = 0;
if (gd->baudrate == 1200)
- quot = 192;
+ quot = 768;
else if (gd->baudrate == 9600)
quot = 96;
else if (gd->baudrate == 19200)
hang ();
#ifdef CONFIG_FFUART
-
CKEN |= CKEN6_FFUART;
FFIER = 0; /* Disable for now */
BTIER = IER_UUE; /* Enable BFUART */
#elif defined(CONFIG_STUART)
-#error "Bad: not implemented yet!"
+ CKEN |= CKEN5_STUART;
+
+ STIER = 0;
+ STFCR = 0;
+
+ /* set baud rate */
+ STLCR = LCR_DLAB;
+ STDLL = quot & 0xff;
+ STDLH = quot >> 8;
+ STLCR = LCR_WLS0 | LCR_WLS1;
+
+ STIER = IER_UUE; /* Enable STUART */
+
#else
-#error "Bad: you didn't configured serial ..."
+#error "Bad: you didn't configure serial ..."
#endif
}
{
#ifdef CONFIG_FFUART
/* wait for room in the tx FIFO on FFUART */
- while ((FFLSR & LSR_TEMT) == 0);
-
+ while ((FFLSR & LSR_TEMT) == 0)
+ WATCHDOG_RESET (); /* Reset HW Watchdog, if needed */
FFTHR = c;
#elif defined(CONFIG_BTUART)
- while ((BTLSR & LSR_TEMT ) == 0 );
+ while ((BTLSR & LSR_TEMT ) == 0 )
+ WATCHDOG_RESET (); /* Reset HW Watchdog, if needed */
BTTHR = c;
#elif defined(CONFIG_STUART)
+ while ((STLSR & LSR_TEMT ) == 0 )
+ WATCHDOG_RESET (); /* Reset HW Watchdog, if needed */
+ STTHR = c;
#endif
/* If \n, also do \r */
#elif defined(CONFIG_BTUART)
return BTLSR & LSR_DR;
#elif defined(CONFIG_STUART)
+ return STLSR & LSR_DR;
#endif
}
int serial_getc (void)
{
#ifdef CONFIG_FFUART
- while (!(FFLSR & LSR_DR));
-
+ while (!(FFLSR & LSR_DR))
+ WATCHDOG_RESET (); /* Reset HW Watchdog, if needed */
return (char) FFRBR & 0xff;
#elif defined(CONFIG_BTUART)
- while (!(BTLSR & LSR_DR));
-
+ while (!(BTLSR & LSR_DR))
+ WATCHDOG_RESET (); /* Reset HW Watchdog, if needed */
return (char) BTRBR & 0xff;
#elif defined(CONFIG_STUART)
+ while (!(STLSR & LSR_DR))
+ WATCHDOG_RESET (); /* Reset HW Watchdog, if needed */
+ return (char) STRBR & 0xff;
#endif
}