changeset 308:3c5a17928fda

DAR: starting to clean and compile .c files
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 16 Mar 2014 20:46:10 +0000
parents 749ca89741fa
children a7087f91c752
files gsm-fw/services/dar/Makefile gsm-fw/services/dar/dar_api.c gsm-fw/services/dar/dar_diagnose.c gsm-fw/services/dar/dar_emergency.c
diffstat 4 files changed, 345 insertions(+), 318 deletions(-) [+]
line wrap: on
line diff
--- a/gsm-fw/services/dar/Makefile	Sun Mar 16 07:39:29 2014 +0000
+++ b/gsm-fw/services/dar/Makefile	Sun Mar 16 20:46:10 2014 +0000
@@ -2,7 +2,7 @@
 CFLAGS=	-O2 -fno-builtin -mthumb-interwork -mthumb
 LD=	arm-elf-ld
 
-OBJS=	dar_api.o
+OBJS=	dar_api.o dar_diagnose.o dar_emergency.o
 
 HDRS=	dar_api.h dar_const_i.h dar_diagnose_i.h dar_emergency.h dar_env.h \
 	dar_error_hdlr_i.h dar_gen.h dar_handle_message.h dar_macro_i.h \
--- a/gsm-fw/services/dar/dar_api.c	Sun Mar 16 07:39:29 2014 +0000
+++ b/gsm-fw/services/dar/dar_api.c	Sun Mar 16 20:46:10 2014 +0000
@@ -1,5 +1,5 @@
 /****************************************************************************/
-/*                                                                           */
+/*                                                                          */
 /*  File Name:  dar_api.c                                                   */
 /*                                                                          */
 /*  Purpose:  This file contains all the functions used to service          */
@@ -7,7 +7,7 @@
 /*                                                                          */
 /*  Version   0.1                                                           */
 /*                                                                          */
-/*  Date               Modification                                         */
+/*  Date            Modification                                            */
 /*  ----------------------------------------------------------------------  */
 /*  2 October 2001  Create                                                  */
 /*                                                                          */
--- a/gsm-fw/services/dar/dar_diagnose.c	Sun Mar 16 07:39:29 2014 +0000
+++ b/gsm-fw/services/dar/dar_diagnose.c	Sun Mar 16 20:46:10 2014 +0000
@@ -7,7 +7,7 @@
 /*                                                                          */
 /*  Version   0.1                                                           */
 /*                                                                          */
-/*  Date                 Modification                                       */
+/*  Date               Modification                                         */
 /*  ------------------------------------                                    */
 /*  18 October 2001    Create                                               */
 /*                                                                          */
@@ -16,23 +16,23 @@
 /* (C) Copyright 2001 by Texas Instruments Incorporated, All Rights Reserved*/
 /****************************************************************************/
 
-#include "rv/rv_defined_swe.h"
+#include "../../riviera/rv/rv_defined_swe.h"
 #ifdef RVM_DAR_SWE
    #ifndef _WINDOWS
-     #include "timer/timer.h"
+     #include "../../bsp/timer.h"
    #endif
 
-   #include "rv/rv_general.h"
-   #include "rvm/rvm_gen.h"
-   #include "rvm/rvm_priorities.h"
-   #include "dar/dar_api.h"
-   #include "dar/dar_structs_i.h"
-   #include "dar/dar_env.h"
-   #include "rvf/rvf_target.h"
-   #include "dar/dar_const_i.h"
-   #include "dar/dar_macro_i.h"
-   #include "dar/dar_messages_i.h"
-   #include "dar/dar_error_hdlr_i.h"
+   #include "../../riviera/rv/rv_general.h"
+   #include "../../riviera/rvm/rvm_gen.h"
+   #include "../../riviera/rvm/rvm_priorities.h"
+   #include "dar_api.h"
+   #include "dar_structs_i.h"
+   #include "dar_env.h"
+   #include "../../riviera/rvf/rvf_target.h"
+   #include "dar_const_i.h"
+   #include "dar_macro_i.h"
+   #include "dar_messages_i.h"
+   #include "dar_error_hdlr_i.h"
    //#include "rvf/rvf_i.h"
 
    /**** Global variables ****/
@@ -42,12 +42,12 @@
 
 
 
-   /********************************************************************************/
-   /* Function         dar_search_group                                            */
-   /*                                                                              */
-   /* Description      This function checks if the use_id group_nb exists:         */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /* Function         dar_search_group                                       */
+   /*                                                                         */
+   /* Description      This function checks if the use_id group_nb exists:    */
+   /*                                                                         */
+   /***************************************************************************/
    T_RV_RET dar_search_group(UINT16 group, UINT8 *index_p)
    {
       /* Declare local variables */   
@@ -74,12 +74,12 @@
       }
    }
 
