(mop_operands & WIDE_LADD_INSTR_MASK) == 0 &&
(mop_operands & WIDE_INSTR_MASK) != 0) {
wide_op = loval & 0x7f;
- for (j = 0;j < sizeof(wide_opcodes) / sizeof(wide_opcode_t); ++j) {
+ for (j = 0;j < ARRAY_SIZE(wide_opcodes); ++j) {
if (wide_opcodes[j] == wide_op) {
/* need to reallocate instruction */
address = (hival & 0x00FFF) << 5;
static void cs46xx_dsp_proc_symbol_table_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer)
{
- cs46xx_t *chip = snd_magic_cast(cs46xx_t, entry->private_data, return);
+ cs46xx_t *chip = entry->private_data;
dsp_spos_instance_t * ins = chip->dsp_spos_instance;
int i;
static void cs46xx_dsp_proc_modules_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer)
{
- cs46xx_t *chip = snd_magic_cast(cs46xx_t, entry->private_data, return);
+ cs46xx_t *chip = entry->private_data;
dsp_spos_instance_t * ins = chip->dsp_spos_instance;
int i,j;
static void cs46xx_dsp_proc_task_tree_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer)
{
- cs46xx_t *chip = snd_magic_cast(cs46xx_t, entry->private_data, return);
+ cs46xx_t *chip = entry->private_data;
dsp_spos_instance_t * ins = chip->dsp_spos_instance;
int i,j,col;
unsigned long dst = chip->region.idx[1].remap_addr + DSP_PARAMETER_BYTE_OFFSET;
static void cs46xx_dsp_proc_scb_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer)
{
- cs46xx_t *chip = snd_magic_cast(cs46xx_t, entry->private_data, return);
+ cs46xx_t *chip = entry->private_data;
dsp_spos_instance_t * ins = chip->dsp_spos_instance;
int i;
static void cs46xx_dsp_proc_parameter_dump_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer)
{
- cs46xx_t *chip = snd_magic_cast(cs46xx_t, entry->private_data, return);
+ cs46xx_t *chip = entry->private_data;
/*dsp_spos_instance_t * ins = chip->dsp_spos_instance; */
unsigned int i,col = 0;
unsigned long dst = chip->region.idx[1].remap_addr + DSP_PARAMETER_BYTE_OFFSET;
static void cs46xx_dsp_proc_sample_dump_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer)
{
- cs46xx_t *chip = snd_magic_cast(cs46xx_t, entry->private_data, return);
+ cs46xx_t *chip = entry->private_data;
int i,col = 0;
unsigned long dst = chip->region.idx[2].remap_addr;
int fifo_addr,fifo_span,valid_slots;
- spos_control_block_t sposcb = {
+ static spos_control_block_t sposcb = {
/* 0 */ HFG_TREE_SCB,HFG_STACK,
/* 1 */ SPOSCB_ADDR,BG_TREE_SCB_ADDR,
/* 2 */ DSP_SPOS_DC,0,
{
/* create the null SCB */
- generic_scb_t null_scb = {
+ static generic_scb_t null_scb = {
{ 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0 },
NULL_SCB_ADDR, NULL_SCB_ADDR,
- null_algorithm->address, 0,
- 0,0,0,
+ 0, 0, 0, 0, 0,
{
0,0,
0,0,
}
};
+ null_scb.entry_point = null_algorithm->address;
ins->the_null_scb = cs46xx_dsp_create_scb(chip, "nullSCB", (u32 *)&null_scb, NULL_SCB_ADDR);
ins->the_null_scb->task_entry = null_algorithm;
ins->the_null_scb->sub_list_ptr = ins->the_null_scb;
{
/* setup foreground task tree */
- task_tree_control_block_t fg_task_tree_hdr = {
+ static task_tree_control_block_t fg_task_tree_hdr = {
{ FG_TASK_HEADER_ADDR | (DSP_SPOS_DC << 0x10),
DSP_SPOS_DC_DC,
DSP_SPOS_DC_DC,
{
BG_TREE_SCB_ADDR,TIMINGMASTER_SCB_ADDR,
- fg_task_tree_header_code->address,
+ 0,
FG_TASK_HEADER_ADDR + TCBData,
},
},
{
- DSP_SPOS_DC,task_tree_thread->address,
+ DSP_SPOS_DC,0,
DSP_SPOS_DC,DSP_SPOS_DC,
DSP_SPOS_DC,DSP_SPOS_DC,
DSP_SPOS_DC,DSP_SPOS_DC,
}
};
+ fg_task_tree_hdr.links.entry_point = fg_task_tree_header_code->address;
+ fg_task_tree_hdr.context_blk.stack0 = task_tree_thread->address;
cs46xx_dsp_create_task_tree(chip,"FGtaskTreeHdr",(u32 *)&fg_task_tree_hdr,FG_TASK_HEADER_ADDR,0x35);
}
{
/* setup foreground task tree */
- task_tree_control_block_t bg_task_tree_hdr = {
+ static task_tree_control_block_t bg_task_tree_hdr = {
{ DSP_SPOS_DC_DC,
DSP_SPOS_DC_DC,
DSP_SPOS_DC_DC,
{
NULL_SCB_ADDR,NULL_SCB_ADDR, /* Set up the background to do nothing */
- task_tree_header_code->address,
+ 0,
BG_TREE_SCB_ADDR + TCBData,
},
},
{
- DSP_SPOS_DC,task_tree_thread->address,
+ DSP_SPOS_DC,0,
DSP_SPOS_DC,DSP_SPOS_DC,
DSP_SPOS_DC,DSP_SPOS_DC,
DSP_SPOS_DC,DSP_SPOS_DC,
0,0
}
};
+
+ bg_task_tree_hdr.links.entry_point = task_tree_header_code->address;
+ bg_task_tree_hdr.context_blk.stack0 = task_tree_thread->address;
cs46xx_dsp_create_task_tree(chip,"BGtaskTreeHdr",(u32 *)&bg_task_tree_hdr,BG_TREE_SCB_ADDR,0x35);
}
if (!write_back_scb) goto _fail_end;
{
- mix2_ostream_spb_t mix2_ostream_spb = {
+ static mix2_ostream_spb_t mix2_ostream_spb = {
0x00020000,
0x0000ffff
};