/*                                                                          */
/* Function    : manages initialization flow                                */
/*                                                                          */
/* Used By     : DSP                                                        */
/*                                                                          */
/*                                                                          */

#include  "windef.h"
#include  "mbdr_dsp_cpu_common_hwimage.h"
#include  "mbdr_dsp_common_sync_msg.h"

#ifndef _MBDR_DSP_COMMON_MAIN_INIT_MANAGER_H_
#define _MBDR_DSP_COMMON_MAIN_INIT_MANAGER_H_

extern ULONG mbdr_dsp_disable_get_flags;

typedef struct
{
 LONG  init_value; /* value to initialize       */
 LONG *dw_p;       /* address of initialized DW */
}mbdr_dsp_main_init_manager_params_init_list_entry_t;

#define MBDR_DSP_MAIN_INIT_MANAGER_PARAMS_INIT_LIST_SIZE 8

typedef struct
{

  mbdr_dsp_main_init_manager_params_init_list_entry_t
            init_list[MBDR_DSP_MAIN_INIT_MANAGER_PARAMS_INIT_LIST_SIZE];

  void  (*internal_peripherals_init_proc_p)(void);

  /* mbdr_dsp_cpu_common_interface_t address in DSP memory */
  mbdr_dsp_cpu_common_interface_t *common_interface_dsp_image_p;

  /* enables application to prepare:                             */
  /*          mbdr_dsp_platform_external_io_access_proc_ptrs_tbl */
  /*          mbdr_dsp_platform_core_process_proc_ptrs_tbl       */
  void  (*multi_core_platform_init_hook_proc_p)(
             mbdr_dsp_common_config_multi_core_t pi_config_multi_core);

}mbdr_dsp_main_init_manager_params_t;


extern void mbdr_dsp_common_main_init_manager(
              const mbdr_dsp_main_init_manager_params_t
                             *pi_mbdr_dsp_main_init_manager_params_p);

/*  routine can be used for dummy initilization, for                         */
/*  mbdr_dsp_main_init_manager_params_t.multi_core_platform_init_hook_proc_p */
extern void mbdr_dsp_common_main_init_multi_core_platform_init_hook_dummy(
             mbdr_dsp_common_config_multi_core_t pi_config_multi_core);

/*  called by main loop while                                          */
extern void mbdr_dsp_main_kernel_loop(void);


/*  called from main */
extern void mbdr_dsp_chip_peripherals_init(void);

#endif