-   /********************************************************************************/
-   /* Function         dar_add_group                                               */
-   /*                                                                              */
-   /* Description      This function research the index of the first free group    */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /* Function         dar_add_group                                          */
+   /*                                                                         */
+   /* Description      This function research the index of the first free     */
+   /*                  group                                                  */
+   /***************************************************************************/
    T_RV_RET dar_add_group(UINT8 *index_p)
    {
       /* Declare local variables */
@@ -105,25 +105,25 @@
    }
 
 
-   /********************************************************************************/
-   /*                                                                              */
-   /*    Function Name:   dar_send_write_data  								                     */
-   /*                                                                              */
-   /*    Purpose: This function is called to send write data in the DAR mailbox    */
-   /*                                                                              */
-   /*    Input Parameters:                                                         */
-   /*        Pointer to the message to store                                       */
-   /*        Data Format,                                                          */
-   /*        Data level,                                                           */
-   /*        Data Use Id,                                                          */  
-   /*                                                       											 */                                                      
-   /*    Output Parameters:                                                        */
-   /*        Validation of the function execution.								                 */
-   /*                                                                              */
-   /*    Note:                                                                     */
-   /*        None                                                                  */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /*                                                                         */
+   /*    Function Name:   dar_send_write_data				      */
+   /*                                                                         */
+   /*    Purpose: This function is called to send write data in the DAR       */
+   /*             mailbox.                                                    */
+   /*    Input Parameters:                                                    */
+   /*        Pointer to the message to store                                  */
+   /*        Data Format,                                                     */
+   /*        Data level,                                                      */
+   /*        Data Use Id,                                                     */
+   /*									      */
+   /*    Output Parameters:                                                   */
+   /*        Validation of the function execution.	                      */
+   /*                                                                         */
+   /*    Note:                                                                */
+   /*        None                                                             */
+   /*                                                                         */
+   /***************************************************************************/
 
    T_RV_RET dar_send_write_data (  T_DAR_INFO    *buffer_p,
                                    T_DAR_FORMAT  format,
@@ -165,11 +165,11 @@
          write_data_p->os_hdr.src_addr_id = dar_gbl_var_p->addrId;
 
          /* fill the message parameters */
-         write_data_p->data_write.char_p              = buffer_p ;
-         write_data_p->data_write.data_format         = format;
-         write_data_p->data_write.level               = diagnose_info_level;
-         write_data_p->data_write.use_id.group_nb     = (dar_use_id>>16)& 0x7FFF;
-         write_data_p->data_write.use_id.mask         = (dar_use_id)&0xFFFF;
+         write_data_p->data_write.char_p             = buffer_p ;
+         write_data_p->data_write.data_format        = format;
+         write_data_p->data_write.level              = diagnose_info_level;
+         write_data_p->data_write.use_id.group_nb    = (dar_use_id>>16)& 0x7FFF;
+         write_data_p->data_write.use_id.mask        = (dar_use_id)&0xFFFF;
 
          /* send the messsage to the DAR entity */
          rvf_send_msg (dar_gbl_var_p->addrId, 
@@ -182,24 +182,24 @@
           return(RV_NOT_READY);
       }
 
-	 
+
    } /* dar_send_write_data */
 
-   /********************************************************************************/
-   /* Function         dar_reset                                                   */
-   /*                                                                              */
-   /* Description      This function is used to reset the system                   */
-   /*                                                                              */
-   /*    Input Parameters:                                                         */
-   /*        None                                                                  */  
-   /*                                                       											 */                                                      
-   /*    Output Parameters:                                                        */
-   /*        Validation of the function execution.							                   */
-   /*                                                                              */
-   /*    Note:                                                                     */
-   /*        None                                                                  */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /* Function         dar_reset                                              */
+   /*                                                                         */
+   /* Description      This function is used to reset the system              */
+   /*                                                                         */
+   /*    Input Parameters:                                                    */
+   /*        None                                                             */
+   /*									      */
+   /*    Output Parameters:                                                   */
+   /*        Validation of the function execution.			      */
+   /*                                                                         */
+   /*    Note:                                                                */
+   /*        None                                                             */
+   /*                                                                         */
+   /***************************************************************************/
    T_RV_RET dar_reset(void)
    {
       #ifndef _WINDOWS
@@ -215,16 +215,22 @@
          /* initialize the adress of the watchdog timer pointer */
          register_p = (volatile UINT16 *)WATCHDOG_TIM_MODE;
 
-         /* Write the 0xF5 value to the Watchdog timer mode register to disable the Watchdog*/
+         /* Write the 0xF5 value to the Watchdog timer mode register to disable
+	    the Watchdog */
          /* Note the bit 15 must be unchanged ( bit 15 = 1 -> 0x8000)*/
          *register_p =0x80F5;
 
-         /* Wait a couple of time to be sure that this register has a new value */
+         /* Wait a couple of time to be sure that this register has a new
+	    value */
          for (i=0;i<100;i++);
 
-         /* After having received 0xF5 in the Watchdog timer mode register, if the */
-         /* second write access is differennt from 0xA0, ARM core is reset         */
-         /*   The ARM HW core is reset + branch to adress 0x0000 ( SW reset)       */
+	 /*
+          * After having received 0xF5 in the Watchdog timer mode register,
+	  * if the second write access is differennt from 0xA0, ARM core is
+	  * reset.
+	  *
+          * The ARM HW core is reset + branch to adress 0x0000 ( SW reset)
+          */
          *register_p=0x80F5;
 
          /* Wait until the ARM reset */
@@ -235,19 +241,19 @@
    } /* dar_reset */
 
 
