

#define SSP_CONTROL0                0x0
#define SSP_CONTROL2                0x8
#define SSP_STATUS                  0xC
#define SSP_INT_CONTROL             0X10
#define SSP_DATA                    0x18
#define SSP_INFO					0x1C
#define SSP_ACLINK_SLOT_VALID		0x20
                        	      
/*  Control register 0  */
#define AC97_Format              	0x4000

/* Control Register 2 */

#define SSP_ACCRST                  0x20 	 /* AC-Link Cold Reset Enable */
#define SSP_TXFCLR                  0x8	 	 /* TX FIFO Clear */
#define SSP_RXFCLR                  0x4	 	 /* RX FIFO Clear */
#define SSP_TXDOE                   0x2	 	 /* TX Data Output Enable */
#define SSP_SSPEN                   0x1		 /* SSP Enable */

/* Status register */

#define SSP_TFVE                    0x1f000	 /* Tx FIFO Valid Entries */

/* SSP Design Information Register */
#define SSP_TXFIFO_DEPTH			0xFF0000

/*  -------------------------------------------------------------------------------
 *   API
 *  -------------------------------------------------------------------------------
 */

extern void fLib_SetSSPFrame(UINT32 base_address,UINT32 frame);
extern void fLib_SSPClearTxFIFO(UINT32 base_address);
extern void fLib_SSPClearRxFIFO(UINT32 base_address);
extern void fLib_SetSSP_ColdReset(UINT32 base_address);
extern void fLib_SetSSP_Enable(UINT32 base_address,int enable);
extern void fLib_SetSSP_IntMask(UINT32 base_address,int Mask);
extern void fLib_AC97_SetSlotValidReg(UINT32 base_address,UINT32 SlotValid);
extern void fLib_AC97_WriteData(UINT32 base_address,UINT32 *data, UINT32 Len);
extern void fLib_SSP_GetTxFIFOLen(UINT32 base_address);
extern void fLib_AC97_WriteRegisterEx(UINT32 base_address,UINT32 Reg_Index, UINT32 data);

