Commit d2b63918 authored by Ramesh Gupta's avatar Ramesh Gupta Committed by Hari Kanigeri

OMAP4 Syslink dispatcher code format fix

This patch fixes coding style issues and compile
time warnings.
Signed-off-by: default avatarRamesh Gupta G <grgupta@ti.com>
parent 2a1e2f6f
......@@ -154,9 +154,9 @@ extern long hw_mbox_msg_read(
*
*/
extern long hw_mbox_msg_write(
const unsigned long base_address,
const enum hw_mbox_id_t mail_box_id,
const unsigned long write_value
const unsigned long base_address,
const enum hw_mbox_id_t mail_box_id,
const unsigned long write_value
);
/*
......
......@@ -53,7 +53,7 @@ irqreturn_t notify_mailbx0_user0_isr(int temp, void *anArg, struct pt_regs *p);
/*
*func ntfy_disp_bind_interrupt
*
*
* desc Bind an ISR to the HW interrupt line coming into the processor
*/
int ntfy_disp_bind_interrupt(int interrupt_no,
......@@ -63,7 +63,7 @@ int ntfy_disp_bind_interrupt(int interrupt_no,
/*
* desc Print the mailbox registers and other useful debug information
*
*
*/
void ntfy_disp_debug(void);
......@@ -148,7 +148,7 @@ int ntfy_disp_unregister(unsigned long int mbox_module_no,
/*
* func notify_mailbx0_user0_isr
* desc mail ISR
* desc mail ISR
*
*/
......
/*===========================================================================
File hal_ocp.c
/*
* hw_ocp.c
*
* Syslink dispatcher driver support for OMAP Processors.
*
* Copyright (C) 2008-2009 Texas Instruments, Inc.
*
* This package is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE.
*/
Path $(PROJROOT)\driver\mailbox
Desc API definitions to setup OCP Socket system registers
Rev 0.1.0
This computer program is copyright to Texas Instruments Incorporated.
The program may not be used without the written permission of
Texas Instruments Incorporated or against the terms and conditions
stipulated in the agreement under which this program has been supplied.
(c) Texas Instruments Incorporated 2008
===========================================================================
*/
/*============================================================================
*STANDARD INCLUDE FILES
*=============================================================================
*/
/*============================================================================
*PROJECT SPECIFIC INCLUDE FILES
*=============================================================================
*/
#include <syslink/GlobalTypes.h>
#include <syslink/hw_ocp.h>
#include <syslink/hw_defs.h>
#include <syslink/MBXRegAcM.h>
#include <syslink/MBXAccInt.h>
#include <linux/module.h>
MODULE_LICENSE("GPL");
/*============================================================================
*GLOBAL VARIABLES DECLARATIONS
*=============================================================================
*/
/*============================================================================
*LOCAL TYPES AND DEFINITIONS
*=============================================================================
*/
/*============================================================================
*LOCAL VARIABLES DECLARATIONS
*=============================================================================
*/
/*============================================================================
*LOCAL FUNCTIONS PROTOTYPES
*=============================================================================
*/
/*============================================================================
*EXPORTED FUNCTIONS
*=============================================================================
*/
long hw_ocp_soft_reset(const unsigned long base_address)
{
long status = RET_OK;
MLBMAILBOX_SYSCONFIGSoftResetWrite32(base_address, HW_SET);
return status;
long status = RET_OK;
MLBMAILBOX_SYSCONFIGSoftResetWrite32(base_address, HW_SET);
return status;
}
long hw_ocp_soft_reset_isdone(const unsigned long base_address,
unsigned long *reset_is_done)
{
long status = RET_OK;
long status = RET_OK;
*reset_is_done = MLBMAILBOX_SYSSTATUSResetDoneRead32(base_address);
*reset_is_done = MLBMAILBOX_SYSSTATUSResetDoneRead32(base_address);
return status;
return status;
}
long hw_ocp_idle_modeset(const unsigned long base_address,
enum hal_ocp_idlemode_t idle_mode)
{
long status = RET_OK;
long status = RET_OK;
MLBMAILBOX_SYSCONFIGSIdleModeWrite32(base_address, idle_mode);
MLBMAILBOX_SYSCONFIGSIdleModeWrite32(base_address, idle_mode);
return status;
return status;
}
long hw_ocp_idlemode_get(const unsigned long base_address,
enum hal_ocp_idlemode_t *idle_mode)
{
long status = RET_OK;
long status = RET_OK;
*idle_mode = (enum hal_ocp_idlemode_t)
*idle_mode = (enum hal_ocp_idlemode_t)
MLBMAILBOX_SYSCONFIGSIdleModeRead32(base_address);
return status;
return status;
}
long hw_ocp_autoidle_set(const unsigned long base_address,
enum hw_set_clear_t auto_idle)
{
long status = RET_OK;
long status = RET_OK;
MLBMAILBOX_SYSCONFIGAutoIdleWrite32(base_address, auto_idle);
MLBMAILBOX_SYSCONFIGAutoIdleWrite32(base_address, auto_idle);
return status;
return status;
}
long hw_ocp_autoidle_get(const unsigned long base_address,
enum hw_set_clear_t *auto_idle)
{
long status = RET_OK;
long status = RET_OK;
*auto_idle = (enum hw_set_clear_t)
*auto_idle = (enum hw_set_clear_t)
MLBMAILBOX_SYSCONFIGAutoIdleRead32(base_address);
return status;
return status;
}
/*============================================================================
*LOCAL FUNCTIONS
*=============================================================================
*/
......@@ -289,10 +289,10 @@ int ntfy_disp_read(unsigned long int mbox_module_no,
}
/*Read a single message */
hw_mbox_nomsg_get(mailbx_hw_config.mbox_linear_addr ,
(enum hw_mbox_id_t)a_mbox_no, num_messages);
(enum hw_mbox_id_t)a_mbox_no, (unsigned long *const)num_messages);
if (*num_messages > 0) {
hw_mbox_msg_read(mailbx_hw_config.mbox_linear_addr,
(enum hw_mbox_id_t)a_mbox_no, messages);
(enum hw_mbox_id_t)a_mbox_no, (unsigned long *const)messages);
} else
status = -EBUSY;
func_end:
......@@ -314,8 +314,7 @@ int ntfy_disp_register(unsigned long int mbox_module_no,
i_mbox_module_no = mbox_module_no;
i_a_irq_bit = a_irq_bit;
/*Validate the parameters */
/*Validate the parameters */
if (mbox_module_no > mailbx_hw_config.mbox_modules) {
status = -EINVAL;
goto func_end;
......
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