-   /********************************************************************************/
-   /*                                                                              */     
-   /* Function         dar_read_mbox                                               */
-   /*                                                                              */
-   /* Description      Called by the dar to read a buffer from its mailboxes.      */
-   /*                  when the Operating System is out                            */
-   /* Input Parameters:                                                            */
-   /*        None                                                                  */  
-   /*                                                       							  */                                                      
-   /* Output Parameters:                                                           */
-   /*        NULL if the mailbox was empty, else the address of a buffer           */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /*                                                                         */
+   /* Function         dar_read_mbox                                          */
+   /*                                                                         */
+   /* Description      Called by the dar to read a buffer from its mailboxes. */
+   /*                  when the Operating System is out                       */
+   /* Input Parameters:                                                       */
+   /*        None                                                             */
+   /*									      */
+   /* Output Parameters:                                                      */
+   /*        NULL if the mailbox was empty, else the address of a buffer      */
+   /*                                                                         */
+   /***************************************************************************/
 
    void * dar_read_mbox (UINT8 mbox)
    {   
@@ -287,37 +293,34 @@
    /*            THE DAR ENTITY IS DISABLED                   */
    /* ******************************************************* */
    #ifndef _WINDOWS
-	   #include "config/swconfig.cfg"
-	   #include "config/sys.cfg"
-       #include "config/chipset.cfg"
-       #include "timer/timer.h"
+       #include "../../bsp/timer.h"
    #endif
 
-   #include "rv/rv_general.h"
-   #include "rvm/rvm_gen.h"
-   #include "rvm/rvm_priorities.h"
-   #include "rvf/rvf_target.h"
+   #include "../../riviera/rv/rv_general.h"
+   #include "../../riviera/rvm/rvm_gen.h"
+   #include "../../riviera/rvm/rvm_priorities.h"
+   #include "../../riviera/rvf/rvf_target.h"
    //#include "rvf/rvf_i.h"
 
    /* Define the Watchdog timer register mode */
    #define WATCHDOG_TIM_MODE                           (0xFFFFF804)
 
 
-   /********************************************************************************/
-   /* Function         dar_reset                                                   */
-   /*                                                                              */
-   /* Description      This function is used to reset the system                   */
-   /*                                                                              */
-   /*    Input Parameters:                                                         */
-   /*        None                                                                  */  
-   /*                                                       	 				   */                                                      
-   /*    Output Parameters:                                                        */
-   /*        Validation of the function execution.							       */
-   /*                                                                              */
-   /*    Note:                                                                     */
-   /*        None                                                                  */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /* Function         dar_reset                                              */
+   /*                                                                         */
+   /* Description      This function is used to reset the system              */
+   /*                                                                         */
+   /*    Input Parameters:                                                    */
+   /*        None                                                             */
+   /*									      */
+   /*    Output Parameters:                                                   */
+   /*        Validation of the function execution.			      */
+   /*                                                                         */
+   /*    Note:                                                                */
+   /*        None                                                             */
+   /*                                                                         */
+   /***************************************************************************/
    T_RV_RET dar_reset(void)
    {
       #ifndef _WINDOWS
@@ -333,16 +336,22 @@
          /* initialize the adress of the watchdog timer pointer */
          register_p = (volatile UINT16 *)WATCHDOG_TIM_MODE;
 
-         /* Write the 0xF5 value to the Watchdog timer mode register to disable the Watchdog*/
+         /* Write the 0xF5 value to the Watchdog timer mode register to disable
+	    the Watchdog */
          /* Note the bit 15 must be unchanged ( bit 15 = 1 -> 0x8000)*/
          *register_p =0x80F5;
 
-         /* Wait a couple of time to be sure that this register has a new value */
+         /* Wait a couple of time to be sure that this register has a new
+	    value */
          for (i=0;i<100;i++);
 
-         /* After having received 0xF5 in the Watchdog timer mode register, if the */
-         /* second write access is differennt from 0xA0, ARM core is reset         */
-         /*   The ARM HW core is reset + branch to adress 0x0000 ( SW reset)       */
+	 /*
+          * After having received 0xF5 in the Watchdog timer mode register,
+	  * if the second write access is differennt from 0xA0, ARM core is
+	  * reset.
+	  *
+          * The ARM HW core is reset + branch to adress 0x0000 ( SW reset)
+          */
          *register_p=0x80F5;
 
          /* Wait until the ARM reset */
--- a/gsm-fw/services/dar/dar_emergency.c	Sun Mar 16 07:39:29 2014 +0000
+++ b/gsm-fw/services/dar/dar_emergency.c	Sun Mar 16 20:46:10 2014 +0000
@@ -8,7 +8,7 @@
 /*                                                                          */
 /*  Version   0.1                                                           */
 /*                                                                          */
-/*  Date                 Modification                                       */
+/*  Date               Modification                                         */
 /*  ------------------------------------                                    */
 /*  17 October 2001    Create                                               */
 /*                                                                          */
@@ -17,23 +17,23 @@
 /* (C) Copyright 2001 by Texas Instruments Incorporated, All Rights Reserved*/
 /****************************************************************************/
 
-#include "rv/rv_defined_swe.h"
+#include "../../riviera/rv/rv_defined_swe.h"
 #ifdef RVM_DAR_SWE
    /* ************************************************ */
    /*            THE DAR ENTITY IS ENABLED             */
    /* ************************************************ */
 
    #include <string.h>
-   #include "rvm/rvm_gen.h"
-   #include "dar/dar_api.h"
-   #include "dar/dar_macro_i.h"
-   #include "dar/dar_messages_i.h"
-   #include "dar/dar_const_i.h"
-   #include "dar/dar_diagnose_i.h"
-   #include "dar/dar_msg_ft.h"
+   #include "../../riviera/rvm/rvm_gen.h"
+   #include "dar_api.h"
+   #include "dar_macro_i.h"
+   #include "dar_messages_i.h"
+   #include "dar_const_i.h"
+   #include "dar_diagnose_i.h"
+   #include "dar_msg_ft.h"
 
    #ifndef _WINDOWS
-      #include "timer/timer.h"
+      #include "../../bsp/timer.h"
    #endif
 
    /**** Global variable ****/
@@ -65,29 +65,29 @@
    extern void exception(void);
 
 
-   /********************************************************************************/
-   /*                                                                              */
-   /*    Function Name:   dar_process_emergency                                    */
-   /*                                                                              */
-   /*    Purpose:  This function is called to process emergency data and to store  */ 
-   /*              them in RAM buffer when an emergency has been detected          */
-   /*                                                                              */
-   /*                                                                              */
-   /*    Input Parameters:                                                         */
-   /*        Pointer to the message to store                                       */
-   /*        Data Format, ( the Binary format is not supported)                    */
-   /*        Data Use Id,                                                          */
-   /*        Flags                                                                 */
-   /*                                                                              */
-   /*    Output Parameters:                                                        */
-   /*         Validation of the diagnose execution.                                */
-   /*                                                                              */
-   /*                                                                              */
-   /*                                                                              */
-   /*    Revision History:                                                         */
-   /*        None.                                                                 */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /*                                                                         */
+   /*    Function Name:   dar_process_emergency                               */
+   /*                                                                         */
+   /*    Purpose:  This function is called to process emergency data and to   */
+   /*              store them in RAM buffer when an emergency has been        */
+   /*              detected.                                                  */
+   /*                                                                         */
+   /*    Input Parameters:                                                    */
+   /*        Pointer to the message to store                                  */
+   /*        Data Format, ( the Binary format is not supported)               */
+   /*        Data Use Id,                                                     */
+   /*        Flags                                                            */
+   /*                                                                         */
+   /*    Output Parameters:                                                   */
+   /*         Validation of the diagnose execution.                           */
+   /*                                                                         */
+   /*                                                                         */
+   /*                                                                         */
+   /*    Revision History:                                                    */
+   /*        None.                                                            */
+   /*                                                                         */
+   /***************************************************************************/
    T_RV_RET dar_process_emergency( T_DAR_INFO    *buffer_p,
                                    T_DAR_FORMAT  format,
                                    T_RVM_USE_ID  dar_use_id,
@@ -136,26 +136,26 @@
       /**   Circular buffer to store data **/
       /* Add 0xFF to separate 2 strings */
       dar_write_buffer[dar_current_index] = 0xF; 
-      DAR_PLUS_PLUS(dar_current_index); /* to detected if it is the end of the buffer */
+      DAR_PLUS_PLUS(dar_current_index); /* increment with wraparound */
       dar_write_buffer[dar_current_index] = 0xF; 
-      DAR_PLUS_PLUS(dar_current_index); /* to detected if it is the end of the buffer */
+      DAR_PLUS_PLUS(dar_current_index); /* increment with wraparound */
 
       /* The group_nb is 16 bit length, and the buffer is an UINT8 length */
       /* So the group_nb must be stocked by dividing it in 2 parts */
       dar_write_buffer[dar_current_index] = ((dar_use_id>>16)& 0x7FFF)>>8;
-                                         /*add the 8 first bits of the Use id group*/
+                                   /*add the 8 first bits of the Use id group*/
       DAR_PLUS_PLUS(dar_current_index);
       dar_write_buffer[dar_current_index] = (dar_use_id>>16)& 0x7FFF;
-                                         /*add the 8 last bits of the Use id group*/
+                                   /*add the 8 last bits of the Use id group*/
       DAR_PLUS_PLUS(dar_current_index);
 
       /* The mask is 16 bit length, and the buffer is an UINT8 length */
       /* So the mask must be stocked by dividing it in 2 parts */
       dar_write_buffer[dar_current_index] = ((dar_use_id)&0xFFFF)>>8;
-                                         /* add the 8 first bits of the Use id mask */
+                                   /* add the 8 first bits of the Use id mask */
       DAR_PLUS_PLUS(dar_current_index);
       dar_write_buffer[dar_current_index] = (dar_use_id)&0xFFFF;
-                                         /* add the 8 last bits of the Use id mask */
+                                   /* add the 8 last bits of the Use id mask */
       DAR_PLUS_PLUS(dar_current_index);
 
       /* Add the dar_level data */
@@ -187,8 +187,10 @@
       {
          if (dar_gbl_var_p->entity_dar_callback != NULL )
          {
-            /* Call the MMI callback function to save some parameters before reset */
-            dar_gbl_var_p->entity_dar_callback(dar_recovery_buffer,DAR_RECOVERY_DATA_MAX_BUFFER_SIZE);
+            /* Call the MMI callback function to save some parameters before
+	       reset */
+            dar_gbl_var_p->entity_dar_callback(dar_recovery_buffer,
+					DAR_RECOVERY_DATA_MAX_BUFFER_SIZE);
          }
       }
 
@@ -202,25 +204,26 @@
    } /* dar_process_emergency */
 
 
-   /********************************************************************************/
-   /*                                                                              */
-   /*    Function Name:   dar_exception_arm_undefined                              */
-   /*                                                                              */
-   /*    Purpose:  This function is called to process ARM undefined instruction    */ 
-   /*              exception and to store this exception in the RAM buffer         */
-   /*                                                                              */
-   /*    Input Parameters:                                                         */
-   /*         None                                                                 */
-   /*                                                                              */
-   /*    Output Parameters:                                                        */
-   /*         Validation of the diagnose execution.                                */
-   /*                                                                              */
-   /*                                                                              */
-   /*                                                                              */
-   /*    Revision History:                                                         */
-   /*        None.                                                                 */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /*                                                                         */
+   /*    Function Name:   dar_exception_arm_undefined                         */
+   /*                                                                         */
+   /*    Purpose:  This function is called to process ARM undefined           */
+   /*              instruction exception and to store this exception in the   */
+   /*              RAM buffer.                                                */
+   /*									      */
+   /*    Input Parameters:                                                    */
+   /*         None                                                            */
+   /*                                                                         */
+   /*    Output Parameters:                                                   */
+   /*         Validation of the diagnose execution.                           */
+   /*                                                                         */
+   /*                                                                         */
+   /*                                                                         */
+   /*    Revision History:                                                    */
+   /*        None.                                                            */
+   /*                                                                         */
+   /***************************************************************************/
    void dar_exception_arm_undefined(void)
    {
       /* Declare local variables */
@@ -240,8 +243,10 @@
       {
          if (dar_gbl_var_p->entity_dar_callback != NULL)
          {
-            /* Call the MMI callback function to save some parameters before reset */
-            dar_gbl_var_p->entity_dar_callback(dar_recovery_buffer,DAR_RECOVERY_DATA_MAX_BUFFER_SIZE);
+            /* Call the MMI callback function to save some parameters before
+	       reset */
+            dar_gbl_var_p->entity_dar_callback(dar_recovery_buffer,
+					DAR_RECOVERY_DATA_MAX_BUFFER_SIZE);
          }
       }
 
@@ -249,28 +254,28 @@
          /* branch to "exception" defined in the int.s*/
          exception();   
       #endif
-      
+
    } /* dar_exception_arm_undefined */
 
-   /********************************************************************************/
-   /*                                                                              */
-   /*    Function Name:   dar_exception_arm_swi                                    */
-   /*                                                                              */
-   /*    Purpose:  This function is called to process ARM SW Interrupt exception   */ 
-   /*              and to store this exception in the RAM buffer                   */
-   /*                                                                              */
-   /*    Input Parameters:                                                         */
-   /*         None                                                                 */
-   /*                                                                              */
-   /*    Output Parameters:                                                        */
-   /*         Validation of the diagnose execution.                                */
-   /*                                                                              */
-   /*                                                                              */
-   /*                                                                              */
-   /*    Revision History:                                                         */
-   /*        None.                                                                 */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /*                                                                         */
+   /*    Function Name:   dar_exception_arm_swi                               */
+   /*                                                                         */
+   /*    Purpose:  This function is called to process ARM SW Interrupt        */
+   /*              exception and to store this exception in the RAM buffer.   */
+   /*                                                                         */
+   /*    Input Parameters:                                                    */
+   /*         None                                                            */
+   /*                                                                         */
+   /*    Output Parameters:                                                   */
+   /*         Validation of the diagnose execution.                           */
+   /*                                                                         */
+   /*                                                                         */
+   /*                                                                         */
+   /*    Revision History:                                                    */
+   /*        None.                                                            */
+   /*                                                                         */
+   /***************************************************************************/
    void dar_exception_arm_swi(void)
    {
       /* Declare local variables */
@@ -290,8 +295,10 @@
       {
          if ( dar_gbl_var_p->entity_dar_callback != NULL)
          {
-            /* Call the MMI callback function to save some parameters before reset */
-            dar_gbl_var_p->entity_dar_callback(dar_recovery_buffer,DAR_RECOVERY_DATA_MAX_BUFFER_SIZE);
+            /* Call the MMI callback function to save some parameters before
+	       reset */
+            dar_gbl_var_p->entity_dar_callback(dar_recovery_buffer,
+					DAR_RECOVERY_DATA_MAX_BUFFER_SIZE);
          }
       }
 
@@ -299,28 +306,28 @@
         /* branch to "exception" defined in the int.s*/
         exception();   
       #endif
-      
+
    } /* dar_exception_arm_swi */
 
-   /********************************************************************************/
-   /*                                                                              */
-   /*    Function Name:   dar_exception_arm_abort_prefetch                         */
-   /*                                                                              */
-   /*    Purpose:  This function is called to process ARM abort prefetch exception */ 
-   /*              and to store this exception in the RAM buffer                   */
-   /*                                                                              */
-   /*    Input Parameters:                                                         */
-   /*         None                                                                 */
-   /*                                                                              */
-   /*    Output Parameters:                                                        */
-   /*         Validation of the diagnose execution.                                */
-   /*                                                                              */
-   /*                                                                              */
-   /*                                                                              */
-   /*    Revision History:                                                         */
-   /*        None.                                                                 */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /*                                                                         */
+   /*    Function Name:   dar_exception_arm_abort_prefetch                    */
+   /*                                                                         */
+   /*    Purpose:  This function is called to process ARM abort prefetch      */
+   /*              exception and to store this exception in the RAM buffer.   */
+   /*                                                                         */
+   /*    Input Parameters:                                                    */
+   /*         None                                                            */
+   /*                                                                         */
+   /*    Output Parameters:                                                   */
+   /*         Validation of the diagnose execution.                           */
+   /*                                                                         */
+   /*                                                                         */
+   /*                                                                         */
+   /*    Revision History:                                                    */
+   /*        None.                                                            */
+   /*                                                                         */
+   /***************************************************************************/
    void dar_exception_arm_abort_prefetch(void)
    {
       #ifndef _WINDOWS
@@ -328,10 +335,11 @@
          UINT8 i;
       #endif
 
-   	  #if ((CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || (CHIPSET == 11) || (CHIPSET == 12))
-	      /* Debug unit pointer */
-	      volatile UINT32 *debug_register_p;
-	  #endif
+      #if ((CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || \
+		(CHIPSET == 11) || (CHIPSET == 12))
+	  /* Debug unit pointer */
+	  volatile UINT32 *debug_register_p;
+      #endif
 
       /* Declare local variables */
       T_DAR_INFO *buffer_p = " DAR Emergency exception : ARM abort prefetch";/*exception data to store*/
@@ -350,25 +358,29 @@
       {
          if (dar_gbl_var_p->entity_dar_callback != NULL)
          {
-            /* Call the MMI callback function to save some parameters before reset */
-            dar_gbl_var_p->entity_dar_callback(dar_recovery_buffer,DAR_RECOVERY_DATA_MAX_BUFFER_SIZE);
+            /* Call the MMI callback function to save some parameters before
+	       reset */
+            dar_gbl_var_p->entity_dar_callback(dar_recovery_buffer,
+					DAR_RECOVERY_DATA_MAX_BUFFER_SIZE);
          }
       }
 
-   	  #if ((CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || (CHIPSET == 11) || (CHIPSET == 12))
-	      /* Initialize the adress of the Debug Unit pointer */
-		  debug_register_p = (volatile UINT32*) DAR_DEBUG_UNIT_REGISTER;
-	  #endif    
+      #if ((CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || \
+		(CHIPSET == 11) || (CHIPSET == 12))
+	  /* Initialize the adress of the Debug Unit pointer */
+	  debug_register_p = (volatile UINT32*) DAR_DEBUG_UNIT_REGISTER;
+      #endif    
 
       #ifndef _WINDOWS
-     	  #if ((CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || (CHIPSET == 11) || (CHIPSET == 12))
-	         /* Save the Debug Unit into the RAM */
-		     for (i=0; i<DEBUG_UNIT_WORD_SIZE; i++ )
-	         {
-		        debug_RAM[i] = *debug_register_p;
-			    debug_register_p++;
-			 }
-		  #endif
+	  #if ((CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || \
+		(CHIPSET == 11) || (CHIPSET == 12))
+	     /* Save the Debug Unit into the RAM */
+	     for (i=0; i<DEBUG_UNIT_WORD_SIZE; i++ )
+	     {
+		debug_RAM[i] = *debug_register_p;
+		debug_register_p++;
+	     }
+	  #endif
 
          /* branch to "exception" defined in the int.s*/
          exception();    
