return 0;
}
+void board_reset (void)
+{
+ AT91PS_PIO pio = AT91C_BASE_PIOA;
+
+ /* Clear PA19 to trigger the hard reset */
+ writel(0x00080000, pio->PIO_CODR);
+ writel(0x00080000, pio->PIO_OER);
+ writel(0x00080000, pio->PIO_PER);
+}
+
int dram_init (void)
{
gd->bd->bi_dram[0].start = PHYS_SDRAM;
static ulong timestamp;
static ulong lastinc;
+void board_reset(void) __attribute__((__weak__));
+
int interrupt_init (void)
{
tmr = AT91C_BASE_TC0;
void reset_cpu (ulong ignored)
{
-#ifdef CONFIG_AT91RM9200DK
- AT91PS_PIO pio = AT91C_BASE_PIOA;
-#endif
-
#if defined(CONFIG_AT91RM9200_USART)
/*shutdown the console to avoid strange chars during reset */
serial_exit();
#endif
-#ifdef CONFIG_AT91RM9200DK
- /* Clear PA19 to trigger the hard reset */
- pio->PIO_CODR = 0x00080000;
- pio->PIO_OER = 0x00080000;
- pio->PIO_PER = 0x00080000;
-#endif
+ if (board_reset)
+ board_reset();
/* this is the way Linux does it */