summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/powerpc/mpc55xx/include/watchdog.h
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libcpu/powerpc/mpc55xx/include/watchdog.h')
-rw-r--r--c/src/lib/libcpu/powerpc/mpc55xx/include/watchdog.h68
1 files changed, 0 insertions, 68 deletions
diff --git a/c/src/lib/libcpu/powerpc/mpc55xx/include/watchdog.h b/c/src/lib/libcpu/powerpc/mpc55xx/include/watchdog.h
deleted file mode 100644
index d5a8af794e..0000000000
--- a/c/src/lib/libcpu/powerpc/mpc55xx/include/watchdog.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * @file
- *
- * @ingroup mpc55xx
- *
- * @brief Header file for the watchdog timer.
- */
-
-/*
- * Copyright (c) 2008
- * Embedded Brains GmbH
- * Obere Lagerstr. 30
- * D-82178 Puchheim
- * Germany
- * rtems@embedded-brains.de
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#ifndef LIBCPU_POWERPC_MPC55XX_WATCHDOG_H
-#define LIBCPU_POWERPC_MPC55XX_WATCHDOG_H
-
-#include <stdbool.h>
-
-#include <rtems.h>
-
-#include <libcpu/powerpc-utility.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-static inline void mpc55xx_watchdog_clear()
-{
- PPC_SET_SPECIAL_PURPOSE_REGISTER( BOOKE_TSR, BOOKE_TSR_WIS);
-}
-
-static inline void mpc55xx_watchdog_enable_interrupt( bool enable)
-{
- if (enable) {
- PPC_SET_SPECIAL_PURPOSE_REGISTER_BITS( BOOKE_TCR, BOOKE_TCR_WIE);
- } else {
- PPC_CLEAR_SPECIAL_PURPOSE_REGISTER_BITS( BOOKE_TCR, BOOKE_TCR_WIE);
- }
-}
-
-static inline rtems_status_code mpc55xx_watchdog_set_time_base_bit( uint32_t bit)
-{
- if (bit > 63) {
- return RTEMS_INVALID_NUMBER;
- }
-
- PPC_SET_SPECIAL_PURPOSE_REGISTER_BITS_MASKED(
- BOOKE_TCR,
- BOOKE_TCR_WP( bit) | BOOKE_TCR_WPEXT( bit >> 2),
- BOOKE_TCR_WP_MASK | BOOKE_TCR_WPEXT_MASK
- );
-
- return RTEMS_SUCCESSFUL;
-}
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* LIBCPU_POWERPC_MPC55XX_WATCHDOG_H */