@@ -376,25 +388,25 @@
       
    } /* dar_exception_arm_abort_prefetch */
 
-   /********************************************************************************/
-   /*                                                                              */
-   /*    Function Name:   dar_exception_arm_abort_data                             */
-   /*                                                                              */
-   /*    Purpose:  This function is called to process ARM abort data exception     */ 
-   /*              and to store this exception in the RAM buffer                   */
-   /*                                                                              */
-   /*    Input Parameters:                                                         */
-   /*         None                                                                 */
-   /*                                                                              */
-   /*    Output Parameters:                                                        */
-   /*         Validation of the diagnose execution.                                */
-   /*                                                                              */
-   /*                                                                              */
-   /*                                                                              */
-   /*    Revision History:                                                         */
-   /*        None.                                                                 */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /*                                                                         */
+   /*    Function Name:   dar_exception_arm_abort_data                        */
+   /*                                                                         */
+   /*    Purpose:  This function is called to process ARM abort data exception*/
+   /*              and to store this exception in the RAM buffer              */
+   /*                                                                         */
+   /*    Input Parameters:                                                    */
+   /*         None                                                            */
+   /*                                                                         */
+   /*    Output Parameters:                                                   */
+   /*         Validation of the diagnose execution.                           */
+   /*                                                                         */
+   /*                                                                         */
+   /*                                                                         */
+   /*    Revision History:                                                    */
+   /*        None.                                                            */
+   /*                                                                         */
+   /***************************************************************************/
    void dar_exception_arm_abort_data(void)
    {
       #ifndef _WINDOWS
@@ -402,10 +414,11 @@
          UINT8 i;
       #endif
 
-   	  #if ((CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || (CHIPSET == 11) || (CHIPSET == 12))
-	      /* Debug unit pointer */
-	      volatile UINT32 *debug_register_p;
-	  #endif
+      #if ((CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || \
+		(CHIPSET == 11) || (CHIPSET == 12))
+	  /* Debug unit pointer */
+	  volatile UINT32 *debug_register_p;
+      #endif
 
       /* Declare local variables */
       T_DAR_INFO *buffer_p= " DAR Emergency exception : ARM abort data";/*exception data to store*/
