]> git.sur5r.net Git - u-boot/blobdiff - drivers/watchdog/ftwdt010_wdt.c
x86: fsp: Call fsp_init_phase_pci() in pci_uclass_post_probe()
[u-boot] / drivers / watchdog / ftwdt010_wdt.c
index 6e0617b6a29ff7d00e21f3f843250fedbab45b69..11f58f529d0a7a26f165de4597152266d86e92de 100644 (file)
@@ -8,19 +8,7 @@
  * Copyright (C) 2011 Andes Technology Corporation
  * Macpaul Lin, Andes Technology Corporation <macpaul@andestech.com>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * SPDX-License-Identifier:    GPL-2.0+
  *
  * 27/11/2004 Initial release, Faraday.
  * 12/01/2011 Port to u-boot, Macpaul Lin.
 #include <common.h>
 #include <watchdog.h>
 #include <asm/io.h>
-#include "ftwdt010_wdt.h"
+#include <faraday/ftwdt010_wdt.h>
 
 /*
  * Set the watchdog time interval.
  * Counter is 32 bit.
  */
-static int ftwdt010_wdt_settimeout(unsigned int timeout)
+int ftwdt010_wdt_settimeout(unsigned int timeout)
 {
        unsigned int reg;
 
@@ -61,7 +49,7 @@ static int ftwdt010_wdt_settimeout(unsigned int timeout)
        return 0;
 }
 
-void ftwdt010_wdt_reset()
+void ftwdt010_wdt_reset(void)
 {
        struct ftwdt010_wdt *wd = (struct ftwdt010_wdt *)CONFIG_FTWDT010_BASE;
 
@@ -75,7 +63,7 @@ void ftwdt010_wdt_reset()
        writel((FTWDT010_WDCR_RST | FTWDT010_WDCR_ENABLE), &wd->wdcr);
 }
 
-void ftwdt010_wdt_disable()
+void ftwdt010_wdt_disable(void)
 {
        struct ftwdt010_wdt *wd = (struct ftwdt010_wdt *)CONFIG_FTWDT010_BASE;
 
@@ -90,7 +78,8 @@ void ftwdt010_wdt_disable()
        writel(0, &wd->wdcr);
 }
 
-void hw_watchdog_reset()
+#if defined(CONFIG_HW_WATCHDOG)
+void hw_watchdog_reset(void)
 {
        ftwdt010_wdt_reset();
 }
@@ -100,3 +89,4 @@ void hw_watchdog_init(void)
        /* set timer in ms */
        ftwdt010_wdt_settimeout(CONFIG_FTWDT010_HW_TIMEOUT * 1000);
 }
+#endif