/*********************************************************************************

Copyright(c) 2005 Analog Devices, Inc. All Rights Reserved. 

This software is proprietary and confidential.  By using this software you agree
to the terms of the associated Analog Devices License Agreement.  
			
*********************************************************************************/


/*********************************************************************

Include files

*********************************************************************/
#include <services/services.h>		// system service includes
#include <drivers/adi_dev.h>        // device driver includes


/*********************************************************************

Warn user against using this file from the common area

*********************************************************************/
//#warning ** Do not use adi_ssl_Init.h and adi_ssl_Init.c from the common area. \
//Copy adi_ssl_Init.h and adi_ssl_Init.c to your local directory, edit adi_ssl_Init.h \
//to set the sizings appropriately, then comment out this line from adi_ssl_Init.h **

/*********************************************************************

Definitions/Sizings

The user should modify the values in parenthesis as needed by their
application.

*********************************************************************/

#define ADI_SSL_INT_NUM_SECONDARY_HANDLERS  (0) // number of secondary interrupt handlers
#define ADI_SSL_DCB_NUM_SERVERS             (0) // number of DCB servers
#define ADI_SSL_DMA_NUM_CHANNELS            (0) // number of DMA channels
#define ADI_SSL_FLAG_NUM_CALLBACKS          (0) // number of flag callbacks
#define ADI_SSL_SEM_NUM_SEMAPHORES          (0) // number of semaphores

#define ADI_SSL_DEV_NUM_DEVICES             (0) // number of device drivers


/***********************************************************************

 PLEASE READ THE FOLLOWING SECTIONS CAREFULLY.  If you do not define the following macros 
 according to your hardware, your applications may not work properly.

***********************************************************************/


/***********************************************************************

 IMPORTANT for ADSP-BF561 applications!!  If building a dual core application for ADSP-BF561 
 which uses the SSL power management module on BOTH cores, then uncomment the following.  
 If core B only idles and does not call 'adi_pwr_Init', then leave this line commented out.

***********************************************************************/

// #define ADI_SSL_DUAL_CORE                   

/***********************************************************************

 IMPORTANT for ADSP-BF533 applications!!  If using the ADSP-BF533 EZ-Kit Rev 1.7 or newer, 
 SDRAM can be configured for 64MB, 10-bit address width, with the definition below: ADI_SSL_EDIN_REV_1_7.

 Beginning with the VisualDSP 5.0 Update 1, this is defined by default.

 In previous VisualDSP releases, it is commented out by default for backward compatibility.

 Explanation: If developing with the VisualDSP IDDE, and "Use XML reset values" is selected in 
 Settings->Target Options, prior to the program being loaded, SDRAM will be configured according 
 to the values in "ADSP-BF533-proc.xml" found in the VisualDSP installation folder: ".../System/ArchDef".  

 The XML reset values should agree with this definition.

 The XML file can be edited or VisualDSP5.0 custom board support can be used to create a custom XML file.  

 If booting the application from flash, be sure that the SDRAM initialization code in the boot stream agrees 
 with the SDRAM configuration in the application.  

 If using a Rev 1.6 EZ-Kit or older, comment out the following line. 

***********************************************************************/
 
#define ADI_SSL_EDIN_REV_1_7                

/***********************************************************************

 CAUTION!! for ADSP-BF533 applications.  ADSP-BF533 part number ending in "6V" have different power management 
 requirements from other part numbers.  If you DO NOT have one of these parts, comment out the following macro,
 which is defined by default. If you DO have one of these parts, leave the following line as it is.

***********************************************************************/
 
#define ADI_SSL_BF533_6V 

/***********************************************************************

Handles to Services

Declare the handles to the various services and device manager.  These
handles can be used after the adi_ssl_Init() call.  

DO NOT MODIFY THIS SECTION

*********************************************************************/

extern ADI_DMA_MANAGER_HANDLE adi_dma_ManagerHandle;   // handle to the DMA manager
extern ADI_DEV_MANAGER_HANDLE adi_dev_ManagerHandle;   // handle to the device manager


/*********************************************************************

Critical Region Parameter

This is the value that is pased to the adi_int_EnterCriticalRegion()
function call.  This value is NULL for all current implementations.

DO NOT MODIFY THIS SECTION

*********************************************************************/

#define ADI_SSL_ENTER_CRITICAL (NULL)




/*********************************************************************

Function Declarations

Declare the intialization and termination functions.

DO NOT MODIFY THIS SECTION

*********************************************************************/

#if defined __cplusplus
    extern "C" {
#endif


u32 adi_ssl_Init(void);
u32 adi_ssl_Terminate(void);


#if defined __cplusplus
    }
#endif