@@ -425,51 +438,55 @@
          if (dar_gbl_var_p->entity_dar_callback != NULL)
          {
 
-            /* Call the MMI callback function to save some parameters before reset */
-            dar_gbl_var_p->entity_dar_callback(dar_recovery_buffer,DAR_RECOVERY_DATA_MAX_BUFFER_SIZE);
+            /* Call the MMI callback function to save some parameters before
+	       reset */
+            dar_gbl_var_p->entity_dar_callback(dar_recovery_buffer,
+					DAR_RECOVERY_DATA_MAX_BUFFER_SIZE);
          }
       }
 
-	  #if ((CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || (CHIPSET == 11) || (CHIPSET == 12))
-		/* Initialize the adress of the Debug Unit pointer */
-		debug_register_p = (volatile UINT32*) DAR_DEBUG_UNIT_REGISTER;
-	  #endif
+      #if ((CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || \
+		(CHIPSET == 11) || (CHIPSET == 12))
+	/* Initialize the adress of the Debug Unit pointer */
+	debug_register_p = (volatile UINT32*) DAR_DEBUG_UNIT_REGISTER;
+      #endif
 
       #ifndef _WINDOWS
-		 #if ((CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || (CHIPSET == 11) || (CHIPSET == 12))
-			/* Save the Debug Unit into the RAM */
-			for (i=0; i<DEBUG_UNIT_WORD_SIZE; i++ )
-			{
+	 #if ((CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || \
+		(CHIPSET == 11) || (CHIPSET == 12))
+	    /* Save the Debug Unit into the RAM */
+	    for (i=0; i<DEBUG_UNIT_WORD_SIZE; i++ )
+	    {
 				debug_RAM[i] = *debug_register_p;
 				debug_register_p++;
-			}
-		 #endif
-		
-		 /* branch to "exception" defined in the int.s*/
+	    }
+	 #endif
+
+	 /* branch to "exception" defined in the int.s*/
          exception();    
       #endif
-     
+
    } /* dar_exception_arm_abort_data */
 
-   /********************************************************************************/
-   /*                                                                              */
-   /*    Function Name:   dar_exception_arm_reserved                               */
-   /*                                                                              */
-   /*    Purpose:  This function is called to process ARM exception                */ 
-   /*              and to store this exception in the RAM buffer                   */
-   /*                                                                              */
-   /*    Input Parameters:                                                         */
-   /*         None                                                                 */
-   /*                                                                              */
-   /*    Output Parameters:                                                        */
-   /*         Validation of the diagnose execution.                                */
-   /*                                                                              */
-   /*                                                                              */
-   /*                                                                              */
-   /*    Revision History:                                                         */
-   /*        None.                                                                 */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /*                                                                         */
+   /*    Function Name:   dar_exception_arm_reserved                          */
+   /*                                                                         */
+   /*    Purpose:  This function is called to process ARM exception           */
+   /*              and to store this exception in the RAM buffer              */
+   /*                                                                         */
+   /*    Input Parameters:                                                    */
+   /*         None                                                            */
+   /*                                                                         */
+   /*    Output Parameters:                                                   */
+   /*         Validation of the diagnose execution.                           */
+   /*                                                                         */
+   /*                                                                         */
+   /*                                                                         */
+   /*    Revision History:                                                    */
+   /*        None.                                                            */
+   /*                                                                         */
+   /***************************************************************************/
    void dar_exception_arm_reserved(void)
    {
       /* Declare local variables */
@@ -489,8 +506,10 @@
       {
          if (dar_gbl_var_p->entity_dar_callback != NULL)
          {
-            /* Call the MMI callback function to save some parameters before reset */
-            dar_gbl_var_p->entity_dar_callback(dar_recovery_buffer,DAR_RECOVERY_DATA_MAX_BUFFER_SIZE);
+            /* Call the MMI callback function to save some parameters before
+	       reset */
+            dar_gbl_var_p->entity_dar_callback(dar_recovery_buffer,
+					DAR_RECOVERY_DATA_MAX_BUFFER_SIZE);
          }
       }
 
@@ -501,31 +520,31 @@
 
    } /* dar_exception_arm_reserved */
 
-  /********************************************************************************/
-  /*                                                                              */
-  /*    Function Name:   dar_exception                                            */
-  /*                                                                              */
-  /*    Purpose:  This function is called to vector exceptions to the correct     */
-  /*              handler                                                         */
-  /*                                                                              */
-  /*    Input Parameters:                                                         */
-  /*         abort type  which come from int.s ( -> magic number)                 */
-  /*                                                                              */
-  /*    Output Parameters:                                                        */
-  /*         Validation of the diagnose execution.                                */
-  /*                                                                              */
-  /*                                                                              */
-  /*                                                                              */
-  /*    Revision History:                                                         */
-  /*        None.                                                                 */
-  /*                                                                              */
-  /********************************************************************************/
+  /****************************************************************************/
+  /*                                                                          */
+  /*    Function Name:   dar_exception                                        */
+  /*                                                                          */
+  /*    Purpose:  This function is called to vector exceptions to the correct */
+  /*              handler                                                     */
+  /*                                                                          */
+  /*    Input Parameters:                                                     */
+  /*         abort type  which come from int.s ( -> magic number)             */
+  /*                                                                          */
+  /*    Output Parameters:                                                    */
+  /*         Validation of the diagnose execution.                            */
+  /*                                                                          */
+  /*                                                                          */
+  /*                                                                          */
+  /*    Revision History:                                                     */
+  /*        None.                                                             */
+  /*                                                                          */
+  /****************************************************************************/
   void dar_exception(int abort_type)
   {
       switch (abort_type)
       {
-         /* magic numbers come from int.s  There is no way to make compiler derived 
-          * constants out of them  
+         /* magic numbers come from int.s  There is no way to make compiler
+          * derived constants out of them  
           */
          case 1:
          dar_exception_arm_undefined();
@@ -559,4 +578,3 @@
    } /* dar_exception */
 
 #endif /* #ifdef RVM_DAR_SWE */
-