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

OMAP4: Syslink dispatcher header files cleanup

This patch fixes format for hw header files for
notify dispatcher.
Signed-off-by: default avatarRamesh Gupta G <grgupta@ti.com>
parent d13c4534
/* /*
* hw_defs.h * hw_defs.h
* *
* DSP-BIOS Bridge driver support functions for TI OMAP processors. * Syslink driver support for OMAP Processors.
* *
* Copyright (C) 2007 Texas Instruments, Inc. * Copyright (C) 2008-2009 Texas Instruments, Inc.
* *
* This package is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE.
*/ */
/*
* ======== hw_defs.h ========
* Description:
* Global HW definitions
*
*! Revision History:
*! ================
*! 19 Apr 2004 sb: Added generic page size, endianness and element size defns
*! 16 Feb 2003 sb: Initial version
*/
#ifndef __HW_DEFS_H #ifndef __HW_DEFS_H
#define __HW_DEFS_H #define __HW_DEFS_H
...@@ -42,33 +31,33 @@ typedef long hw_status; ...@@ -42,33 +31,33 @@ typedef long hw_status;
/* hw_set_clear_t: Enumerated Type used to set and clear any bit */ /* hw_set_clear_t: Enumerated Type used to set and clear any bit */
enum hw_set_clear_t { enum hw_set_clear_t {
HW_CLEAR, HW_CLEAR,
HW_SET HW_SET
} ; } ;
/* hw_endianism_t: Enumerated Type used to specify the endianism /* hw_endianism_t: Enumerated Type used to specify the endianism
* Do NOT change these values. They are used as bit fields. */ * Do NOT change these values. They are used as bit fields. */
enum hw_endianism_t { enum hw_endianism_t {
HW_LITTLE_ENDIAN, HW_LITTLE_ENDIAN,
HW_BIG_ENDIAN HW_BIG_ENDIAN
} ; } ;
/* hw_elemnt_siz_t: Enumerated Type used to specify the element size /* hw_elemnt_siz_t: Enumerated Type used to specify the element size
* Do NOT change these values. They are used as bit fields. */ * Do NOT change these values. They are used as bit fields. */
enum hw_elemnt_siz_t { enum hw_elemnt_siz_t {
HW_ELEM_SIZE_8BIT, HW_ELEM_SIZE_8BIT,
HW_ELEM_SIZE_16BIT, HW_ELEM_SIZE_16BIT,
HW_ELEM_SIZE_32BIT, HW_ELEM_SIZE_32BIT,
HW_ELEM_SIZE_64BIT HW_ELEM_SIZE_64BIT
} ; } ;
/* HW_IdleMode_t: Enumerated Type used to specify Idle modes */ /* HW_IdleMode_t: Enumerated Type used to specify Idle modes */
enum HW_IdleMode_t { enum HW_IdleMode_t {
HW_FORCE_IDLE, HW_FORCE_IDLE,
HW_NO_IDLE, HW_NO_IDLE,
HW_SMART_IDLE HW_SMART_IDLE
} ; } ;
#endif /* __HW_DEFS_H */ #endif /* __HW_DEFS_H */
/*
* hw_mbox.h
*
* Syslink 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.
*/
/* ==================================================
File hw_mbox.h
Path $ (PROJROOT)\driver\mailbox
Desc HW Mailbox API and types definitions.
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
======================================================
*/
#ifndef __MBOX_H #ifndef __MBOX_H
#define __MBOX_H #define __MBOX_H
/* =======================================================
* INCLUDE FILES (only if necessary)
* ========================================================
*/
#include <syslink/hw_defs.h> #include <syslink/hw_defs.h>
#ifdef __cplusplus
extern "C"
{
#endif
/* =========================================================
* EXPORTED DEFINITIONS
* ==========================================================
*/
/* ---------------------------------------------------------
* DEFINITION:
*
* DESCRIPTION: Bitmasks for Mailbox interrupt sources
*
* ----------------------------------------------------------
*/
#define HW_MBOX_INT_NEW_MSG 0x1 #define HW_MBOX_INT_NEW_MSG 0x1
#define HW_MBOX_INT_NOT_FULL 0x2 #define HW_MBOX_INT_NOT_FULL 0x2
#define HW_MBOX_INT_ALL 0x3 #define HW_MBOX_INT_ALL 0x3
/* --------------------------------------------------------- /*
* DEFINITION: HW_MBOX_MAX_NUM_MESSAGES * DEFINITION: HW_MBOX_MAX_NUM_MESSAGES
* *
* DESCRIPTION: Maximum number of messages that mailbox can hald at a time. * DESCRIPTION: Maximum number of messages that mailbox can hald at a time.
* *
* ---------------------------------------------------------- *
*/ */
#define HW_MBOX_MAX_NUM_MESSAGES 4 #define HW_MBOX_MAX_NUM_MESSAGES 4
/* width in bits of MBOX Id */ /* width in bits of MBOX Id */
#define HW_MBOX_ID_WIDTH 2 #define HW_MBOX_ID_WIDTH 2
/* ============================================================= /*
* EXPORTED TYPES * TYPE: enum hw_mbox_id_t
* ============================================================== *
*/ * DESCRIPTION: Enumerated Type used to specify Mail Box Sub Module Id Number
*
/* -------------------------------------------------------------- *
* TYPE: enum hw_mbox_id_t */
* enum hw_mbox_id_t {
* DESCRIPTION: Enumerated Type used to specify Mail Box Sub Module Id Number HW_MBOX_ID_0,
* HW_MBOX_ID_1,
* ----------------------------------------------------------------- HW_MBOX_ID_2,
*/ HW_MBOX_ID_3,
enum hw_mbox_id_t { HW_MBOX_ID_4,
HW_MBOX_ID_0, HW_MBOX_ID_5
HW_MBOX_ID_1, };
HW_MBOX_ID_2,
HW_MBOX_ID_3, /*
HW_MBOX_ID_4, * TYPE: enum hw_mbox_userid_t
HW_MBOX_ID_5 *
}; * DESCRIPTION: Enumerated Type used to specify Mail box User Id
*
/* ------------------------------------------------------------------- *
* TYPE: enum hw_mbox_userid_t */
* enum hw_mbox_userid_t {
* DESCRIPTION: Enumerated Type used to specify Mail box User Id HW_MBOX_U0_ARM11,
* HW_MBOX_U1_UMA,
* --------------------------------------------------------------------- HW_MBOX_U2_IVA,
*/ HW_MBOX_U3_ARM11
enum hw_mbox_userid_t { };
HW_MBOX_U0_ARM11,
HW_MBOX_U1_UMA,
HW_MBOX_U2_IVA,
HW_MBOX_U3_ARM11
};
#if defined(OMAP3430) #if defined(OMAP3430)
/* ---------------------------------------------------------------------- /*
* TYPE: mailbox_context * TYPE: mailbox_context
* *
* DESCRIPTION: Mailbox context settings * DESCRIPTION: Mailbox context settings
* *
* ------------------------------------------------------------------------ *
*/ */
struct mailbox_context { struct mailbox_context {
unsigned long sysconfig; unsigned long sysconfig;
unsigned long irqEnable0; unsigned long irqEnable0;
unsigned long irqEnable1; unsigned long irqEnable1;
}; };
#endif/* defined(OMAP3430)*/ #endif/* defined(OMAP3430)*/
/* ====================================================================== /*
* EXPORTED VARIABLES
* =======================================================================
*/
/* ======================================================================
* EXPORTED FUNCTIONS
* =======================================================================
*/
/* -----------------------------------------------------------------------
* FUNCTION : hw_mbox_msg_read * FUNCTION : hw_mbox_msg_read
* *
* INPUTS: * INPUTS:
...@@ -153,15 +116,15 @@ unsigned long irqEnable1; ...@@ -153,15 +116,15 @@ unsigned long irqEnable1;
* : this function reads a unsigned long from the sub module message * : this function reads a unsigned long from the sub module message
* box Specified. if there are no messages in the mailbox * box Specified. if there are no messages in the mailbox
* then and error is returned. * then and error is returned.
* ---------------------------------------------------------------- *
*/ */
extern long hw_mbox_msg_read( extern long hw_mbox_msg_read(
const unsigned long base_address, const unsigned long base_address,
const enum hw_mbox_id_t mail_box_id, const enum hw_mbox_id_t mail_box_id,
unsigned long *const p_read_value unsigned long *const p_read_value
); );
/* --------------------------------------------------------------- /*
* FUNCTION : hw_mbox_msg_write * FUNCTION : hw_mbox_msg_write
* *
* INPUTS: * INPUTS:
...@@ -188,15 +151,15 @@ extern long hw_mbox_msg_read( ...@@ -188,15 +151,15 @@ extern long hw_mbox_msg_read(
* PURPOSE:: this function writes a unsigned long from the sub module message * PURPOSE:: this function writes a unsigned long from the sub module message
* box Specified. * box Specified.
* *
* --------------------------------------------------------------- *
*/ */
extern long hw_mbox_msg_write( extern long hw_mbox_msg_write(
const unsigned long base_address, const unsigned long base_address,
const enum hw_mbox_id_t mail_box_id, const enum hw_mbox_id_t mail_box_id,
const unsigned long write_value const unsigned long write_value
); );
/* ------------------------------------------------------------------ /*
* FUNCTION : hw_mbox_is_full * FUNCTION : hw_mbox_is_full
* *
* INPUTS: * INPUTS:
...@@ -225,13 +188,13 @@ extern long hw_mbox_msg_write( ...@@ -225,13 +188,13 @@ extern long hw_mbox_msg_write(
* *
* PURPOSE: : this function reads the full status register for mailbox. * PURPOSE: : this function reads the full status register for mailbox.
* *
* ---------------------------------------------------------------- *
*/ */
extern long hw_mbox_is_full( extern long hw_mbox_is_full(
const unsigned long base_address, const unsigned long base_address,
const enum hw_mbox_id_t mail_box_id, const enum hw_mbox_id_t mail_box_id,
unsigned long *const p_is_full unsigned long *const p_is_full
); );
/* ----------------------------------------------------------------- /* -----------------------------------------------------------------
* FUNCTION : hw_mbox_nomsg_get * FUNCTION : hw_mbox_nomsg_get
...@@ -262,15 +225,15 @@ extern long hw_mbox_is_full( ...@@ -262,15 +225,15 @@ extern long hw_mbox_is_full(
* PURPOSE: * PURPOSE:
* : this function gets number of messages in a specified mailbox. * : this function gets number of messages in a specified mailbox.
* *
* ---------------------------------------------------------------- *
*/ */
extern long hw_mbox_nomsg_get( extern long hw_mbox_nomsg_get(
const unsigned long base_address, const unsigned long base_address,
const enum hw_mbox_id_t mail_box_id, const enum hw_mbox_id_t mail_box_id,
unsigned long *const p_num_msg unsigned long *const p_num_msg
); );
/* ----------------------------------------------------------------- /*
* FUNCTION : hw_mbox_event_enable * FUNCTION : hw_mbox_event_enable
* *
* INPUTS: * INPUTS:
...@@ -300,16 +263,16 @@ extern long hw_mbox_nomsg_get( ...@@ -300,16 +263,16 @@ extern long hw_mbox_nomsg_get(
* *
* PURPOSE: : this function enables the specified IRQ. * PURPOSE: : this function enables the specified IRQ.
* *
* -------------------------------------------------------------------- *
*/ */
extern long hw_mbox_event_enable( extern long hw_mbox_event_enable(
const unsigned long base_address, const unsigned long base_address,
const enum hw_mbox_id_t mail_box_id, const enum hw_mbox_id_t mail_box_id,
const enum hw_mbox_userid_t user_id, const enum hw_mbox_userid_t user_id,
const unsigned long events const unsigned long events
); );
/* ------------------------------------------------------------------ /*
* FUNCTION : hw_mbox_event_disable * FUNCTION : hw_mbox_event_disable
* *
* INPUTS: * INPUTS:
...@@ -339,16 +302,16 @@ extern long hw_mbox_event_enable( ...@@ -339,16 +302,16 @@ extern long hw_mbox_event_enable(
* *
* PURPOSE: : this function disables the specified IRQ. * PURPOSE: : this function disables the specified IRQ.
* *
* ------------------------------------------------------------------ *
*/ */
extern long hw_mbox_event_disable( extern long hw_mbox_event_disable(
const unsigned long base_address, const unsigned long base_address,
const enum hw_mbox_id_t mail_box_id, const enum hw_mbox_id_t mail_box_id,
const enum hw_mbox_userid_t user_id, const enum hw_mbox_userid_t user_id,
const unsigned long events const unsigned long events
); );
/* ------------------------------------------------------------------ /*
* FUNCTION : hw_mbox_event_status * FUNCTION : hw_mbox_event_status
* *
* INPUTS: * INPUTS:
...@@ -380,16 +343,16 @@ extern long hw_mbox_event_disable( ...@@ -380,16 +343,16 @@ extern long hw_mbox_event_disable(
* *
* PURPOSE: : this function gets the status of the specified IRQ. * PURPOSE: : this function gets the status of the specified IRQ.
* *
* -------------------------------------------------------------- *
*/ */
extern long hw_mbox_event_status( extern long hw_mbox_event_status(
const unsigned long base_address, const unsigned long base_address,
const enum hw_mbox_id_t mail_box_id, const enum hw_mbox_id_t mail_box_id,
const enum hw_mbox_userid_t user_id, const enum hw_mbox_userid_t user_id,
unsigned long *const p_eventStatus unsigned long *const p_eventStatus
); );
/* ---------------------------------------------------------------- /*
* FUNCTION : hw_mbox_event_ack * FUNCTION : hw_mbox_event_ack
* *
* INPUTS: * INPUTS:
...@@ -421,14 +384,14 @@ extern long hw_mbox_event_status( ...@@ -421,14 +384,14 @@ extern long hw_mbox_event_status(
* *
* PURPOSE: : this function sets the status of the specified IRQ. * PURPOSE: : this function sets the status of the specified IRQ.
* *
* -------------------------------------------------------------- *
*/ */
extern long hw_mbox_event_ack( extern long hw_mbox_event_ack(
const unsigned long base_address, const unsigned long base_address,
const enum hw_mbox_id_t mail_box_id, const enum hw_mbox_id_t mail_box_id,
const enum hw_mbox_userid_t user_id, const enum hw_mbox_userid_t user_id,
const unsigned long event const unsigned long event
); );
#if defined(OMAP3430) #if defined(OMAP3430)
/* --------------------------------------------------------------- /* ---------------------------------------------------------------
...@@ -455,7 +418,7 @@ extern long hw_mbox_event_ack( ...@@ -455,7 +418,7 @@ extern long hw_mbox_event_ack(
*/ */
extern long hw_mbox_save_settings(unsigned long baseAddres); extern long hw_mbox_save_settings(unsigned long baseAddres);
/* ----------------------------------------------------------------- /*
* FUNCTION : hw_mbox_restore_settings * FUNCTION : hw_mbox_restore_settings
* *
* INPUTS: * INPUTS:
...@@ -475,14 +438,10 @@ extern long hw_mbox_save_settings(unsigned long baseAddres); ...@@ -475,14 +438,10 @@ extern long hw_mbox_save_settings(unsigned long baseAddres);
* *
* PURPOSE: : this function restores the context of mailbox * PURPOSE: : this function restores the context of mailbox
* *
* ------------------------------------------------------------------- *
*/ */
extern long hw_mbox_restore_settings(unsigned long baseAddres); extern long hw_mbox_restore_settings(unsigned long baseAddres);
#endif/* defined(OMAP3430)*/ #endif/* defined(OMAP3430)*/
#ifdef __cplusplus
}
#endif
#endif /* __MBOX_H */ #endif /* __MBOX_H */
/* /*
* hw_mmu.h * hw_mbox.h
* *
* DSP-BIOS Bridge driver support functions for TI OMAP processors. * Syslink driver support for OMAP Processors.
* *
* Copyright (C) 2007 Texas Instruments, Inc. * Copyright (C) 2008-2009 Texas Instruments, Inc.
* *
* This package is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation. * published by the Free Software Foundation.
* *
* THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE.
*/ */
/*
* ======== hw_mmu.h ========
* Description:
* MMU types and API declarations
*
*! Revision History:
*! ================
*! 19-Apr-2004 sb Moved & renamed endianness, page size, element size
TLBAdd takes in MMUMap_attrs instead of separate arguments
*! 08-Mar-2004 sb Added the Page Table management APIs
*! 16 Feb 2003 sb: Initial version
*/
#ifndef __HW_MMU_H #ifndef __HW_MMU_H
#define __HW_MMU_H #define __HW_MMU_H
...@@ -60,61 +46,61 @@ extern hw_status hw_mmu_enable(const u32 base_address); ...@@ -60,61 +46,61 @@ extern hw_status hw_mmu_enable(const u32 base_address);
extern hw_status hw_mmu_disable(const u32 base_address); extern hw_status hw_mmu_disable(const u32 base_address);
extern hw_status hw_mmu_numlocked_set(const u32 base_address, extern hw_status hw_mmu_numlocked_set(const u32 base_address,
u32 num_lcked_entries); u32 num_lcked_entries);
extern hw_status hw_mmu_victim_numset(const u32 base_address, extern hw_status hw_mmu_victim_numset(const u32 base_address,
u32 vctm_entry_num); u32 vctm_entry_num);
/* For MMU faults */ /* For MMU faults */
extern hw_status hw_mmu_eventack(const u32 base_address, extern hw_status hw_mmu_eventack(const u32 base_address,
u32 irq_mask); u32 irq_mask);
extern hw_status hw_mmu_event_disable(const u32 base_address, extern hw_status hw_mmu_event_disable(const u32 base_address,
u32 irq_mask); u32 irq_mask);
extern hw_status hw_mmu_event_enable(const u32 base_address, extern hw_status hw_mmu_event_enable(const u32 base_address,
u32 irq_mask); u32 irq_mask);
extern hw_status hw_mmu_event_status(const u32 base_address, extern hw_status hw_mmu_event_status(const u32 base_address,
u32 *irq_mask); u32 *irq_mask);
extern hw_status hw_mmu_flt_adr_rd(const u32 base_address, extern hw_status hw_mmu_flt_adr_rd(const u32 base_address,
u32 *addr); u32 *addr);
/* Set the TT base address */ /* Set the TT base address */
extern hw_status hw_mmu_ttbset(const u32 base_address, extern hw_status hw_mmu_ttbset(const u32 base_address,
u32 ttb_phys_addr); u32 ttb_phys_addr);
extern hw_status hw_mmu_twl_enable(const u32 base_address); extern hw_status hw_mmu_twl_enable(const u32 base_address);
extern hw_status hw_mmu_twl_disable(const u32 base_address); extern hw_status hw_mmu_twl_disable(const u32 base_address);
extern hw_status hw_mmu_tlb_flush(const u32 base_address, extern hw_status hw_mmu_tlb_flush(const u32 base_address,
u32 virtual_addr, u32 virtual_addr,
u32 page_size); u32 page_size);
extern hw_status hw_mmu_tlb_flushAll(const u32 base_address); extern hw_status hw_mmu_tlb_flushAll(const u32 base_address);
extern hw_status hw_mmu_tlb_add(const u32 base_address, extern hw_status hw_mmu_tlb_add(const u32 base_address,
u32 physical_addr, u32 physical_addr,
u32 virtual_addr, u32 virtual_addr,
u32 page_size, u32 page_size,
u32 entryNum, u32 entryNum,
struct hw_mmu_map_attrs_t *map_attrs, struct hw_mmu_map_attrs_t *map_attrs,
enum hw_set_clear_t preserve_bit, enum hw_set_clear_t preserve_bit,
enum hw_set_clear_t valid_bit); enum hw_set_clear_t valid_bit);
/* For PTEs */ /* For PTEs */
extern hw_status hw_mmu_pte_set(const u32 pg_tbl_va, extern hw_status hw_mmu_pte_set(const u32 pg_tbl_va,
u32 physical_addr, u32 physical_addr,
u32 virtual_addr, u32 virtual_addr,
u32 page_size, u32 page_size,
struct hw_mmu_map_attrs_t *map_attrs); struct hw_mmu_map_attrs_t *map_attrs);
extern hw_status hw_mmu_pte_clear(const u32 pg_tbl_va, extern hw_status hw_mmu_pte_clear(const u32 pg_tbl_va,
u32 pg_size, u32 pg_size,
u32 virtual_addr); u32 virtual_addr);
static inline u32 hw_mmu_pte_addr_l1(u32 l1_base, u32 va) static inline u32 hw_mmu_pte_addr_l1(u32 l1_base, u32 va)
{ {
...@@ -167,14 +153,14 @@ static inline u32 hw_mmu_pte_sizel1(u32 pte_val) ...@@ -167,14 +153,14 @@ static inline u32 hw_mmu_pte_sizel1(u32 pte_val)
static inline u32 hw_mmu_pte_sizel2(u32 pte_val) static inline u32 hw_mmu_pte_sizel2(u32 pte_val)
{ {
u32 pte_size = 0; u32 pte_size = 0;
if (pte_val & 0x2) if (pte_val & 0x2)
pte_size = HW_PAGE_SIZE_4KB; pte_size = HW_PAGE_SIZE_4KB;
else if (pte_val & 0x1) else if (pte_val & 0x1)
pte_size = HW_PAGE_SIZE_64KB; pte_size = HW_PAGE_SIZE_64KB;
return pte_size; return pte_size;
} }
extern hw_status hw_mmu_tlb_dump(u32 base_address, bool shw_inv_entries); extern hw_status hw_mmu_tlb_dump(u32 base_address, bool shw_inv_entries);
......
/*
* hw_ocp.h
*
* Syslink 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.
*/
/* =================================================================
File hw_ocp.h
Path $ (PROJROOT)\driver\mailbox
Desc API declarations for generic OCP Socket system registers for Mailbox
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
=====================================================================
*/
#ifndef __HW_OCP_H #ifndef __HW_OCP_H
#define __HW_OCP_H #define __HW_OCP_H
/* ========================================================================
* INCLUDE FILES (only if necessary)
* =========================================================================
*/
#ifdef __cplusplus
extern "C"
{
#endif
#include <syslink/GlobalTypes.h> #include <syslink/GlobalTypes.h>
#include <syslink/hw_ocp.h> #include <syslink/hw_ocp.h>
#include <syslink/hw_defs.h> #include <syslink/hw_defs.h>
...@@ -38,61 +26,35 @@ extern "C" ...@@ -38,61 +26,35 @@ extern "C"
#include <syslink/MBXAccInt.h> #include <syslink/MBXAccInt.h>
/* ======================================================================= /*
* EXPORTED DEFINITIONS
* ========================================================================
*/
/* =======================================================================
* EXPORTED TYPES
* ========================================================================
*/
/* -----------------------------------------------------------------------
* TYPE: HW_IdleMode_t * TYPE: HW_IdleMode_t
* *
* DESCRIPTION: Enumerated Type for idle modes in OCP SYSCONFIG register * DESCRIPTION: Enumerated Type for idle modes in OCP SYSCONFIG register
* *
* ------------------------------------------------------------------------- *
*/ */
enum hal_ocp_idlemode_t { enum hal_ocp_idlemode_t {
HW_OCP_FORCE_IDLE, HW_OCP_FORCE_IDLE,
HW_OCP_NO_IDLE, HW_OCP_NO_IDLE,
HW_OCP_SMART_IDLE HW_OCP_SMART_IDLE
}; };
/* =======================================================================
* EXPORTED VARIABLES
* ========================================================================
*/
/* =======================================================================
* EXPORTED FUNCTIONS
* ========================================================================
*/
extern long hw_ocp_soft_reset(const unsigned long base_address); extern long hw_ocp_soft_reset(const unsigned long base_address);
extern long hw_ocp_soft_reset_isdone(const unsigned long base_address, extern long hw_ocp_soft_reset_isdone(const unsigned long base_address,
unsigned long *reset_is_done); unsigned long *reset_is_done);
extern long hw_ocp_idle_modeset(const unsigned long base_address, extern long hw_ocp_idle_modeset(const unsigned long base_address,
enum hal_ocp_idlemode_t idle_mode); enum hal_ocp_idlemode_t idle_mode);
extern long hw_ocp_idlemode_get(const unsigned long base_address, extern long hw_ocp_idlemode_get(const unsigned long base_address,
enum hal_ocp_idlemode_t *idle_mode); enum hal_ocp_idlemode_t *idle_mode);
extern long hw_ocp_autoidle_set(const unsigned long base_address, extern long hw_ocp_autoidle_set(const unsigned long base_address,
enum hw_set_clear_t auto_idle); enum hw_set_clear_t auto_idle);
extern long hw_ocp_autoidle_get(const unsigned long base_address, extern long hw_ocp_autoidle_get(const unsigned long base_address,
enum hw_set_clear_t *auto_idle); enum hw_set_clear_t *auto_idle);
#ifdef __cplusplus
}
#endif
#endif /* __HW_OCP_H */ #endif /* __HW_OCP_H */
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