Lines Matching refs:vport

183 static int sc6000_wait_data(char __iomem *vport)  in sc6000_wait_data()  argument
189 val = ioread8(vport + DSP_DATAVAIL); in sc6000_wait_data()
198 static int sc6000_read(char __iomem *vport) in sc6000_read() argument
200 if (sc6000_wait_data(vport)) in sc6000_read()
203 return ioread8(vport + DSP_READ); in sc6000_read()
207 static int sc6000_write(struct device *devptr, char __iomem *vport, int cmd) in sc6000_write() argument
213 val = ioread8(vport + DSP_STATUS); in sc6000_write()
218 iowrite8(cmd, vport + DSP_COMMAND); in sc6000_write()
230 char __iomem *vport, int command, in sc6000_dsp_get_answer() argument
235 if (sc6000_write(devptr, vport, command)) { in sc6000_dsp_get_answer()
241 int val = sc6000_read(vport); in sc6000_dsp_get_answer()
257 static int sc6000_dsp_reset(char __iomem *vport) in sc6000_dsp_reset() argument
259 iowrite8(1, vport + DSP_RESET); in sc6000_dsp_reset()
261 iowrite8(0, vport + DSP_RESET); in sc6000_dsp_reset()
263 if (sc6000_read(vport) == 0xaa) in sc6000_dsp_reset()
270 char __iomem *vport, const int *cfg) in sc6000_hw_cfg_write() argument
272 if (sc6000_write(devptr, vport, COMMAND_6C) < 0) { in sc6000_hw_cfg_write()
276 if (sc6000_write(devptr, vport, COMMAND_5C) < 0) { in sc6000_hw_cfg_write()
280 if (sc6000_write(devptr, vport, cfg[0]) < 0) { in sc6000_hw_cfg_write()
284 if (sc6000_write(devptr, vport, cfg[1]) < 0) { in sc6000_hw_cfg_write()
288 if (sc6000_write(devptr, vport, COMMAND_C5) < 0) { in sc6000_hw_cfg_write()
297 char __iomem *vport, unsigned char softcfg) in sc6000_cfg_write() argument
300 if (sc6000_write(devptr, vport, WRITE_MDIRQ_CFG)) { in sc6000_cfg_write()
304 if (sc6000_write(devptr, vport, softcfg)) { in sc6000_cfg_write()
312 char __iomem *vport, int config) in sc6000_setup_board() argument
317 if (sc6000_write(devptr, vport, COMMAND_88)) { in sc6000_setup_board()
322 } while ((sc6000_wait_data(vport) < 0) && loop--); in sc6000_setup_board()
324 if (sc6000_read(vport) < 0) { in sc6000_setup_board()
330 if (sc6000_cfg_write(devptr, vport, config)) in sc6000_setup_board()
337 char __iomem *vport, int config, in sc6000_init_mss() argument
340 if (sc6000_write(devptr, vport, DSP_INIT_MSS)) { in sc6000_init_mss()
348 if (sc6000_cfg_write(devptr, vport, config)) in sc6000_init_mss()
357 char __iomem *vport, int *cfg, in sc6000_hw_cfg_encode() argument
380 char __iomem *vport, in sc6000_init_board() argument
392 err = sc6000_dsp_reset(vport); in sc6000_init_board()
399 err = sc6000_dsp_get_answer(devptr, vport, GET_DSP_COPYRIGHT, answer, 15); in sc6000_init_board()
411 if (sc6000_dsp_get_answer(devptr, vport, GET_DSP_VERSION, version, 2) < 2) { in sc6000_init_board()
419 sc6000_write(devptr, vport, COMMAND_5C); in sc6000_init_board()
420 if (sc6000_read(vport) < 0) in sc6000_init_board()
426 vport, &cfg[0], port[dev], mpu_port[dev], in sc6000_init_board()
428 if (sc6000_hw_cfg_write(devptr, vport, cfg) < 0) { in sc6000_init_board()
433 err = sc6000_setup_board(devptr, vport, config); in sc6000_init_board()
439 sc6000_dsp_reset(vport); in sc6000_init_board()
442 sc6000_write(devptr, vport, COMMAND_60); in sc6000_init_board()
443 sc6000_write(devptr, vport, 0x02); in sc6000_init_board()
444 sc6000_dsp_reset(vport); in sc6000_init_board()
447 err = sc6000_setup_board(devptr, vport, config); in sc6000_init_board()
452 err = sc6000_init_mss(devptr, vport, config, vmss_port, mss_config); in sc6000_init_board()
541 char __iomem *vport = (char __force __iomem *)card->private_data; in snd_sc6000_free() local
543 if (vport) in snd_sc6000_free()
544 sc6000_setup_board(card->dev, vport, 0); in snd_sc6000_free()
557 char __iomem *vport; in __snd_sc6000_probe() local
585 vport = devm_ioport_map(devptr, port[dev], 0x10); in __snd_sc6000_probe()
586 if (!vport) { in __snd_sc6000_probe()
590 card->private_data = (void __force *)vport; in __snd_sc6000_probe()
608 err = sc6000_init_board(devptr, vport, vmss_port, dev); in __snd_sc6000_probe()