summaryrefslogtreecommitdiff
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-04-06 16:21:25 +0300
committerTom Rini <trini@konsulko.com>2022-04-25 23:04:05 +0300
commit11232139e399e70641410356ae6b278113d90f16 (patch)
tree9c3dd5ad6eec3fc3af2f9ac6c0e14f99122c4394 /drivers/watchdog
parent8cfac237b9814d52c843e939a05fc211ba3906de (diff)
downloadu-boot-11232139e399e70641410356ae6b278113d90f16.tar.xz
nds32: Remove the architecture
As removal of nds32 has been ack'd for the Linux kernel, remove support here as well. Cc: Rick Chen <rick@andestech.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Rick Chen <rick@andestech.com>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/Makefile1
-rw-r--r--drivers/watchdog/ftwdt010_wdt.c92
2 files changed, 0 insertions, 93 deletions
diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile
index 1089cd21f5..c0b4c9fa43 100644
--- a/drivers/watchdog/Makefile
+++ b/drivers/watchdog/Makefile
@@ -4,7 +4,6 @@
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
obj-$(CONFIG_WDT_AT91) += at91sam9_wdt.o
-obj-$(CONFIG_FTWDT010_WATCHDOG) += ftwdt010_wdt.o
ifneq (,$(filter $(SOC), mx25 mx31 mx35 mx5 mx6 mx7 vf610))
obj-y += imx_watchdog.o
else
diff --git a/drivers/watchdog/ftwdt010_wdt.c b/drivers/watchdog/ftwdt010_wdt.c
deleted file mode 100644
index 6aed41642d..0000000000
--- a/drivers/watchdog/ftwdt010_wdt.c
+++ /dev/null
@@ -1,92 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Watchdog driver for the FTWDT010 Watch Dog Driver
- *
- * (c) Copyright 2004 Faraday Technology Corp. (www.faraday-tech.com)
- * Based on sa1100_wdt.c by Oleg Drokin <green@crimea.edu>
- * Based on SoftDog driver by Alan Cox <alan@redhat.com>
- *
- * Copyright (C) 2011 Andes Technology Corporation
- * Macpaul Lin, Andes Technology Corporation <macpaul@andestech.com>
- *
- * 27/11/2004 Initial release, Faraday.
- * 12/01/2011 Port to u-boot, Macpaul Lin.
- */
-
-#include <common.h>
-#include <log.h>
-#include <watchdog.h>
-#include <asm/io.h>
-#include <faraday/ftwdt010_wdt.h>
-
-/*
- * Set the watchdog time interval.
- * Counter is 32 bit.
- */
-int ftwdt010_wdt_settimeout(unsigned int timeout)
-{
- unsigned int reg;
-
- struct ftwdt010_wdt *wd = (struct ftwdt010_wdt *)CONFIG_FTWDT010_BASE;
-
- debug("Activating WDT..\n");
-
- /* Check if disabled */
- if (readl(&wd->wdcr) & ~FTWDT010_WDCR_ENABLE) {
- printf("sorry, watchdog is disabled\n");
- return -1;
- }
-
- /*
- * In a 66MHz system,
- * if you set WDLOAD as 0x03EF1480 (66000000)
- * the reset timer is 1 second.
- */
- reg = FTWDT010_WDLOAD(timeout * FTWDT010_TIMEOUT_FACTOR);
-
- writel(reg, &wd->wdload);
-
- return 0;
-}
-
-void ftwdt010_wdt_reset(void)
-{
- struct ftwdt010_wdt *wd = (struct ftwdt010_wdt *)CONFIG_FTWDT010_BASE;
-
- /* clear control register */
- writel(0, &wd->wdcr);
-
- /* Write Magic number */
- writel(FTWDT010_WDRESTART_MAGIC, &wd->wdrestart);
-
- /* Enable WDT */
- writel((FTWDT010_WDCR_RST | FTWDT010_WDCR_ENABLE), &wd->wdcr);
-}
-
-void ftwdt010_wdt_disable(void)
-{
- struct ftwdt010_wdt *wd = (struct ftwdt010_wdt *)CONFIG_FTWDT010_BASE;
-
- debug("Deactivating WDT..\n");
-
- /*
- * It was defined with CONFIG_WATCHDOG_NOWAYOUT in Linux
- *
- * Shut off the timer.
- * Lock it in if it's a module and we defined ...NOWAYOUT
- */
- writel(0, &wd->wdcr);
-}
-
-#if defined(CONFIG_HW_WATCHDOG)
-void hw_watchdog_reset(void)
-{
- ftwdt010_wdt_reset();
-}
-
-void hw_watchdog_init(void)
-{
- /* set timer in ms */
- ftwdt010_wdt_settimeout(CONFIG_FTWDT010_HW_TIMEOUT * 1000);
-}
-#endif