summaryrefslogtreecommitdiff
path: root/xhfc/xhfc.c
diff options
context:
space:
mode:
Diffstat (limited to 'xhfc/xhfc.c')
-rw-r--r--xhfc/xhfc.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/xhfc/xhfc.c b/xhfc/xhfc.c
index afcf70c..e8d99ae 100644
--- a/xhfc/xhfc.c
+++ b/xhfc/xhfc.c
@@ -145,24 +145,29 @@ void xhfc_config_st(struct xhfc *x, int port, int nt)
*/
int xhfc_config_pcm(struct xhfc *xhfc, int master_or_slave)
{
- SET_V_F0_LEN(xhfc->r_pcm_md0, 1);
+ u8 r_pcm_md0 = 0;
- write_xhfc(xhfc, R_PCM_MD0, SET_V_PCM_IDX(xhfc->r_pcm_md0, 0x9));
+ SET_V_F0_LEN(r_pcm_md0, 1);
+
+ write_xhfc(xhfc, R_PCM_MD0, SET_V_PCM_IDX(r_pcm_md0, 0x9));
/* use slow PCM clock adjust speed */
write_xhfc(xhfc, R_PCM_MD1, M_PLL_ADJ | M_PCM_OD | V_PCM_DR_2M);
if (master_or_slave == XHFC_PCM_MASTER) {
write_xhfc(xhfc, R_PCM_MD0,
- SET_V_PCM_IDX(xhfc->r_pcm_md0, 0xA));
+ SET_V_PCM_IDX(r_pcm_md0, 0xA));
/* enable PCM bit clk for C2O pin */
write_xhfc(xhfc, R_PCM_MD2, M_C2O_EN);
} else {
write_xhfc(xhfc, R_PCM_MD0,
- SET_V_PCM_IDX(xhfc->r_pcm_md0, 0xA));
+ SET_V_PCM_IDX(r_pcm_md0, 0xA));
write_xhfc(xhfc, R_PCM_MD2, M_C2I_EN);
}
- write_xhfc(xhfc, R_PCM_MD0, SET_V_PCM_IDX(xhfc->r_pcm_md0, 0x0));
+ /* this could maybe be done sooner, but right now I'm limiting
+ * the number of changes */
+ write_xhfc(xhfc, R_PCM_MD0, SET_V_PCM_IDX(r_pcm_md0, 0x0)
+ | M_PCM_MD | M_C4_POL);
return 0;
}
@@ -625,10 +630,8 @@ static void enable_interrupts(struct xhfc * xhfc)
set_mb(xhfc->running, 1);
- /* set PCM master mode */
- write_xhfc(xhfc, R_PCM_MD0, M_PCM_MD | M_C4_POL | xhfc->r_pcm_md0);
-
- write_xhfc(xhfc, R_TI_WD, 0x02); // timer interrupt every 1 ms
+ /* timer interrupt every 1 ms */
+ write_xhfc(xhfc, R_TI_WD, 0x02);
write_xhfc(xhfc, R_MISC_IRQMSK, M_TI_IRQMSK);
/* clear all pending interrupts bits */
@@ -1039,8 +1042,6 @@ int __devinit xhfc_init_one(struct pci_dev *pdev,
if (rc < 0)
goto err_acpi_register;
- pi->xhfc.r_pcm_md0 = 0;
-
/********
* test *