/********************************************************************
* Copyright (C) 2003-2008 Texas Instruments Incorporated.
 * 
 *  Redistribution and use in source and binary forms, with or without 
 *  modification, are permitted provided that the following conditions 
 *  are met:
 *
 *    Redistributions of source code must retain the above copyright 
 *    notice, this list of conditions and the following disclaimer.
 *
 *    Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the 
 *    documentation and/or other materials provided with the   
 *    distribution.
 *
 *    Neither the name of Texas Instruments Incorporated nor the names of
 *    its contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
 *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
 *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
 *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
 *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
 *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
 *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
 *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
*/
#ifndef _ARM_CPINTC_H_
#define _ARM_CPINTC_H_

typedef enum {
    ARM_CPINTC_GIC_EVT_499 = 18,
    ARM_CPINTC_GIC_EVT_500,
    ARM_CPINTC_GIC_EVT_501 = 22,
    ARM_CPINTC_GIC_EVT_502,
    ARM_CPINTC_GIC_EVT_480 = 29,
    ARM_CPINTC_GIC_EVT_481,
    ARM_CPINTC_GIC_EVT_482,
    ARM_CPINTC_GIC_EVT_483,
    ARM_CPINTC_GIC_EVT_484,
    ARM_CPINTC_GIC_EVT_485,
    ARM_CPINTC_GIC_EVT_486,
    ARM_CPINTC_GIC_EVT_487,
    ARM_CPINTC_GIC_EVT_488,
    ARM_CPINTC_GIC_EVT_489,
    ARM_CPINTC_GIC_EVT_490,
    ARM_CPINTC_GIC_EVT_491,
    ARM_CPINTC_GIC_EVT_492,
    ARM_CPINTC_GIC_EVT_493,
    ARM_CPINTC_GIC_EVT_494,
    ARM_CPINTC_GIC_EVT_495,
    ARM_CPINTC_GIC_EVT_496,
    ARM_CPINTC_GIC_EVT_497,
    ARM_CPINTC_GIC_EVT_498,
    ARM_CPINTC_GIC_EVT_503 = 50,
    ARM_CPINTC_GIC_EVT_504,
    ARM_CPINTC_GIC_EVT_505 = 66,
    ARM_CPINTC_GIC_EVT_506,
    ARM_CPINTC_GIC_EVT_507 = 88,
    ARM_CPINTC_GIC_EVT_508,
    ARM_CPINTC_GIC_EVT_509 = 90,
    ARM_CPINTC_GIC_EVT_510,
    ARM_CPINTC_GIC_EVT_511
} arm_cpintc_gic_event;

void Arm_Cpintc_Init(void);
void Arm_Cpintc_MapSysToHostInt(unsigned int sysEvt, 
                                 arm_cpintc_gic_event hostEvt);
void Arm_Cpintc_EnableChannel(unsigned int sysEvt, arm_cpintc_gic_event hostEvt);
void Arm_Cpintc_SetSysInterrupt(unsigned int sysEvt);
void Arm_Cpintc_ClearSysInterrupt(unsigned int sysEvt);
#endif
