mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 06:31:31 +00:00
Merge branch 'master' of git://git.denx.de/u-boot-socfpga
This commit is contained in:
commit
6d76e2aca8
2 changed files with 12 additions and 2 deletions
|
@ -9,6 +9,7 @@
|
||||||
#include <altera.h>
|
#include <altera.h>
|
||||||
#include <miiphy.h>
|
#include <miiphy.h>
|
||||||
#include <netdev.h>
|
#include <netdev.h>
|
||||||
|
#include <watchdog.h>
|
||||||
#include <asm/arch/reset_manager.h>
|
#include <asm/arch/reset_manager.h>
|
||||||
#include <asm/arch/system_manager.h>
|
#include <asm/arch/system_manager.h>
|
||||||
#include <asm/arch/dwmmc.h>
|
#include <asm/arch/dwmmc.h>
|
||||||
|
@ -150,14 +151,23 @@ static inline void socfpga_fpga_add(void) {}
|
||||||
|
|
||||||
int arch_cpu_init(void)
|
int arch_cpu_init(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_HW_WATCHDOG
|
||||||
|
/*
|
||||||
|
* In case the watchdog is enabled, make sure to (re-)configure it
|
||||||
|
* so that the defined timeout is valid. Otherwise the SPL (Perloader)
|
||||||
|
* timeout value is still active which might too short for Linux
|
||||||
|
* booting.
|
||||||
|
*/
|
||||||
|
hw_watchdog_init();
|
||||||
|
#else
|
||||||
/*
|
/*
|
||||||
* If the HW watchdog is NOT enabled, make sure it is not running,
|
* If the HW watchdog is NOT enabled, make sure it is not running,
|
||||||
* for example because it was enabled in the preloader. This might
|
* for example because it was enabled in the preloader. This might
|
||||||
* trigger a watchdog-triggered reboot of Linux kernel later.
|
* trigger a watchdog-triggered reboot of Linux kernel later.
|
||||||
*/
|
*/
|
||||||
#ifndef CONFIG_HW_WATCHDOG
|
|
||||||
socfpga_watchdog_reset();
|
socfpga_watchdog_reset();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -139,7 +139,7 @@
|
||||||
#define CONFIG_DESIGNWARE_WATCHDOG
|
#define CONFIG_DESIGNWARE_WATCHDOG
|
||||||
#define CONFIG_DW_WDT_BASE SOCFPGA_L4WD0_ADDRESS
|
#define CONFIG_DW_WDT_BASE SOCFPGA_L4WD0_ADDRESS
|
||||||
#define CONFIG_DW_WDT_CLOCK_KHZ 25000
|
#define CONFIG_DW_WDT_CLOCK_KHZ 25000
|
||||||
#define CONFIG_HW_WATCHDOG_TIMEOUT_MS 12000
|
#define CONFIG_HW_WATCHDOG_TIMEOUT_MS 30000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue