/**HEADER********************************************************************
* 
* Copyright (c) 2008 Freescale Semiconductor;
* All Rights Reserved                       
*
*************************************************************************** 
*
* THIS SOFTWARE IS PROVIDED BY FREESCALE "AS IS" AND ANY EXPRESSED 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 FREESCALE OR ITS 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.
*
**************************************************************************
*
* $FileName: psp_cpudef.h$
* $Version : 3.5.7.0$
* $Date    : Jan-19-2010$
*
* Comments:
*
*
*END************************************************************************/

#ifndef __psp_cpudef_h__
#define __psp_cpudef_h__

#include "mqx_cpudef.h"

/* CPU groups */
#define PSP_CPU_GROUP_MCF51AC       (1)
#define PSP_CPU_GROUP_MCF51CN       (2)
#define PSP_CPU_GROUP_MCF51JM       (3)
#define PSP_CPU_GROUP_MCF51EM       (4)
#define PSP_CPU_GROUP_MCF5222       (5)
#define PSP_CPU_GROUP_MCF5223       (6)
#define PSP_CPU_GROUP_MCF5225       (7)
#define PSP_CPU_GROUP_MCF5227       (8)
#define PSP_CPU_GROUP_MCF5282       (9)
#define PSP_CPU_GROUP_MCF5445       (10)
#define PSP_CPU_GROUP_MCF5441       (11)


#define PSP_CPU_MCF51AC128          (PSP_CPU_NUM(PSP_CPU_ARCH_COLDFIRE, PSP_CPU_GROUP_MCF51AC, 1))
#define PSP_CPU_MCF51AC256          (PSP_CPU_NUM(PSP_CPU_ARCH_COLDFIRE, PSP_CPU_GROUP_MCF51AC, 2))
#define PSP_CPU_MCF51CN128          (PSP_CPU_NUM(PSP_CPU_ARCH_COLDFIRE, PSP_CPU_GROUP_MCF51CN, 1))
#define PSP_CPU_MCF51JM128          (PSP_CPU_NUM(PSP_CPU_ARCH_COLDFIRE, PSP_CPU_GROUP_MCF51JM, 1))
#define PSP_CPU_MCF51EM128          (PSP_CPU_NUM(PSP_CPU_ARCH_COLDFIRE, PSP_CPU_GROUP_MCF51EM, 1))
#define PSP_CPU_MCF51EM256          (PSP_CPU_NUM(PSP_CPU_ARCH_COLDFIRE, PSP_CPU_GROUP_MCF51EM, 2))


#define PSP_CPU_MCF52221            (PSP_CPU_NUM(PSP_CPU_ARCH_COLDFIRE, PSP_CPU_GROUP_MCF5222, 1))
#define PSP_CPU_MCF52223            (PSP_CPU_NUM(PSP_CPU_ARCH_COLDFIRE, PSP_CPU_GROUP_MCF5222, 3))
#define PSP_CPU_MCF52233            (PSP_CPU_NUM(PSP_CPU_ARCH_COLDFIRE, PSP_CPU_GROUP_MCF5223, 3))
#define PSP_CPU_MCF52235            (PSP_CPU_NUM(PSP_CPU_ARCH_COLDFIRE, PSP_CPU_GROUP_MCF5223, 5))
#define PSP_CPU_MCF52259            (PSP_CPU_NUM(PSP_CPU_ARCH_COLDFIRE, PSP_CPU_GROUP_MCF5225, 9))
#define PSP_CPU_MCF52277            (PSP_CPU_NUM(PSP_CPU_ARCH_COLDFIRE, PSP_CPU_GROUP_MCF5227, 7))
#define PSP_CPU_MCF54455            (PSP_CPU_NUM(PSP_CPU_ARCH_COLDFIRE, PSP_CPU_GROUP_MCF5445, 5))
#define PSP_CPU_MCF5282             (PSP_CPU_NUM(PSP_CPU_ARCH_COLDFIRE, PSP_CPU_GROUP_MCF5282, 0))
#define PSP_CPU_MCF54418            (PSP_CPU_NUM(PSP_CPU_ARCH_COLDFIRE, PSP_CPU_GROUP_MCF5441, 8))
    
#define PSP_MQX_CPU_IS_MCF51AC      ((PSP_GET_CPU_GROUP(MQX_CPU) == PSP_CPU_GROUP_MCF51AC))
#define PSP_MQX_CPU_IS_MCF51CN      ((PSP_GET_CPU_GROUP(MQX_CPU) == PSP_CPU_GROUP_MCF51CN))
#define PSP_MQX_CPU_IS_MCF51EM      ((PSP_GET_CPU_GROUP(MQX_CPU) == PSP_CPU_GROUP_MCF51EM))
#define PSP_MQX_CPU_IS_MCF51JM      ((PSP_GET_CPU_GROUP(MQX_CPU) == PSP_CPU_GROUP_MCF51JM))

#define PSP_MQX_CPU_IS_MCF51        ( PSP_MQX_CPU_IS_MCF51AC || \
                                      PSP_MQX_CPU_IS_MCF51CN || \
                                      PSP_MQX_CPU_IS_MCF51EM || \
                                      PSP_MQX_CPU_IS_MCF51JM)
                                      
#define PSP_MQX_CPU_IS_MCF5222X     ((PSP_GET_CPU_GROUP(MQX_CPU) == PSP_CPU_GROUP_MCF5222))
#define PSP_MQX_CPU_IS_MCF5223X     ((PSP_GET_CPU_GROUP(MQX_CPU) == PSP_CPU_GROUP_MCF5223))
#define PSP_MQX_CPU_IS_MCF5225X     ((PSP_GET_CPU_GROUP(MQX_CPU) == PSP_CPU_GROUP_MCF5225))
#define PSP_MQX_CPU_IS_MCF5227X     ((PSP_GET_CPU_GROUP(MQX_CPU) == PSP_CPU_GROUP_MCF5227))
#define PSP_MQX_CPU_IS_MCF5445X     ((PSP_GET_CPU_GROUP(MQX_CPU) == PSP_CPU_GROUP_MCF5445))
#define PSP_MQX_CPU_IS_MCF5441X     ((PSP_GET_CPU_GROUP(MQX_CPU) == PSP_CPU_GROUP_MCF5441))

#endif
