mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-06-20 21:51:20 +00:00
MIPS: qemu-malta: add reset support
The MIPS Malta board has a SOFTRES register. Writing a magic value into that register initiates a board reset. Use this feature to implement reset support. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
This commit is contained in:
parent
5a4dcfac1e
commit
015643152a
2 changed files with 14 additions and 0 deletions
|
@ -13,4 +13,7 @@
|
||||||
|
|
||||||
#define MALTA_UART_BASE (MALTA_IO_PORT_BASE + 0x3f8)
|
#define MALTA_UART_BASE (MALTA_IO_PORT_BASE + 0x3f8)
|
||||||
|
|
||||||
|
#define MALTA_RESET_BASE 0x1f000500
|
||||||
|
#define GORESET 0x42
|
||||||
|
|
||||||
#endif /* _MIPS_ASM_MALTA_H */
|
#endif /* _MIPS_ASM_MALTA_H */
|
||||||
|
|
|
@ -8,6 +8,9 @@
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
|
||||||
|
#include <asm/io.h>
|
||||||
|
#include <asm/malta.h>
|
||||||
|
|
||||||
phys_size_t initdram(int board_type)
|
phys_size_t initdram(int board_type)
|
||||||
{
|
{
|
||||||
return CONFIG_SYS_MEM_SIZE;
|
return CONFIG_SYS_MEM_SIZE;
|
||||||
|
@ -18,3 +21,11 @@ int checkboard(void)
|
||||||
puts("Board: MIPS Malta CoreLV (Qemu)\n");
|
puts("Board: MIPS Malta CoreLV (Qemu)\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _machine_restart(void)
|
||||||
|
{
|
||||||
|
void __iomem *reset_base;
|
||||||
|
|
||||||
|
reset_base = (void __iomem *)CKSEG1ADDR(MALTA_RESET_BASE);
|
||||||
|
__raw_writel(GORESET, reset_base);
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue