Commit 1331a66f authored by Ramesh Gupta's avatar Ramesh Gupta Committed by Hari Kanigeri

OMAP4 Syslink notify driver coding format fix

This patch fixes coding style issues and compile time
warnings.
Signed-off-by: default avatarRamesh Gupta G <grgupta@ti.com>
parent d2b63918
...@@ -19,13 +19,6 @@ ...@@ -19,13 +19,6 @@
#define NOTIFY_H #define NOTIFY_H
#include <syslink/host_os.h> #include <syslink/host_os.h>
/* ----------------------------------- Notify */
//#include <syslink/notify_driverdefs.h>
/* Max number of processors in the system.*/
#define MULTIPROC_MAXPROCESSORS 2
#define NOTIFY_MAX_DRIVERS 16 #define NOTIFY_MAX_DRIVERS 16
...@@ -36,18 +29,17 @@ ...@@ -36,18 +29,17 @@
*/ */
#define NOTIFY_MAX_NAMELEN 32 #define NOTIFY_MAX_NAMELEN 32
#define NOTIFY_MODULEID 0x5f84 #define NOTIFY_MODULEID 0x5f84
/* /*
Status code base for Notify module. *Status code base for Notify module.
*/ */
#define NOTIFY_STATUSCODEBASE (NOTIFY_MODULEID << 12u) #define NOTIFY_STATUSCODEBASE (NOTIFY_MODULEID << 12u)
/* /*
* Macro to make error code. * Macro to make error code.
*/ */
#define NOTIFY_MAKE_FAILURE(x) ((int)( 0x80000000\ #define NOTIFY_MAKE_FAILURE(x) ((int)(0x80000000\
| (NOTIFY_STATUSCODEBASE + (x)))) | (NOTIFY_STATUSCODEBASE + (x))))
/* /*
...@@ -66,7 +58,7 @@ ...@@ -66,7 +58,7 @@
#define NOTIFY_E_TIMEOUT NOTIFY_MAKE_FAILURE(2) #define NOTIFY_E_TIMEOUT NOTIFY_MAKE_FAILURE(2)
/* /*
Configuration failure. *Configuration failure.
*/ */
#define NOTIFY_E_CONFIG NOTIFY_MAKE_FAILURE(3) #define NOTIFY_E_CONFIG NOTIFY_MAKE_FAILURE(3)
...@@ -134,8 +126,7 @@ ...@@ -134,8 +126,7 @@
#define NOTIFY_E_ALREADYEXISTS NOTIFY_MAKE_FAILURE(16) #define NOTIFY_E_ALREADYEXISTS NOTIFY_MAKE_FAILURE(16)
/* /*
* @def NOTIFY_E_DRIVERINIT * brief The Notify driver has not been initialized.
* @brief The Notify driver has not been initialized.
*/ */
#define NOTIFY_E_DRIVERINIT NOTIFY_MAKE_FAILURE(17) #define NOTIFY_E_DRIVERINIT NOTIFY_MAKE_FAILURE(17)
...@@ -145,7 +136,6 @@ ...@@ -145,7 +136,6 @@
#define NOTIFY_E_NOTREADY NOTIFY_MAKE_FAILURE(18) #define NOTIFY_E_NOTREADY NOTIFY_MAKE_FAILURE(18)
/* /*
* @def NOTIFY_E_REGDRVFAILED
* @brief Failed to register driver with Notify module. * @brief Failed to register driver with Notify module.
*/ */
#define NOTIFY_E_REGDRVFAILED NOTIFY_MAKE_FAILURE(19) #define NOTIFY_E_REGDRVFAILED NOTIFY_MAKE_FAILURE(19)
...@@ -227,7 +217,7 @@ struct notify_config { ...@@ -227,7 +217,7 @@ struct notify_config {
/* Handle of gate to be used for local thread safety */ /* Handle of gate to be used for local thread safety */
}; };
typedef void (*notify_callback_fxn) (u16 proc_id, u32 eventNo,void *arg, typedef void (*notify_callback_fxn)(u16 proc_id, u32 eventNo, void *arg,
u32 payload); u32 payload);
extern struct notify_module_object notify_state; extern struct notify_module_object notify_state;
...@@ -251,9 +241,9 @@ extern struct notify_module_object notify_state; ...@@ -251,9 +241,9 @@ extern struct notify_module_object notify_state;
* *
*/ */
struct notify_shmdrv_event_entry { struct notify_shmdrv_event_entry {
REG unsigned long int flag ; REG unsigned long int flag;
REG unsigned long int payload ; REG unsigned long int payload;
REG unsigned long int reserved ; REG unsigned long int reserved;
/*ADD_PADDING(padding, NOTIFYSHMDRV_EVENT_ENTRY_PADDING)*/ /*ADD_PADDING(padding, NOTIFYSHMDRV_EVENT_ENTRY_PADDING)*/
}; };
...@@ -272,8 +262,8 @@ struct notify_shmdrv_event_entry { ...@@ -272,8 +262,8 @@ struct notify_shmdrv_event_entry {
* *
*/ */
struct notify_shmdrv_eventreg_mask { struct notify_shmdrv_eventreg_mask {
REG unsigned long int mask ; REG unsigned long int mask;
REG unsigned long int enable_mask ; REG unsigned long int enable_mask;
/*ADD_PADDING (padding, IPC_64BIT_PADDING)*/ /*ADD_PADDING (padding, IPC_64BIT_PADDING)*/
}; };
...@@ -292,8 +282,8 @@ struct notify_shmdrv_eventreg_mask { ...@@ -292,8 +282,8 @@ struct notify_shmdrv_eventreg_mask {
* *
*/ */
struct notify_shmdrv_eventreg { struct notify_shmdrv_eventreg {
unsigned long int reg_event_no ; unsigned long int reg_event_no;
unsigned long int reserved ; unsigned long int reserved;
}; };
/* /*
...@@ -324,12 +314,12 @@ struct notify_shmdrv_eventreg { ...@@ -324,12 +314,12 @@ struct notify_shmdrv_eventreg {
* *
*/ */
struct notify_shmdrv_proc_ctrl { struct notify_shmdrv_proc_ctrl {
struct notify_shmdrv_event_entry *self_event_chart ; struct notify_shmdrv_event_entry *self_event_chart;
struct notify_shmdrv_event_entry *other_event_chart ; struct notify_shmdrv_event_entry *other_event_chart;
unsigned long int recv_init_status ; unsigned long int recv_init_status;
unsigned long int send_init_status ; unsigned long int send_init_status;
/*ADD_PADDING(padding, NOTIFYSHMDRV_CTRL_PADDING)*/ /*ADD_PADDING(padding, NOTIFYSHMDRV_CTRL_PADDING)*/
struct notify_shmdrv_eventreg_mask reg_mask ; struct notify_shmdrv_eventreg_mask reg_mask;
}; };
/*! /*!
...@@ -338,29 +328,29 @@ struct notify_shmdrv_proc_ctrl { ...@@ -338,29 +328,29 @@ struct notify_shmdrv_proc_ctrl {
* This structure is shared between the two processors. * This structure is shared between the two processors.
*/ */
struct notify_shmdrv_ctrl { struct notify_shmdrv_ctrl {
struct notify_shmdrv_proc_ctrl proc_ctrl [2]; struct notify_shmdrv_proc_ctrl proc_ctrl[2];
}; };
/* Function to get the default configuration for the Notify module. */ /* Function to get the default configuration for the Notify module. */
void notify_get_config (struct notify_config * cfg); void notify_get_config(struct notify_config *cfg);
/* Function to setup the Notify Module */ /* Function to setup the Notify Module */
int notify_setup (struct notify_config * cfg); int notify_setup(struct notify_config *cfg);
/* Function to destroy the Notify module */ /* Function to destroy the Notify module */
int notify_destroy(void); int notify_destroy(void);
/* Function to register an event */ /* Function to register an event */
int notify_register_event(void *notify_driver_handle, u16 proc_id, int notify_register_event(void *notify_driver_handle, u16 proc_id,
u32 event_no, notify_callback_fxn notify_callback_fxn, void *cbck_arg); u32 event_no,
notify_callback_fxn notify_callback_fxn,
void *cbck_arg);
/* Function to unregister an event */ /* Function to unregister an event */
int notify_unregister_event(void *notify_driver_handle, u16 proc_id, int notify_unregister_event(void *notify_driver_handle, u16 proc_id,
u32 event_no, notify_callback_fxn notify_callback_fxn, void *cbck_arg); u32 event_no,
notify_callback_fxn notify_callback_fxn,
void *cbck_arg);
/* Function to send an event to other processor */ /* Function to send an event to other processor */
int notify_sendevent(void *notify_driver_handle, u16 proc_id, int notify_sendevent(void *notify_driver_handle, u16 proc_id,
...@@ -370,10 +360,11 @@ int notify_sendevent(void *notify_driver_handle, u16 proc_id, ...@@ -370,10 +360,11 @@ int notify_sendevent(void *notify_driver_handle, u16 proc_id,
u32 notify_disable(u16 procId); u32 notify_disable(u16 procId);
/* Function to restore Notify module state */ /* Function to restore Notify module state */
void notify_restore (u32 key, u16 proc_id); void notify_restore(u32 key, u16 proc_id);
/* Function to disable particular event */ /* Function to disable particular event */
void notify_disable_event(void *notify_driver_handle, u16 proc_id, u32 event_no); void notify_disable_event(void *notify_driver_handle, u16 proc_id,
u32 event_no);
/* Function to enable particular event */ /* Function to enable particular event */
void notify_enable_event(void *notify_driver_handle, u16 proc_id, u32 event_no); void notify_enable_event(void *notify_driver_handle, u16 proc_id, u32 event_no);
......
...@@ -268,7 +268,8 @@ struct notify_driver_attrs { ...@@ -268,7 +268,8 @@ struct notify_driver_attrs {
* *
*/ */
typedef int(*NotifyDriver_RegisterEvent)(struct notify_driver_object *handle, typedef int(*NotifyDriver_RegisterEvent)(struct notify_driver_object *handle,
u16 procId, u32 eventNo, notify_callback_fxn cbckFxn, void * cbckArg); u16 procId, u32 eventNo, notify_callback_fxn cbckFxn,
void *cbckArg);
/* /*
* This type defines the function to unregister a callback for an event * This type defines the function to unregister a callback for an event
* with the Notify driver. * with the Notify driver.
...@@ -279,7 +280,7 @@ typedef int(*NotifyDriver_RegisterEvent)(struct notify_driver_object *handle, ...@@ -279,7 +280,7 @@ typedef int(*NotifyDriver_RegisterEvent)(struct notify_driver_object *handle,
*/ */
typedef int(*NotifyDriver_UnregisterEvent) (struct notify_driver_object *handle, typedef int(*NotifyDriver_UnregisterEvent) (struct notify_driver_object *handle,
u16 procId, u32 eventNo, notify_callback_fxn cbckFxn, u16 procId, u32 eventNo, notify_callback_fxn cbckFxn,
void * cbckArg); void *cbckArg);
/* /*
* This type defines the function to send a notification event to the * This type defines the function to send a notification event to the
...@@ -367,7 +368,6 @@ union notify_drv_procevents{ ...@@ -367,7 +368,6 @@ union notify_drv_procevents{
/*Attributes */ /*Attributes */
unsigned long int num_events; unsigned long int num_events;
unsigned long int send_event_pollcount; unsigned long int send_event_pollcount;
/*Control Paramters */ /*Control Paramters */
unsigned long int send_init_status ; unsigned long int send_init_status ;
struct notify_shmdrv_eventreg_mask reg_mask ; struct notify_shmdrv_eventreg_mask reg_mask ;
...@@ -386,7 +386,7 @@ struct notify_driver_object { ...@@ -386,7 +386,7 @@ struct notify_driver_object {
struct notify_interface fn_table; struct notify_interface fn_table;
char name[NOTIFY_MAX_NAMELEN]; char name[NOTIFY_MAX_NAMELEN];
struct notify_driver_attrs attrs; struct notify_driver_attrs attrs;
u32 *disable_flag [NOTIFY_MAXNESTDEPTH]; u32 *disable_flag[NOTIFY_MAXNESTDEPTH];
void *driver_object; void *driver_object;
}; };
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <syslink/notify_driver.h> #include <syslink/notify_driver.h>
#include <syslink/GlobalTypes.h> #include <syslink/GlobalTypes.h>
#include <syslink/gt.h> #include <syslink/gt.h>
#include <syslink/multiproc.h>
/* /*
* func _notify_is_support_proc * func _notify_is_support_proc
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment