#define SOURCEFILE_NAME …
#include "hpi_internal.h"
#include "hpimsginit.h"
#include "hpidebug.h"
#include "hpi6205.h"
#include "hpidspcd.h"
#include "hpicmn.h"
#define HPI6205_ERROR_BASE …
#define HPI6205_ERROR_MSG_RESP_IDLE_TIMEOUT …
#define HPI6205_ERROR_MSG_RESP_TIMEOUT …
#define HPI6205_ERROR_6205_NO_IRQ …
#define HPI6205_ERROR_6205_INIT_FAILED …
#define HPI6205_ERROR_6205_REG …
#define HPI6205_ERROR_6205_DSPPAGE …
#define HPI6205_ERROR_C6713_HPIC …
#define HPI6205_ERROR_C6713_HPIA …
#define HPI6205_ERROR_C6713_PLL …
#define HPI6205_ERROR_DSP_INTMEM …
#define HPI6205_ERROR_DSP_EXTMEM …
#define HPI6205_ERROR_DSP_PLD …
#define HPI6205_ERROR_6205_EEPROM …
#define HPI6205_ERROR_DSP_EMIF1 …
#define HPI6205_ERROR_DSP_EMIF2 …
#define HPI6205_ERROR_DSP_EMIF3 …
#define HPI6205_ERROR_DSP_EMIF4 …
#define C6205_HSR_INTSRC …
#define C6205_HSR_INTAVAL …
#define C6205_HSR_INTAM …
#define C6205_HSR_CFGERR …
#define C6205_HSR_EEREAD …
#define C6205_HDCR_WARMRESET …
#define C6205_HDCR_DSPINT …
#define C6205_HDCR_PCIBOOT …
#define C6205_DSPP_MAP1 …
#define C6205_BAR1_PCI_IO_OFFSET …
#define C6205_BAR1_HSR …
#define C6205_BAR1_HDCR …
#define C6205_BAR1_DSPP …
#define C6205_BAR0_TIMER1_CTL …
#define HPICL_ADDR …
#define HPICH_ADDR …
#define HPIAL_ADDR …
#define HPIAH_ADDR …
#define HPIDIL_ADDR …
#define HPIDIH_ADDR …
#define HPIDL_ADDR …
#define HPIDH_ADDR …
#define C6713_EMIF_GCTL …
#define C6713_EMIF_CE1 …
#define C6713_EMIF_CE0 …
#define C6713_EMIF_CE2 …
#define C6713_EMIF_CE3 …
#define C6713_EMIF_SDRAMCTL …
#define C6713_EMIF_SDRAMTIMING …
#define C6713_EMIF_SDRAMEXT …
struct hpi_hw_obj { … };
#define check_before_bbm_copy(status, p_bbm_data, l_first_write, l_second_write) …
static int wait_dsp_ack(struct hpi_hw_obj *phw, int state, int timeout_us);
static void send_dsp_command(struct hpi_hw_obj *phw, int cmd);
static u16 adapter_boot_load_dsp(struct hpi_adapter_obj *pao,
u32 *pos_error_code);
static u16 message_response_sequence(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static void hw_message(struct hpi_adapter_obj *pao, struct hpi_message *phm,
struct hpi_response *phr);
#define HPI6205_TIMEOUT …
static void subsys_create_adapter(struct hpi_message *phm,
struct hpi_response *phr);
static void adapter_delete(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static u16 create_adapter_obj(struct hpi_adapter_obj *pao,
u32 *pos_error_code);
static void delete_adapter_obj(struct hpi_adapter_obj *pao);
static int adapter_irq_query_and_clear(struct hpi_adapter_obj *pao,
u32 message);
static void outstream_host_buffer_allocate(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static void outstream_host_buffer_get_info(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static void outstream_host_buffer_free(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static void outstream_write(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static void outstream_get_info(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static void outstream_start(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static void outstream_open(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static void outstream_reset(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static void instream_host_buffer_allocate(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static void instream_host_buffer_get_info(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static void instream_host_buffer_free(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static void instream_read(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static void instream_get_info(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static void instream_start(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static u32 boot_loader_read_mem32(struct hpi_adapter_obj *pao, int dsp_index,
u32 address);
static void boot_loader_write_mem32(struct hpi_adapter_obj *pao,
int dsp_index, u32 address, u32 data);
static u16 boot_loader_config_emif(struct hpi_adapter_obj *pao,
int dsp_index);
static u16 boot_loader_test_memory(struct hpi_adapter_obj *pao, int dsp_index,
u32 address, u32 length);
static u16 boot_loader_test_internal_memory(struct hpi_adapter_obj *pao,
int dsp_index);
static u16 boot_loader_test_external_memory(struct hpi_adapter_obj *pao,
int dsp_index);
static u16 boot_loader_test_pld(struct hpi_adapter_obj *pao, int dsp_index);
static void subsys_message(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr)
{ … }
static void control_message(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr)
{ … }
static void adapter_message(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr)
{ … }
static void outstream_message(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr)
{ … }
static void instream_message(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr)
{ … }
static
void _HPI_6205(struct hpi_adapter_obj *pao, struct hpi_message *phm,
struct hpi_response *phr)
{ … }
void HPI_6205(struct hpi_message *phm, struct hpi_response *phr)
{ … }
static void subsys_create_adapter(struct hpi_message *phm,
struct hpi_response *phr)
{ … }
static void adapter_delete(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr)
{ … }
static u16 create_adapter_obj(struct hpi_adapter_obj *pao,
u32 *pos_error_code)
{ … }
static void delete_adapter_obj(struct hpi_adapter_obj *pao)
{ … }
static int adapter_irq_query_and_clear(struct hpi_adapter_obj *pao,
u32 message)
{ … }
static void outstream_host_buffer_allocate(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr)
{ … }
static void outstream_host_buffer_get_info(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr)
{ … }
static void outstream_host_buffer_free(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr)
{ … }
static u32 outstream_get_space_available(struct hpi_hostbuffer_status *status)
{ … }
static void outstream_write(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr)
{ … }
static void outstream_get_info(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr)
{ … }
static void outstream_start(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr)
{ … }
static void outstream_reset(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr)
{ … }
static void outstream_open(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr)
{ … }
static void instream_host_buffer_allocate(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr)
{ … }
static void instream_host_buffer_get_info(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr)
{ … }
static void instream_host_buffer_free(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr)
{ … }
static void instream_start(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr)
{ … }
static u32 instream_get_bytes_available(struct hpi_hostbuffer_status *status)
{ … }
static void instream_read(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr)
{ … }
static void instream_get_info(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr)
{ … }
#define HPI6205_MAX_FILES_TO_LOAD …
static u16 adapter_boot_load_dsp(struct hpi_adapter_obj *pao,
u32 *pos_error_code)
{ … }
static u32 boot_loader_read_mem32(struct hpi_adapter_obj *pao, int dsp_index,
u32 address)
{ … }
static void boot_loader_write_mem32(struct hpi_adapter_obj *pao,
int dsp_index, u32 address, u32 data)
{ … }
static u16 boot_loader_config_emif(struct hpi_adapter_obj *pao, int dsp_index)
{ … }
static u16 boot_loader_test_memory(struct hpi_adapter_obj *pao, int dsp_index,
u32 start_address, u32 length)
{ … }
static u16 boot_loader_test_internal_memory(struct hpi_adapter_obj *pao,
int dsp_index)
{ … }
static u16 boot_loader_test_external_memory(struct hpi_adapter_obj *pao,
int dsp_index)
{ … }
static u16 boot_loader_test_pld(struct hpi_adapter_obj *pao, int dsp_index)
{ … }
static short hpi6205_transfer_data(struct hpi_adapter_obj *pao, u8 *p_data,
u32 data_size, int operation)
{ … }
static int wait_dsp_ack(struct hpi_hw_obj *phw, int state, int timeout_us)
{ … }
static void send_dsp_command(struct hpi_hw_obj *phw, int cmd)
{ … }
static unsigned int message_count;
static u16 message_response_sequence(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr)
{ … }
static void hw_message(struct hpi_adapter_obj *pao, struct hpi_message *phm,
struct hpi_response *phr)
{ … }