}
/* enable audio ddr arb */
mask_bit = i;
- aml_audiobus_update_bits(actrl, EE_AUDIO_ARB_CTRL,
- 1<<31|1<<mask_bit, 1<<31|1<<mask_bit);
+ /*aml_audiobus_update_bits(actrl, EE_AUDIO_ARB_CTRL,*/
+ /* (1 << 31)|(1 << mask_bit),*/
+ /* (1 << 31)|(1 << mask_bit));*/
to->dev = dev;
to->actrl = actrl;
/* disable audio ddr arb */
mask_bit = i;
actrl = to->actrl;
- aml_audiobus_update_bits(actrl, EE_AUDIO_ARB_CTRL,
- 1<<mask_bit, 0<<mask_bit);
+ /*aml_audiobus_update_bits(actrl, EE_AUDIO_ARB_CTRL,*/
+ /* 1 << mask_bit, 0 << mask_bit);*/
+
/* no ddr active, disable arb switch */
value = aml_audiobus_read(actrl, EE_AUDIO_ARB_CTRL) & 0x77;
- if (value == 0)
- aml_audiobus_update_bits(actrl, EE_AUDIO_ARB_CTRL,
- 1<<31, 0<<31);
+ /*if (value == 0)*/
+ /* aml_audiobus_update_bits(actrl, EE_AUDIO_ARB_CTRL,*/
+ /* 1 << 31, 0 << 31);*/
free_irq(to->irq, data);
to->dev = NULL;
reg = calc_toddr_address(EE_AUDIO_TODDR_A_INT_ADDR, reg_base);
aml_audiobus_write(actrl, reg, intrpt);
reg = calc_toddr_address(EE_AUDIO_TODDR_A_CTRL0, reg_base);
- aml_audiobus_update_bits(actrl, reg, 0xff<<16, 4<<16);
+ aml_audiobus_update_bits(actrl, reg, 0xff << 16, 0x34 << 16);
return 0;
}
/* reset to default, current write addr */
aml_audiobus_update_bits(actrl, reg_sel,
0xf << 8,
- 0x0 << 8);
+ 0x2 << 8);
return addr;
}
aml_audiobus_write(actrl, reg, val);
}
+
+unsigned int aml_toddr_read1(struct toddr *to)
+{
+ struct aml_audio_controller *actrl = to->actrl;
+ unsigned int reg_base = to->reg_base;
+ unsigned int reg;
+
+ reg = calc_toddr_address(EE_AUDIO_TODDR_A_CTRL1, reg_base);
+
+ return aml_audiobus_read(actrl, reg);
+}
+
+void aml_toddr_write1(struct toddr *to, unsigned int val)
+{
+ struct aml_audio_controller *actrl = to->actrl;
+ unsigned int reg_base = to->reg_base;
+ unsigned int reg;
+
+ reg = calc_toddr_address(EE_AUDIO_TODDR_A_CTRL1, reg_base);
+
+ aml_audiobus_write(actrl, reg, val);
+}
+
+unsigned int aml_toddr_read_status2(struct toddr *to)
+{
+ struct aml_audio_controller *actrl = to->actrl;
+ unsigned int reg_base = to->reg_base;
+ unsigned int reg;
+
+ reg = calc_toddr_address(EE_AUDIO_TODDR_A_STATUS2, reg_base);
+
+ return aml_audiobus_read(actrl, reg);
+}
+
/* not for tl1 */
static void aml_toddr_set_resample(struct toddr *to, bool enable)
{
/* enable audio ddr arb */
mask_bit = i + 4;
- aml_audiobus_update_bits(actrl, EE_AUDIO_ARB_CTRL,
- 1<<31|1<<mask_bit, 1<<31|1<<mask_bit);
+ /*aml_audiobus_update_bits(actrl, EE_AUDIO_ARB_CTRL,*/
+ /* (1 << 31)|(1 << mask_bit),*/
+ /* (1 << 31)|(1 << mask_bit));*/
/* irqs request */
ret = request_irq(from->irq, handler,
/* disable audio ddr arb */
mask_bit = i + 4;
actrl = from->actrl;
- aml_audiobus_update_bits(actrl, EE_AUDIO_ARB_CTRL,
- 1<<mask_bit, 0<<mask_bit);
+ /*aml_audiobus_update_bits(actrl, EE_AUDIO_ARB_CTRL,*/
+ /* 1 << mask_bit, 0 << mask_bit);*/
+
/* no ddr active, disable arb switch */
value = aml_audiobus_read(actrl, EE_AUDIO_ARB_CTRL) & 0x77;
- if (value == 0)
- aml_audiobus_update_bits(actrl, EE_AUDIO_ARB_CTRL,
- 1<<31, 0<<31);
+ /*if (value == 0)*/
+ /* aml_audiobus_update_bits(actrl, EE_AUDIO_ARB_CTRL,*/
+ /* 1 << 31, 0 << 31);*/
free_irq(from->irq, data);
from->dev = NULL;