Merge git://git.denx.de/u-boot-marvell
- Add DM based generic watchdog start and reset implementation and remove all ad-hoc implementations (Stefan) - Move mv_sdhci to DM (Pierre) - Misc turris_omnia updates (Pierre) - Change openrd targets to correctly build again (size changes and fixes to the dts targets) and bring it back into Travis builds (Stefan) - Add Kirkwood db-88f6281-bp board (Chris)
This commit is contained in:
@@ -119,41 +119,11 @@ int board_fix_fdt(void *blob)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_WDT_ARMADA_37XX
|
||||
static struct udevice *watchdog_dev __attribute__((section(".data"))) = NULL;
|
||||
|
||||
void watchdog_reset(void)
|
||||
{
|
||||
static ulong next_reset;
|
||||
ulong now;
|
||||
|
||||
if (!watchdog_dev)
|
||||
return;
|
||||
|
||||
now = timer_get_us();
|
||||
|
||||
/* Do not reset the watchdog too often */
|
||||
if (now > next_reset) {
|
||||
wdt_reset(watchdog_dev);
|
||||
next_reset = now + 100000;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
/* address of boot parameters */
|
||||
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
|
||||
|
||||
#ifdef CONFIG_WDT_ARMADA_37XX
|
||||
if (uclass_get_device(UCLASS_WDT, 0, &watchdog_dev)) {
|
||||
printf("Cannot find Armada 3720 watchdog!\n");
|
||||
} else {
|
||||
printf("Enabling Armada 3720 watchdog (3 minutes timeout).\n");
|
||||
wdt_start(watchdog_dev, 180000, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,13 +32,13 @@
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#define OMNIA_I2C_EEPROM_DM_NAME "i2c@0"
|
||||
#define OMNIA_I2C_EEPROM_DM_NAME "i2c@11000->i2cmux@70->i2c@0"
|
||||
#define OMNIA_I2C_EEPROM 0x54
|
||||
#define OMNIA_I2C_EEPROM_CONFIG_ADDR 0x0
|
||||
#define OMNIA_I2C_EEPROM_ADDRLEN 2
|
||||
#define OMNIA_I2C_EEPROM_MAGIC 0x0341a034
|
||||
|
||||
#define OMNIA_I2C_MCU_DM_NAME "i2c@0"
|
||||
#define OMNIA_I2C_MCU_DM_NAME "i2c@11000->i2cmux@70->i2c@0"
|
||||
#define OMNIA_I2C_MCU_ADDR_STATUS 0x1
|
||||
#define OMNIA_I2C_MCU_SATA 0x20
|
||||
#define OMNIA_I2C_MCU_CARDDET 0x10
|
||||
@@ -364,25 +364,12 @@ static bool disable_mcu_watchdog(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_WDT_ORION)
|
||||
static struct udevice *watchdog_dev __attribute__((section(".data"))) = NULL;
|
||||
#endif
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
/* adress of boot parameters */
|
||||
gd->bd->bi_boot_params = mvebu_sdram_bar(0) + 0x100;
|
||||
|
||||
#ifndef CONFIG_SPL_BUILD
|
||||
# ifdef CONFIG_WDT_ORION
|
||||
if (uclass_get_device(UCLASS_WDT, 0, &watchdog_dev)) {
|
||||
puts("Cannot find Armada 385 watchdog!\n");
|
||||
} else {
|
||||
puts("Enabling Armada 385 watchdog.\n");
|
||||
wdt_start(watchdog_dev, 120000, 0);
|
||||
}
|
||||
# endif
|
||||
|
||||
if (disable_mcu_watchdog())
|
||||
puts("Disabled MCU startup watchdog.\n");
|
||||
|
||||
@@ -392,28 +379,6 @@ int board_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_WATCHDOG
|
||||
/* Called by macro WATCHDOG_RESET */
|
||||
void watchdog_reset(void)
|
||||
{
|
||||
# if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_WDT_ORION)
|
||||
static ulong next_reset = 0;
|
||||
ulong now;
|
||||
|
||||
if (!watchdog_dev)
|
||||
return;
|
||||
|
||||
now = timer_get_us();
|
||||
|
||||
/* Do not reset the watchdog too often */
|
||||
if (now > next_reset) {
|
||||
wdt_reset(watchdog_dev);
|
||||
next_reset = now + 1000;
|
||||
}
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
|
||||
int board_late_init(void)
|
||||
{
|
||||
#ifndef CONFIG_SPL_BUILD
|
||||
|
||||
1
board/Marvell/db-88f6281-bp/.gitignore
vendored
Normal file
1
board/Marvell/db-88f6281-bp/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
kwbimage.cfg
|
||||
12
board/Marvell/db-88f6281-bp/Kconfig
Normal file
12
board/Marvell/db-88f6281-bp/Kconfig
Normal file
@@ -0,0 +1,12 @@
|
||||
if TARGET_DB_88F6281_BP
|
||||
|
||||
config SYS_BOARD
|
||||
default "db-88f6281-bp"
|
||||
|
||||
config SYS_VENDOR
|
||||
default "Marvell"
|
||||
|
||||
config SYS_CONFIG_NAME
|
||||
default "db-88f6281-bp"
|
||||
|
||||
endif
|
||||
10
board/Marvell/db-88f6281-bp/MAINTAINERS
Normal file
10
board/Marvell/db-88f6281-bp/MAINTAINERS
Normal file
@@ -0,0 +1,10 @@
|
||||
DB_88F6820_AMC BOARD
|
||||
M: Chris Packham <judge.packham@gmail.com>
|
||||
S: Maintained
|
||||
F: arch/arm/dts/kirkwood-db-88f6281.dts
|
||||
F: arch/arm/dts/kirkwood-db-88f6281-spi.dts
|
||||
F: arch/arm/dts/kirkwood-db.dtsi
|
||||
F: board/Marvell/db-88f6281-bp/
|
||||
F: include/configs/db-88f6281-bp.h
|
||||
F: configs/db-88f6281-bp-nand_defconfig
|
||||
F: configs/db-88f6281-bp-spi_defconfig
|
||||
12
board/Marvell/db-88f6281-bp/Makefile
Normal file
12
board/Marvell/db-88f6281-bp/Makefile
Normal file
@@ -0,0 +1,12 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
obj-y := db-88f6281-bp.o
|
||||
extra-y := kwbimage.cfg
|
||||
|
||||
quiet_cmd_sed = SED $@
|
||||
cmd_sed = sed $(SEDFLAGS_$(@F)) $< >$(dir $<)$(@F)
|
||||
|
||||
SEDFLAGS_kwbimage.cfg = -e "s/^\#@BOOT_FROM.*/BOOT_FROM $(if $(CONFIG_CMD_NAND),nand,spi)/"
|
||||
$(src)/kwbimage.cfg: $(src)/kwbimage.cfg.in include/autoconf.mk \
|
||||
include/config/auto.conf
|
||||
$(call if_changed,sed)
|
||||
103
board/Marvell/db-88f6281-bp/db-88f6281-bp.c
Normal file
103
board/Marvell/db-88f6281-bp/db-88f6281-bp.c
Normal file
@@ -0,0 +1,103 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
#include <common.h>
|
||||
#include <linux/io.h>
|
||||
#include <miiphy.h>
|
||||
#include <netdev.h>
|
||||
#include <asm/arch/cpu.h>
|
||||
#include <asm/arch/soc.h>
|
||||
#include <asm/arch/mpp.h>
|
||||
#include <asm/arch/gpio.h>
|
||||
|
||||
#define DB_88F6281_OE_LOW ~(BIT(7))
|
||||
#define DB_88F6281_OE_HIGH ~(BIT(15) | BIT(14) | BIT(13) | BIT(4))
|
||||
#define DB_88F6281_OE_VAL_LOW BIT(7)
|
||||
#define DB_88F6281_OE_VAL_HIGH 0
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
mvebu_config_gpio(DB_88F6281_OE_VAL_LOW,
|
||||
DB_88F6281_OE_VAL_HIGH,
|
||||
DB_88F6281_OE_LOW, DB_88F6281_OE_HIGH);
|
||||
|
||||
/* Multi-Purpose Pins Functionality configuration */
|
||||
static const u32 kwmpp_config[] = {
|
||||
#ifdef CONFIG_CMD_NAND
|
||||
MPP0_NF_IO2,
|
||||
MPP1_NF_IO3,
|
||||
MPP2_NF_IO4,
|
||||
MPP3_NF_IO5,
|
||||
#else
|
||||
MPP0_SPI_SCn,
|
||||
MPP1_SPI_MOSI,
|
||||
MPP2_SPI_SCK,
|
||||
MPP3_SPI_MISO,
|
||||
#endif
|
||||
MPP4_NF_IO6,
|
||||
MPP5_NF_IO7,
|
||||
MPP6_SYSRST_OUTn,
|
||||
MPP7_GPO,
|
||||
MPP8_TW_SDA,
|
||||
MPP9_TW_SCK,
|
||||
MPP10_UART0_TXD,
|
||||
MPP11_UART0_RXD,
|
||||
MPP12_SD_CLK,
|
||||
MPP13_SD_CMD,
|
||||
MPP14_SD_D0,
|
||||
MPP15_SD_D1,
|
||||
MPP16_SD_D2,
|
||||
MPP17_SD_D3,
|
||||
MPP18_NF_IO0,
|
||||
MPP19_NF_IO1,
|
||||
MPP20_SATA1_ACTn,
|
||||
MPP21_SATA0_ACTn,
|
||||
MPP22_GPIO,
|
||||
MPP23_GPIO,
|
||||
MPP24_GPIO,
|
||||
MPP25_GPIO,
|
||||
MPP26_GPIO,
|
||||
MPP27_GPIO,
|
||||
MPP28_GPIO,
|
||||
MPP29_GPIO,
|
||||
MPP30_GPIO,
|
||||
MPP31_GPIO,
|
||||
MPP32_GPIO,
|
||||
MPP33_GPIO,
|
||||
MPP34_GPIO,
|
||||
MPP35_GPIO,
|
||||
MPP36_GPIO,
|
||||
MPP37_GPIO,
|
||||
MPP38_GPIO,
|
||||
MPP39_GPIO,
|
||||
MPP40_GPIO,
|
||||
MPP41_GPIO,
|
||||
MPP42_GPIO,
|
||||
MPP43_GPIO,
|
||||
MPP44_GPIO,
|
||||
MPP45_GPIO,
|
||||
MPP46_GPIO,
|
||||
MPP47_GPIO,
|
||||
MPP48_GPIO,
|
||||
MPP49_GPIO,
|
||||
0
|
||||
};
|
||||
kirkwood_mpp_conf(kwmpp_config, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
gd->bd->bi_boot_params = mvebu_sdram_bar(0) + 0x100;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_RESET_PHY_R
|
||||
/* automatically defined by kirkwood config.h */
|
||||
void reset_phy(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
36
board/Marvell/db-88f6281-bp/kwbimage.cfg.in
Normal file
36
board/Marvell/db-88f6281-bp/kwbimage.cfg.in
Normal file
@@ -0,0 +1,36 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
# Boot Media configurations
|
||||
#@BOOT_FROM
|
||||
|
||||
DATA 0xd00100e0 0x1b1b1b9b
|
||||
DATA 0xd0020134 0xbbbbbbbb
|
||||
DATA 0xd0020138 0x00bbbbbb
|
||||
DATA 0xd0020154 0x00000200
|
||||
DATA 0xd002014c 0x00001c00
|
||||
DATA 0xd0020148 0x00000001
|
||||
|
||||
DATA 0xd0001400 0x43000c30
|
||||
DATA 0xd0001404 0x39543000
|
||||
DATA 0xd0001408 0x22125451
|
||||
DATA 0xd000140c 0x00000833
|
||||
DATA 0xd0001410 0x000000cc
|
||||
DATA 0xd0001414 0x00000000
|
||||
DATA 0xd0001418 0x00000000
|
||||
DATA 0xd000141c 0x00000c52
|
||||
DATA 0xd0001420 0x00000044
|
||||
DATA 0xd0001424 0x0000f1ff
|
||||
DATA 0xd0001428 0x00085520
|
||||
DATA 0xd000147c 0x00008552
|
||||
DATA 0xd0001504 0x0ffffff1
|
||||
DATA 0xd0001508 0x10000000
|
||||
DATA 0xd000150c 0x0ffffff5
|
||||
DATA 0xd0001514 0x00000000
|
||||
DATA 0xd000151c 0x00000000
|
||||
DATA 0xd0001494 0x84210000
|
||||
DATA 0xd0001498 0x00000000
|
||||
DATA 0xd000149c 0x0000f40f
|
||||
DATA 0xd0001480 0x00000001
|
||||
|
||||
# End of Header extension
|
||||
DATA 0x0 0x0
|
||||
@@ -1,6 +1,6 @@
|
||||
OPENRD / OPENRD_CLIENT BOARD
|
||||
#M: Albert ARIBAUD <albert-u-boot@aribaud.net>
|
||||
S: Orphaned (Since 2018-09)
|
||||
M: Stefan Roese <sr@denx.de>
|
||||
S: Maintained
|
||||
F: board/Marvell/openrd/
|
||||
F: include/configs/openrd.h
|
||||
F: configs/openrd_base_defconfig
|
||||
|
||||
@@ -25,10 +25,6 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||
#define CONFIG_NVS_LOCATION 0xf4800000
|
||||
#define CONFIG_NVS_SIZE (512 << 10)
|
||||
|
||||
#ifdef CONFIG_WATCHDOG
|
||||
static struct udevice *watchdog_dev;
|
||||
#endif
|
||||
|
||||
static struct serdes_map board_serdes_map[] = {
|
||||
{PEX0, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X1, 0, 0},
|
||||
{DEFAULT_SERDES, SERDES_SPEED_5_GBPS, SERDES_DEFAULT_MODE, 0, 0},
|
||||
@@ -80,10 +76,6 @@ struct mv_ddr_topology_map *mv_ddr_topology_map_get(void)
|
||||
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
#ifdef CONFIG_WATCHDOG
|
||||
watchdog_dev = NULL;
|
||||
#endif
|
||||
|
||||
/* Configure MPP */
|
||||
writel(0x00001111, MVEBU_MPP_BASE + 0x00);
|
||||
writel(0x00000000, MVEBU_MPP_BASE + 0x04);
|
||||
@@ -99,13 +91,6 @@ int board_early_init_f(void)
|
||||
|
||||
void spl_board_init(void)
|
||||
{
|
||||
#ifdef CONFIG_WATCHDOG
|
||||
int ret;
|
||||
|
||||
ret = uclass_get_device(UCLASS_WDT, 0, &watchdog_dev);
|
||||
if (!ret)
|
||||
wdt_start(watchdog_dev, 120000, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
int board_init(void)
|
||||
@@ -128,29 +113,10 @@ int board_init(void)
|
||||
void arch_preboot_os(void)
|
||||
{
|
||||
#ifdef CONFIG_WATCHDOG
|
||||
wdt_stop(watchdog_dev);
|
||||
wdt_stop(gd->watchdog_dev);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef CONFIG_WATCHDOG
|
||||
void watchdog_reset(void)
|
||||
{
|
||||
static ulong next_reset = 0;
|
||||
ulong now;
|
||||
|
||||
if (!watchdog_dev)
|
||||
return;
|
||||
|
||||
now = timer_get_us();
|
||||
|
||||
/* Do not reset the watchdog too often */
|
||||
if (now > next_reset) {
|
||||
wdt_reset(watchdog_dev);
|
||||
next_reset = now + 1000;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static int led_7seg_init(unsigned int segments)
|
||||
{
|
||||
int node;
|
||||
|
||||
@@ -8,6 +8,16 @@ the LS-XHL PCB has two SDRAM chips. Both have a Kirkwood CPU (Marvell
|
||||
bootloader and its environment. The linux kernel and the initial ramdisk
|
||||
are loaded from the hard disk.
|
||||
|
||||
Important! Changes since v2019.07
|
||||
---------------------------------
|
||||
In u-boot v2019.07 the driver for the SATA port was changed to a new
|
||||
one. This means that the old "ide" command and block interface is not
|
||||
supported anymore. More important, the boot commands have changed. You have
|
||||
to overwrite the boot commands in your envionment with the new ones:
|
||||
|
||||
env default -f bootcmd_legacy
|
||||
env default -f bootcmd_hdd
|
||||
saveenv
|
||||
|
||||
Rescue Mode
|
||||
-----------
|
||||
|
||||
@@ -24,10 +24,6 @@
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_WDT)
|
||||
static struct udevice *watchdog_dev __attribute__((section(".data"))) = NULL;
|
||||
#endif /* !CONFIG_SPL_BUILD && CONFIG_WDT */
|
||||
|
||||
ulong ram_base;
|
||||
|
||||
int dram_init_banksize(void)
|
||||
@@ -43,44 +39,8 @@ int dram_init(void)
|
||||
return 0;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_WDT
|
||||
/* Called by macro WATCHDOG_RESET */
|
||||
void watchdog_reset(void)
|
||||
{
|
||||
#if !defined(CONFIG_SPL_BUILD)
|
||||
ulong now;
|
||||
static ulong next_reset;
|
||||
|
||||
if (!watchdog_dev)
|
||||
return;
|
||||
|
||||
now = timer_get_us();
|
||||
|
||||
/* Do not reset the watchdog too often */
|
||||
if (now > next_reset) {
|
||||
wdt_reset(watchdog_dev);
|
||||
next_reset = now + 1000;
|
||||
}
|
||||
#endif /* !CONFIG_SPL_BUILD */
|
||||
}
|
||||
#endif /* CONFIG_WDT */
|
||||
|
||||
int board_late_init(void)
|
||||
{
|
||||
#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_WDT)
|
||||
watchdog_dev = NULL;
|
||||
|
||||
if (uclass_get_device_by_seq(UCLASS_WDT, 0, &watchdog_dev)) {
|
||||
debug("Watchdog: Not found by seq!\n");
|
||||
if (uclass_get_device(UCLASS_WDT, 0, &watchdog_dev)) {
|
||||
puts("Watchdog: Not found!\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
wdt_start(watchdog_dev, 0, 0);
|
||||
puts("Watchdog: Started\n");
|
||||
#endif /* !CONFIG_SPL_BUILD && CONFIG_WDT */
|
||||
#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_SYSRESET_MICROBLAZE)
|
||||
int ret;
|
||||
|
||||
|
||||
@@ -18,10 +18,6 @@
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_WDT)
|
||||
static struct udevice *watchdog_dev __attribute__((section(".data"))) = NULL;
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_BOARD_EARLY_INIT_F)
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
@@ -31,19 +27,6 @@ int board_early_init_f(void)
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_WDT)
|
||||
if (uclass_get_device_by_seq(UCLASS_WDT, 0, &watchdog_dev)) {
|
||||
debug("Watchdog: Not found by seq!\n");
|
||||
if (uclass_get_device(UCLASS_WDT, 0, &watchdog_dev)) {
|
||||
puts("Watchdog: Not found!\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
wdt_start(watchdog_dev, 0, 0);
|
||||
puts("Watchdog: Started\n");
|
||||
# endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -127,25 +110,3 @@ int dram_init(void)
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_WATCHDOG)
|
||||
/* Called by macro WATCHDOG_RESET */
|
||||
void watchdog_reset(void)
|
||||
{
|
||||
# if !defined(CONFIG_SPL_BUILD)
|
||||
static ulong next_reset;
|
||||
ulong now;
|
||||
|
||||
if (!watchdog_dev)
|
||||
return;
|
||||
|
||||
now = timer_get_us();
|
||||
|
||||
/* Do not reset the watchdog too often */
|
||||
if (now > next_reset) {
|
||||
wdt_reset(watchdog_dev);
|
||||
next_reset = now + 1000;
|
||||
}
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -24,10 +24,6 @@
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_WDT)
|
||||
static struct udevice *watchdog_dev __attribute__((section(".data"))) = NULL;
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_FPGA) && defined(CONFIG_FPGA_ZYNQMPPL) && \
|
||||
!defined(CONFIG_SPL_BUILD)
|
||||
static xilinx_desc zynqmppl = XILINX_ZYNQMP_DESC;
|
||||
@@ -344,44 +340,9 @@ int board_init(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_WDT)
|
||||
if (uclass_get_device_by_seq(UCLASS_WDT, 0, &watchdog_dev)) {
|
||||
debug("Watchdog: Not found by seq!\n");
|
||||
if (uclass_get_device(UCLASS_WDT, 0, &watchdog_dev)) {
|
||||
puts("Watchdog: Not found!\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
wdt_start(watchdog_dev, 0, 0);
|
||||
puts("Watchdog: Started\n");
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_WATCHDOG
|
||||
/* Called by macro WATCHDOG_RESET */
|
||||
void watchdog_reset(void)
|
||||
{
|
||||
# if !defined(CONFIG_SPL_BUILD)
|
||||
static ulong next_reset;
|
||||
ulong now;
|
||||
|
||||
if (!watchdog_dev)
|
||||
return;
|
||||
|
||||
now = timer_get_us();
|
||||
|
||||
/* Do not reset the watchdog too often */
|
||||
if (now > next_reset) {
|
||||
wdt_reset(watchdog_dev);
|
||||
next_reset = now + 1000;
|
||||
}
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
|
||||
int board_early_init_r(void)
|
||||
{
|
||||
u32 val;
|
||||
|
||||
Reference in New Issue
Block a user