]> rtime.felk.cvut.cz Git - arc.git/commitdiff
Removed WdgM from PPC drivers.
authorjoek <devnull@localhost>
Mon, 28 Feb 2011 16:23:14 +0000 (17:23 +0100)
committerjoek <devnull@localhost>
Mon, 28 Feb 2011 16:23:14 +0000 (17:23 +0100)
arch/ppc/mpc55xx/drivers/WdgM.c [deleted file]
arch/ppc/mpc55xx/drivers/WdgM.h [deleted file]
arch/ppc/mpc55xx/drivers/WdgM_cfg.h [deleted file]

diff --git a/arch/ppc/mpc55xx/drivers/WdgM.c b/arch/ppc/mpc55xx/drivers/WdgM.c
deleted file mode 100644 (file)
index 8e2f654..0000000
+++ /dev/null
@@ -1,191 +0,0 @@
-/* -------------------------------- Arctic Core ------------------------------\r
- * Arctic Core - the open source AUTOSAR platform http://arccore.com\r
- *\r
- * Copyright (C) 2009  ArcCore AB <contact@arccore.com>\r
- *\r
- * This source code is free software; you can redistribute it and/or modify it\r
- * under the terms of the GNU General Public License version 2 as published by the\r
- * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.\r
- *\r
- * This program is distributed in the hope that it will be useful, but\r
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\r
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License\r
- * for more details.\r
- * -------------------------------- Arctic Core ------------------------------*/\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-#include "WdgM.h"\r
-#include "Mcu.h"\r
-\r
-const WdgM_ConfigType *wdgMConfigPtr;\r
-static WdgM_SupervisedStatusType WdgM_GlobalSupervisionStatus = WDBG_ALIVE_OK;\r
-\r
-Std_ReturnType WdgM_UpdateAliveCounter (WdgM_SupervisedEntityIdType SEid)\r
-{\r
-  Wdgm_SupervisionType *supervisionPtr = &(wdgMConfigPtr->Wdgm_SupervisionPtr)[SEid];\r
-\r
-  if (supervisionPtr->ActivationStatus == WDBG_SUPERVISION_ENABLED)\r
-  {\r
-    supervisionPtr->AliveCounter++;\r
-  }\r
-  return (E_OK);\r
-}\r
-\r
-Std_ReturnType WdgM_ActivateAliveSupervision (WdgM_SupervisedEntityIdType SEid)\r
-{\r
-  Wdgm_SupervisionType *supervisionPtr = &(wdgMConfigPtr->Wdgm_SupervisionPtr)[SEid];\r
-\r
-  supervisionPtr->ActivationStatus = WDBG_SUPERVISION_ENABLED;\r
-\r
-  return (E_OK);\r
-}\r
-\r
-Std_ReturnType WdgM_DeactivateAliveSupervision (WdgM_SupervisedEntityIdType SEid)\r
-{\r
-  Wdgm_SupervisionType *supervisionPtr = &(wdgMConfigPtr->Wdgm_SupervisionPtr)[SEid];\r
-\r
-  supervisionPtr->ActivationStatus = WDBG_SUPERVISION_DISABLED;\r
-  return (E_OK);\r
-}\r
-\r
-void WdgM_Init(const WdgM_ConfigType *ConfigPtr)\r
-{\r
-  WdgM_SupervisedEntityIdType SEid;\r
-  Wdgm_SupervisionType *supervisionPtr;\r
-  WdgM_SupervisedEntityType* supervisedEntityPtr;\r
-\r
-  for (SEid = 0; SEid < WDBG_NBR_OF_ALIVE_SIGNALS; SEid++)\r
-  {\r
-    supervisionPtr = &(ConfigPtr->Wdgm_SupervisionPtr)[SEid];\r
-    supervisedEntityPtr = (WdgM_SupervisedEntityType*)&(ConfigPtr->WdgM_SupervisedEntityPtr)[SEid];\r
-    supervisionPtr->ActivationStatus = supervisedEntityPtr->WdgM_ActivationStatus;\r
-  }\r
-  wdgMConfigPtr = ConfigPtr;\r
-\r
-}\r
-\r
-void WdgM_MainFunction_AliveSupervision (void)\r
-{\r
-  WdgM_SupervisedEntityIdType SEid;\r
-  Wdgm_SupervisionType *supervisionPtr;\r
-  const WdgM_SupervisedEntityType *entityPtr;\r
-  WdgM_SupervisionCounterType aliveCalc, nSC, nAl, eai;\r
-  WdgM_SupervisedStatusType maxLocal = WDBG_ALIVE_OK;\r
-  static WdgM_SupervisionCounterType expiredSupervisionCycles = 0;\r
-\r
-  for (SEid = 0; SEid < WDBG_NBR_OF_ALIVE_SIGNALS; SEid++)\r
-  {\r
-    supervisionPtr = &(wdgMConfigPtr->Wdgm_SupervisionPtr)[SEid];\r
-    entityPtr      = &(wdgMConfigPtr->WdgM_SupervisedEntityPtr)[SEid];\r
-\r
-    if (WDBG_SUPERVISION_ENABLED == supervisionPtr->ActivationStatus)\r
-    {\r
-      supervisionPtr->SupervisionCycle++;\r
-      /* Only perform supervision on the reference cycle. */\r
-      if (supervisionPtr->SupervisionCycle == entityPtr->WdgM_SupervisionReferenceCycle)\r
-      {\r
-        /* Alive algorithm. *\r
-         * n (Al) - n(SC) + EAI == 0 */\r
-        if (entityPtr->WdgM_ExpectedAliveIndications > entityPtr->WdgM_SupervisionReferenceCycle)\r
-        {\r
-          /* Scenario A */\r
-          eai = -entityPtr->WdgM_ExpectedAliveIndications + 1;\r
-\r
-        }\r
-        else\r
-        {\r
-          /* Scenario B */\r
-          eai = entityPtr->WdgM_SupervisionReferenceCycle - 1;\r
-        }\r
-        nSC = supervisionPtr->SupervisionCycle;\r
-        nAl = supervisionPtr->AliveCounter;\r
-        aliveCalc = nAl - nSC + eai;\r
-\r
-        if ((aliveCalc <= entityPtr->WdgM_MaxMargin) &&\r
-            (aliveCalc >= -entityPtr->WdgM_MinMargin))\r
-        {\r
-          /* Entity alive OK. */\r
-          supervisionPtr->SupervisionStatus = WDBG_ALIVE_OK;\r
-        }\r
-        else\r
-        {\r
-          /* Entity alive NOK. */\r
-          supervisionPtr->SupervisionStatus = WDBG_ALIVE_FAILED;\r
-          if (WDBG_ALIVE_FAILED > maxLocal)\r
-          {\r
-            maxLocal = WDBG_ALIVE_FAILED;\r
-          }\r
-        }\r
-\r
-        if (WDBG_ALIVE_FAILED == supervisionPtr->SupervisionStatus)\r
-        {\r
-          if (supervisionPtr->NbrOfFailedRefCycles > entityPtr->WdgM_FailedSupervisionReferenceCycleTolerance)\r
-          {\r
-            supervisionPtr->SupervisionStatus = WDBG_ALIVE_EXPIRED;\r
-            if (WDBG_ALIVE_EXPIRED > maxLocal)\r
-            {\r
-              maxLocal = WDBG_ALIVE_EXPIRED;\r
-            }\r
-          }\r
-          else\r
-          {\r
-            supervisionPtr->NbrOfFailedRefCycles++;\r
-          }\r
-        }\r
-\r
-        /* Reset counters. */\r
-        supervisionPtr->SupervisionCycle = 0;\r
-        supervisionPtr->AliveCounter = 0;\r
-      }\r
-    }\r
-  }\r
-\r
-  /* Try to heal global status. */\r
-  if (WDBG_ALIVE_EXPIRED != WdgM_GlobalSupervisionStatus)\r
-  {\r
-    WdgM_GlobalSupervisionStatus = maxLocal;\r
-  }\r
-  else\r
-  {\r
-    WdgM_GlobalSupervisionStatus = WDBG_ALIVE_EXPIRED;\r
-  }\r
-\r
-  if (WDBG_ALIVE_EXPIRED == WdgM_GlobalSupervisionStatus)\r
-  {\r
-    expiredSupervisionCycles++;\r
-  }\r
-\r
-  if (expiredSupervisionCycles >= wdgMConfigPtr->WdgM_ExpiredSupervisionCycleTolerance)\r
-  {\r
-    WdgM_GlobalSupervisionStatus = WDBG_ALIVE_STOPPED;\r
-  }\r
-}\r
-\r
-boolean WdgM_IsAlive(void)\r
-{\r
-\r
-  if ( WDBG_ALIVE_STOPPED > WdgM_GlobalSupervisionStatus )\r
-  {\r
-    return (TRUE);\r
-  }\r
-  else\r
-  {\r
-    return (FALSE);\r
-  }\r
-}\r
-\r
-void WdgM_MainFunction_Trigger (void)\r
-{\r
-  if ( WdgM_IsAlive() )\r
-  {\r
-    KickWatchdog();\r
-  }\r
-}\r
-\r
-\r
diff --git a/arch/ppc/mpc55xx/drivers/WdgM.h b/arch/ppc/mpc55xx/drivers/WdgM.h
deleted file mode 100644 (file)
index 9a0a63c..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/* -------------------------------- Arctic Core ------------------------------\r
- * Arctic Core - the open source AUTOSAR platform http://arccore.com\r
- *\r
- * Copyright (C) 2009  ArcCore AB <contact@arccore.com>\r
- *\r
- * This source code is free software; you can redistribute it and/or modify it\r
- * under the terms of the GNU General Public License version 2 as published by the\r
- * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.\r
- *\r
- * This program is distributed in the hope that it will be useful, but\r
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\r
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License\r
- * for more details.\r
- * -------------------------------- Arctic Core ------------------------------*/\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-#include "WdgM_Cfg.h"\r
-\r
-Std_ReturnType WdgM_UpdateAliveCounter (WdgM_SupervisedEntityIdType SEid);\r
-Std_ReturnType WdgM_ActivateAliveSupervision (WdgM_SupervisedEntityIdType SEid);\r
-Std_ReturnType WdgM_DeactivateAliveSupervision (WdgM_SupervisedEntityIdType SEid);\r
-void WdgM_Init(const WdgM_ConfigType* ConfigPtr);\r
-void WdgM_MainFunction_AliveSupervision (void);\r
-void WdgM_MainFunction_Trigger (void);\r
diff --git a/arch/ppc/mpc55xx/drivers/WdgM_cfg.h b/arch/ppc/mpc55xx/drivers/WdgM_cfg.h
deleted file mode 100644 (file)
index 32c9d6f..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -------------------------------- Arctic Core ------------------------------\r
- * Arctic Core - the open source AUTOSAR platform http://arccore.com\r
- *\r
- * Copyright (C) 2009  ArcCore AB <contact@arccore.com>\r
- *\r
- * This source code is free software; you can redistribute it and/or modify it\r
- * under the terms of the GNU General Public License version 2 as published by the\r
- * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.\r
- *\r
- * This program is distributed in the hope that it will be useful, but\r
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\r
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License\r
- * for more details.\r
- * -------------------------------- Arctic Core ------------------------------*/\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-#ifndef WDGM_CFG_H_\r
-#define WDGM_CFG_H_\r
-\r
-#include "Std_Types.h"\r
-#include "WdgM_Lcfg.h"\r
-\r
-\r
-typedef enum\r
-{\r
-  WDBG_ALIVE_OK,\r
-  WDBG_ALIVE_FAILED,\r
-  WDBG_ALIVE_EXPIRED,\r
-  WDBG_ALIVE_STOPPED,\r
-  WDBG_ALIVE_DEACTIVATED,\r
-}WdgM_AliveSupervisionStatusType;\r
-\r
-typedef enum\r
-{\r
-  WDBG_SUPERVISION_DISABLED,\r
-  WDBG_SUPERVISION_ENABLED\r
-}WdgM_ActivationStatusType;\r
-\r
-typedef int16_t WdgM_SupervisionCounterType ;\r
-\r
-typedef struct\r
-{\r
-  WdgM_SupervisionCounterType     AliveCounter;\r
-  WdgM_SupervisionCounterType     SupervisionCycle;\r
-  WdgM_AliveSupervisionStatusType SupervisionStatus;\r
-  WdgM_SupervisionCounterType     NbrOfFailedRefCycles;\r
-  WdgM_ActivationStatusType       ActivationStatus;\r
-}Wdgm_SupervisionType;\r
-\r
-typedef struct\r
-{\r
-  const WdgM_SupervisedEntityIdType WdgM_SupervisedEntityID;\r
-  const WdgM_ActivationStatusType WdgM_ActivationStatus;\r
-  const WdgM_SupervisionCounterType WdgM_ExpectedAliveIndications;\r
-  const WdgM_SupervisionCounterType WdgM_SupervisionReferenceCycle;\r
-  const WdgM_SupervisionCounterType WdgM_FailedSupervisionReferenceCycleTolerance;\r
-  const WdgM_SupervisionCounterType WdgM_MinMargin;\r
-  const WdgM_SupervisionCounterType WdgM_MaxMargin;\r
-}WdgM_SupervisedEntityType;\r
-\r
-typedef struct\r
-{\r
-  uint16 WdgM_SupervisionCycle;\r
-  uint16 WdgM_NumberOfSupervisedEntities;\r
-  uint16 WdgM_ExpiredSupervisionCycleTolerance;\r
-  const WdgM_SupervisedEntityType *WdgM_SupervisedEntityPtr;\r
-  Wdgm_SupervisionType *Wdgm_SupervisionPtr;\r
-}WdgM_ConfigType;\r
-\r
-extern const WdgM_ConfigType WdgMAliveSupervision;\r
-\r
-#endif /* WDGM_CFG_H_ */\r