📄 hpi_const.h
字号:
/*****************************************************************************\
* TEXAS INSTRUMENTS INCORPORATED PROPRIETARY INFORMATION
*
* Property of Texas Instruments
* For Unrestricted Internal Use Only
* Unauthorized reproduction and/or distribution is strictly prohibited.
* This product is protected under copyright law and trade secret law
* as an unpublished work.
* Created 2004, (C) Copyright 2003 Texas Instruments. All rights reserved.
*------------------------------------------------------------------------------
* Filename : hpi_const.h
* Date Created : Nov 23, 2004
* Last Modified :
* Description : Constant definitions uses in the uHPI Testcases.
* History :
* Project : Himalaya
* Author : Raja
\*****************************************************************************/
#define PASS 1
#define FAIL 0
/*------------------------------------------------------------------*/
/* DSP Address map of UHPI Registers */
/*------------------------------------------------------------------*/
#define DSP_CFG_BASE 0x02880000
#define DSP_PID (*(volatile Uint32*)(DSP_CFG_BASE + 0x00000000))
#define DSP_PWREMU_MGMT (*(volatile Uint32*)(DSP_CFG_BASE + 0x00000004))
#define DSP_HPIC (*(volatile Uint32*)(DSP_CFG_BASE + 0x00000030))
#define DSP_HPIAW (*(volatile Uint32*)(DSP_CFG_BASE + 0x00000034))
#define DSP_HPIAR (*(volatile Uint32*)(DSP_CFG_BASE + 0x00000038))
#define DSP_XHPIAW (*(volatile Uint32*)(DSP_CFG_BASE + 0x0000003C))
#define DSP_XHPIAR (*(volatile Uint32*)(DSP_CFG_BASE + 0x00000040))
/*------------------------------------------------------------------*/
/* HPI Bif Definitions */
/* (Required bits' corresponding definitions can be ORed and used) */
/*------------------------------------------------------------------*/
#define HPIC_HWOB 0x00010001
#define HPIC_DSPINT 0x00020002
#define HPIC_HSTINT 0x00040004
#define HPIC_HRDY 0x00080008
#define HPIC_FETCH 0x00100010
#define HPIC_XHPIA 0x00200020
#define HPIC_CPURST 0x00400040
#define HPIC_HSTRST 0x00800080
#define HPIC_HWOBSTS 0x01000100
#define HPIC_DUAL 0x02000200
#define HPIC_DUAL_RWSEL 0x0A000A00
#define HPIC_HPIA_RD 0x08000800
#define HPIC_HPIA_WR 0x00000000
/*------------------------------------------------------------------*/
/* Power Saver definitions */
/*------------------------------------------------------------------*/
#define PSVR_BASE 0x02AC0000
#define PSVR_LCKREG (*(volatile Uint32*)(PSVR_BASE + 0x00000004))
#define PSVR_MDCTL0 (*(volatile Uint32*)(PSVR_BASE + 0x00000008))
#define PSVR_MDSTAT0 (*(volatile Uint32*)(PSVR_BASE + 0x00000014))
#define PSVR_EMIFCLKGATE (*(volatile Uint32*)(PSVR_BASE + 0x0000002C))
#define PSVR_LCKVAL 0x0F0A0B00
#define PSVR_HPIEN 0x00040000
#define PSVR_HPISTS 0x08000000
/*------------------------------------------------------------------*/
/* Power Down Mode Definations */
/*-------------------------------------------------------------------*/
#define PDC_BASE 0x01810000
#define PSC 0x02AE0000
/*-------------------------------------------------------------------*/
/*------------------------------------------------------------------*/
/* Configuration Registers of UHPITB */
/*------------------------------------------------------------------*/
#define TB_UHPI_CR (*(volatile Uint32*)(0xD01FFFC0))
#define TB_UHPI_BSAR (*(volatile Uint32*)(0xD01FFFC4))
#define TB_UHPI_BDAR (*(volatile Uint32*)(0xD01FFFC8))
#define TB_UHPI_BLEN (*(volatile Uint32*)(0xD01FFFCC))
#define TB_UHPI_SR (*(volatile Uint32*)(0xD01FFFD0))
#define TB_UHPI_CSAR (*(volatile Uint32*)(0xD01FFFD4))
#define TB_UPHI_HAIR (*(volatile Uint32*)(0xD01FFFD8))
/*------------------------------------------------------------------*/
/* Bits of TB_UHPI_CR to select the mode */
/*------------------------------------------------------------------*/
#define BOOTMODE 0x00000002
#define TBMODE 0x00000001
#define FASTWRITE_MODE 0x00000008
#define FASTREAD_MODE 0x00000010
/*------------------------------------------------------------------*/
/* Opcodes for loading into SPM command buffer */
/*------------------------------------------------------------------*/
#define HPID_WRF_D 0x0000
#define HPID_WRF_P 0x0001
#define HPID_WRB 0x0002
#define HPID_WRB_POLL 0x0003
#define HPID_WRF_POLL_D 0x0004
#define HPID_WRF_POLL_P 0x0005
#define HPIA_WR 0x0006
#define HPIC_WR 0x0007
#define HPID_RDF 0x0008
#define HPID_RDB 0x0009
#define HPID_RDF_POLL 0x000A
#define HPID_RDB_POLL 0x000B
#define HPIA_RD 0x000C
#define HPIC_RD 0x000D
#define HINT_WT 0x000E
#define SLEEP 0x000F
#define TC_END 0xFFFF
/*------------------------------------------------------------------*/
/* Definitions for the Length */
/*------------------------------------------------------------------*/
#define DEF_LEN 0x0000
#define ZERO16 0x0000
#define ZERO32 0x00000000
#define SPM_BASE_ADDR 0xD0100000
/*****************************************************************************\
* End of hpi_const.h
\*****************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -