mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-09 12:13:00 -04:00
at91rm9200: Reset update
Update the rm9200 reset sequence to try executing a board-specific reset function and move specific board reset to board. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
This commit is contained in:
parent
3524049cd0
commit
f82518d7f4
@ -54,6 +54,16 @@ int board_init (void)
|
|||||||
return 0;
|
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)
|
int dram_init (void)
|
||||||
{
|
{
|
||||||
gd->bd->bi_dram[0].start = PHYS_SDRAM;
|
gd->bd->bi_dram[0].start = PHYS_SDRAM;
|
||||||
|
@ -45,6 +45,8 @@ AT91PS_TC tmr;
|
|||||||
static ulong timestamp;
|
static ulong timestamp;
|
||||||
static ulong lastinc;
|
static ulong lastinc;
|
||||||
|
|
||||||
|
void board_reset(void) __attribute__((__weak__));
|
||||||
|
|
||||||
int interrupt_init (void)
|
int interrupt_init (void)
|
||||||
{
|
{
|
||||||
tmr = AT91C_BASE_TC0;
|
tmr = AT91C_BASE_TC0;
|
||||||
@ -166,21 +168,13 @@ ulong get_tbclk (void)
|
|||||||
void reset_cpu (ulong ignored)
|
void reset_cpu (ulong ignored)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef CONFIG_AT91RM9200DK
|
|
||||||
AT91PS_PIO pio = AT91C_BASE_PIOA;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_AT91RM9200_USART)
|
#if defined(CONFIG_AT91RM9200_USART)
|
||||||
/*shutdown the console to avoid strange chars during reset */
|
/*shutdown the console to avoid strange chars during reset */
|
||||||
serial_exit();
|
serial_exit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_AT91RM9200DK
|
if (board_reset)
|
||||||
/* Clear PA19 to trigger the hard reset */
|
board_reset();
|
||||||
pio->PIO_CODR = 0x00080000;
|
|
||||||
pio->PIO_OER = 0x00080000;
|
|
||||||
pio->PIO_PER = 0x00080000;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* this is the way Linux does it */
|
/* this is the way Linux does it */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user