Lines Matching +full:1000 +full:base +full:- +full:kx

1 // SPDX-License-Identifier: GPL-2.0-only
76 * Fixed-point value in 8.24 format for parameter channel */
88 u16 czbfs:1; /* Clear Z-Buffers */
162 return -ENOMEM; in src_get_rsc_ctrl_blk()
180 set_field(&ctl->ctl, SRCCTL_STATE, state); in src_set_state()
181 ctl->dirty.bf.ctl = 1; in src_set_state()
189 set_field(&ctl->ctl, SRCCTL_BM, bm); in src_set_bm()
190 ctl->dirty.bf.ctl = 1; in src_set_bm()
198 set_field(&ctl->ctl, SRCCTL_RSR, rsr); in src_set_rsr()
199 ctl->dirty.bf.ctl = 1; in src_set_rsr()
207 set_field(&ctl->ctl, SRCCTL_SF, sf); in src_set_sf()
208 ctl->dirty.bf.ctl = 1; in src_set_sf()
216 set_field(&ctl->ctl, SRCCTL_WR, wr); in src_set_wr()
217 ctl->dirty.bf.ctl = 1; in src_set_wr()
225 set_field(&ctl->ctl, SRCCTL_PM, pm); in src_set_pm()
226 ctl->dirty.bf.ctl = 1; in src_set_pm()
234 set_field(&ctl->ctl, SRCCTL_ROM, rom); in src_set_rom()
235 ctl->dirty.bf.ctl = 1; in src_set_rom()
243 set_field(&ctl->ctl, SRCCTL_VO, vo); in src_set_vo()
244 ctl->dirty.bf.ctl = 1; in src_set_vo()
252 set_field(&ctl->ctl, SRCCTL_ST, st); in src_set_st()
253 ctl->dirty.bf.ctl = 1; in src_set_st()
261 set_field(&ctl->ctl, SRCCTL_IE, ie); in src_set_ie()
262 ctl->dirty.bf.ctl = 1; in src_set_ie()
270 set_field(&ctl->ctl, SRCCTL_ILSZ, ilsz); in src_set_ilsz()
271 ctl->dirty.bf.ctl = 1; in src_set_ilsz()
279 set_field(&ctl->ctl, SRCCTL_BP, bp); in src_set_bp()
280 ctl->dirty.bf.ctl = 1; in src_set_bp()
288 set_field(&ctl->ccr, SRCCCR_CISZ, cisz); in src_set_cisz()
289 ctl->dirty.bf.ccr = 1; in src_set_cisz()
297 set_field(&ctl->ca, SRCCA_CA, ca); in src_set_ca()
298 ctl->dirty.bf.ca = 1; in src_set_ca()
306 set_field(&ctl->sa, SRCSA_SA, sa); in src_set_sa()
307 ctl->dirty.bf.sa = 1; in src_set_sa()
315 set_field(&ctl->la, SRCLA_LA, la); in src_set_la()
316 ctl->dirty.bf.la = 1; in src_set_la()
324 set_field(&ctl->mpr, MPRLH_PITCH, pitch); in src_set_pitch()
325 ctl->dirty.bf.mpr = 1; in src_set_pitch()
331 ((struct src_rsc_ctrl_blk *)blk)->dirty.bf.czbfs = (clear ? 1 : 0); in src_set_clear_zbufs()
337 ((struct src_rsc_ctrl_blk *)blk)->dirty.data = (flags & 0xffff); in src_set_dirty()
343 ((struct src_rsc_ctrl_blk *)blk)->dirty.data = ~(0x0); in src_set_dirty_all()
355 - AR_PARAM_SRC_OFFSET) % AR_SLOT_SIZE; in src_param_pitch_mixer()
364 if (ctl->dirty.bf.czbfs) { in src_commit_write()
365 /* Clear Z-Buffer registers */ in src_commit_write()
375 ctl->dirty.bf.czbfs = 0; in src_commit_write()
377 if (ctl->dirty.bf.mpr) { in src_commit_write()
383 hw_write_20kx(hw, MIXER_PRING_LO_HI+4*pm_idx, ctl->mpr); in src_commit_write()
386 ctl->dirty.bf.mpr = 0; in src_commit_write()
388 if (ctl->dirty.bf.sa) { in src_commit_write()
389 hw_write_20kx(hw, SRC_SA+idx*0x100, ctl->sa); in src_commit_write()
390 ctl->dirty.bf.sa = 0; in src_commit_write()
392 if (ctl->dirty.bf.la) { in src_commit_write()
393 hw_write_20kx(hw, SRC_LA+idx*0x100, ctl->la); in src_commit_write()
394 ctl->dirty.bf.la = 0; in src_commit_write()
396 if (ctl->dirty.bf.ca) { in src_commit_write()
397 hw_write_20kx(hw, SRC_CA+idx*0x100, ctl->ca); in src_commit_write()
398 ctl->dirty.bf.ca = 0; in src_commit_write()
404 if (ctl->dirty.bf.ccr) { in src_commit_write()
405 hw_write_20kx(hw, SRC_CCR+idx*0x100, ctl->ccr); in src_commit_write()
406 ctl->dirty.bf.ccr = 0; in src_commit_write()
408 if (ctl->dirty.bf.ctl) { in src_commit_write()
409 hw_write_20kx(hw, SRC_CTL+idx*0x100, ctl->ctl); in src_commit_write()
410 ctl->dirty.bf.ctl = 0; in src_commit_write()
420 ctl->ca = hw_read_20kx(hw, SRC_CA+idx*0x100); in src_get_ca()
421 ctl->dirty.bf.ca = 0; in src_get_ca()
423 return get_field(ctl->ca, SRCCA_CA); in src_get_ca()
428 return ((struct src_rsc_ctrl_blk *)blk)->dirty.data; in src_get_dirty()
438 ((struct src_mgr_ctrl_blk *)blk)->enbsa |= (0x1 << ((idx%128)/4)); in src_mgr_enbs_src()
439 ((struct src_mgr_ctrl_blk *)blk)->dirty.bf.enbsa = 1; in src_mgr_enbs_src()
440 ((struct src_mgr_ctrl_blk *)blk)->enb[idx/32] |= (0x1 << (idx%32)); in src_mgr_enbs_src()
446 ((struct src_mgr_ctrl_blk *)blk)->enb[idx/32] |= (0x1 << (idx%32)); in src_mgr_enb_src()
447 ((struct src_mgr_ctrl_blk *)blk)->dirty.data |= (0x1 << (idx/32)); in src_mgr_enb_src()
453 ((struct src_mgr_ctrl_blk *)blk)->enb[idx/32] &= ~(0x1 << (idx%32)); in src_mgr_dsb_src()
454 ((struct src_mgr_ctrl_blk *)blk)->dirty.data |= (0x1 << (idx/32)); in src_mgr_dsb_src()
464 if (ctl->dirty.bf.enbsa) { in src_mgr_commit_write()
468 hw_write_20kx(hw, SRC_ENBSA, ctl->enbsa); in src_mgr_commit_write()
469 ctl->dirty.bf.enbsa = 0; in src_mgr_commit_write()
472 if ((ctl->dirty.data & (0x1 << i))) { in src_mgr_commit_write()
473 hw_write_20kx(hw, SRC_ENB+(i*0x100), ctl->enb[i]); in src_mgr_commit_write()
474 ctl->dirty.data &= ~(0x1 << i); in src_mgr_commit_write()
488 return -ENOMEM; in src_mgr_get_ctrl_blk()
509 return -ENOMEM; in srcimp_mgr_get_ctrl_blk()
527 set_field(&ctl->srcimap.srcaim, SRCAIM_ARC, slot); in srcimp_mgr_set_imaparc()
528 ctl->dirty.bf.srcimap = 1; in srcimp_mgr_set_imaparc()
536 set_field(&ctl->srcimap.srcaim, SRCAIM_SRC, user); in srcimp_mgr_set_imapuser()
537 ctl->dirty.bf.srcimap = 1; in srcimp_mgr_set_imapuser()
545 set_field(&ctl->srcimap.srcaim, SRCAIM_NXT, next); in srcimp_mgr_set_imapnxt()
546 ctl->dirty.bf.srcimap = 1; in srcimp_mgr_set_imapnxt()
552 ((struct srcimp_mgr_ctrl_blk *)blk)->srcimap.idx = addr; in srcimp_mgr_set_imapaddr()
553 ((struct srcimp_mgr_ctrl_blk *)blk)->dirty.bf.srcimap = 1; in srcimp_mgr_set_imapaddr()
561 if (ctl->dirty.bf.srcimap) { in srcimp_mgr_commit_write()
562 hw_write_20kx(hw, SRC_IMAP+ctl->srcimap.idx*0x100, in srcimp_mgr_commit_write()
563 ctl->srcimap.srcaim); in srcimp_mgr_commit_write()
564 ctl->dirty.bf.srcimap = 0; in srcimp_mgr_commit_write()
603 set_field(&ctl->amoplo, AMOPLO_M, mode); in amixer_set_mode()
604 ctl->dirty.bf.amoplo = 1; in amixer_set_mode()
612 set_field(&ctl->amoplo, AMOPLO_IV, iv); in amixer_set_iv()
613 ctl->dirty.bf.amoplo = 1; in amixer_set_iv()
621 set_field(&ctl->amoplo, AMOPLO_X, x); in amixer_set_x()
622 ctl->dirty.bf.amoplo = 1; in amixer_set_x()
630 set_field(&ctl->amoplo, AMOPLO_Y, y); in amixer_set_y()
631 ctl->dirty.bf.amoplo = 1; in amixer_set_y()
639 set_field(&ctl->amophi, AMOPHI_SADR, sadr); in amixer_set_sadr()
640 ctl->dirty.bf.amophi = 1; in amixer_set_sadr()
648 set_field(&ctl->amophi, AMOPHI_SE, se); in amixer_set_se()
649 ctl->dirty.bf.amophi = 1; in amixer_set_se()
655 ((struct amixer_rsc_ctrl_blk *)blk)->dirty.data = (flags & 0xffff); in amixer_set_dirty()
661 ((struct amixer_rsc_ctrl_blk *)blk)->dirty.data = ~(0x0); in amixer_set_dirty_all()
669 if (ctl->dirty.bf.amoplo || ctl->dirty.bf.amophi) { in amixer_commit_write()
670 hw_write_20kx(hw, MIXER_AMOPLO+idx*8, ctl->amoplo); in amixer_commit_write()
671 ctl->dirty.bf.amoplo = 0; in amixer_commit_write()
672 hw_write_20kx(hw, MIXER_AMOPHI+idx*8, ctl->amophi); in amixer_commit_write()
673 ctl->dirty.bf.amophi = 0; in amixer_commit_write()
683 return get_field(ctl->amoplo, AMOPLO_Y); in amixer_get_y()
688 return ((struct amixer_rsc_ctrl_blk *)blk)->dirty.data; in amixer_get_dirty()
698 return -ENOMEM; in amixer_rsc_get_ctrl_blk()
818 set_field(&ctl->srt, SRTCTL_SRCO, src); in dai_srt_set_srco()
819 ctl->dirty.bf.srt = 1; in dai_srt_set_srco()
827 set_field(&ctl->srt, SRTCTL_SRCM, src); in dai_srt_set_srcm()
828 ctl->dirty.bf.srt = 1; in dai_srt_set_srcm()
836 set_field(&ctl->srt, SRTCTL_RSR, rsr); in dai_srt_set_rsr()
837 ctl->dirty.bf.srt = 1; in dai_srt_set_rsr()
845 set_field(&ctl->srt, SRTCTL_DRAT, drat); in dai_srt_set_drat()
846 ctl->dirty.bf.srt = 1; in dai_srt_set_drat()
854 set_field(&ctl->srt, SRTCTL_EC, ec ? 1 : 0); in dai_srt_set_ec()
855 ctl->dirty.bf.srt = 1; in dai_srt_set_ec()
863 set_field(&ctl->srt, SRTCTL_ET, et ? 1 : 0); in dai_srt_set_et()
864 ctl->dirty.bf.srt = 1; in dai_srt_set_et()
872 if (ctl->dirty.bf.srt) { in dai_commit_write()
873 hw_write_20kx(hw, AUDIO_IO_RX_SRT_CTL+0x40*idx, ctl->srt); in dai_commit_write()
874 ctl->dirty.bf.srt = 0; in dai_commit_write()
887 return -ENOMEM; in dai_get_ctrl_blk()
903 ((struct dao_ctrl_blk *)blk)->atxcsl = spos; in dao_set_spos()
904 ((struct dao_ctrl_blk *)blk)->dirty.bf.atxcsl = 1; in dao_set_spos()
912 if (ctl->dirty.bf.atxcsl) { in dao_commit_write()
916 ctl->atxcsl); in dao_commit_write()
918 ctl->dirty.bf.atxcsl = 0; in dao_commit_write()
926 *spos = ((struct dao_ctrl_blk *)blk)->atxcsl; in dao_get_spos()
937 return -ENOMEM; in dao_get_ctrl_blk()
955 set_field(&ctl->rxctl[idx], ARXCTL_EN, 1); in daio_mgr_enb_dai()
956 ctl->dirty.bf.arxctl |= (0x1 << idx); in daio_mgr_enb_dai()
964 set_field(&ctl->rxctl[idx], ARXCTL_EN, 0); in daio_mgr_dsb_dai()
966 ctl->dirty.bf.arxctl |= (0x1 << idx); in daio_mgr_dsb_dai()
974 set_field(&ctl->txctl[idx], ATXCTL_EN, 1); in daio_mgr_enb_dao()
975 ctl->dirty.bf.atxctl |= (0x1 << idx); in daio_mgr_enb_dao()
983 set_field(&ctl->txctl[idx], ATXCTL_EN, 0); in daio_mgr_dsb_dao()
984 ctl->dirty.bf.atxctl |= (0x1 << idx); in daio_mgr_dsb_dao()
996 set_field(&ctl->txctl[idx], ATXCTL_NUC, 0); in daio_mgr_dao_init()
999 set_field(&ctl->txctl[idx], ATXCTL_NUC, 1); in daio_mgr_dao_init()
1002 set_field(&ctl->txctl[idx], ATXCTL_NUC, 2); in daio_mgr_dao_init()
1005 set_field(&ctl->txctl[idx], ATXCTL_NUC, 3); in daio_mgr_dao_init()
1011 set_field(&ctl->txctl[idx], ATXCTL_CD, (!(conf & 0x7))); in daio_mgr_dao_init()
1012 /* Non-audio */ in daio_mgr_dao_init()
1013 set_field(&ctl->txctl[idx], ATXCTL_LIV, (conf >> 4) & 0x1); in daio_mgr_dao_init()
1014 /* Non-audio */ in daio_mgr_dao_init()
1015 set_field(&ctl->txctl[idx], ATXCTL_RIV, (conf >> 4) & 0x1); in daio_mgr_dao_init()
1016 set_field(&ctl->txctl[idx], ATXCTL_RAW, in daio_mgr_dao_init()
1018 ctl->dirty.bf.atxctl |= (0x1 << idx); in daio_mgr_dao_init()
1030 set_field(&ctl->daoimap.aim, AIM_ARC, slot); in daio_mgr_set_imaparc()
1031 ctl->dirty.bf.daoimap = 1; in daio_mgr_set_imaparc()
1039 set_field(&ctl->daoimap.aim, AIM_NXT, next); in daio_mgr_set_imapnxt()
1040 ctl->dirty.bf.daoimap = 1; in daio_mgr_set_imapnxt()
1046 ((struct daio_mgr_ctrl_blk *)blk)->daoimap.idx = addr; in daio_mgr_set_imapaddr()
1047 ((struct daio_mgr_ctrl_blk *)blk)->dirty.bf.daoimap = 1; in daio_mgr_set_imapaddr()
1058 if ((ctl->dirty.bf.atxctl & (0x1 << i))) { in daio_mgr_commit_write()
1059 data = ctl->txctl[i]; in daio_mgr_commit_write()
1061 ctl->dirty.bf.atxctl &= ~(0x1 << i); in daio_mgr_commit_write()
1064 if ((ctl->dirty.bf.arxctl & (0x1 << i))) { in daio_mgr_commit_write()
1065 data = ctl->rxctl[i]; in daio_mgr_commit_write()
1067 ctl->dirty.bf.arxctl &= ~(0x1 << i); in daio_mgr_commit_write()
1071 if (ctl->dirty.bf.daoimap) { in daio_mgr_commit_write()
1072 hw_write_20kx(hw, AUDIO_IO_AIM+ctl->daoimap.idx*4, in daio_mgr_commit_write()
1073 ctl->daoimap.aim); in daio_mgr_commit_write()
1074 ctl->dirty.bf.daoimap = 0; in daio_mgr_commit_write()
1088 return -ENOMEM; in daio_mgr_get_ctrl_blk()
1091 blk->txctl[i] = hw_read_20kx(hw, AUDIO_IO_TX_CTL+(0x40*i)); in daio_mgr_get_ctrl_blk()
1092 blk->rxctl[i] = hw_read_20kx(hw, AUDIO_IO_RX_CTL+(0x40*i)); in daio_mgr_get_ctrl_blk()
1153 if (1 == info->msr) { in hw_daio_init()
1157 } else if (2 == info->msr) { in hw_daio_init()
1158 if (hw->model != CTSB1270) { in hw_daio_init()
1165 * EA [0] - Enabled in hw_daio_init()
1166 * RTA [4:5] - 96kHz in hw_daio_init()
1167 * EB [8] - Enabled in hw_daio_init()
1168 * RTB [12:13] - 96kHz in hw_daio_init()
1169 * EC [16] - Enabled in hw_daio_init()
1170 * RTC [20:21] - 96kHz in hw_daio_init()
1171 * ED [24] - Enabled in hw_daio_init()
1172 * RTD [28:29] - 96kHz */ in hw_daio_init()
1175 } else if ((4 == info->msr) && (hw->model == CTSB1270)) { in hw_daio_init()
1180 dev_alert(hw->card->dev, in hw_daio_init()
1182 return -EINVAL; in hw_daio_init()
1201 * Accuracy of 1000ppm, Sample Rate of 48KHz, in hw_daio_init()
1217 if (2 == info->msr) { in hw_daio_init()
1220 } else if (4 == info->msr) { in hw_daio_init()
1239 if ((~0UL) == info->vm_pgt_phys) { in hw_trn_init()
1240 dev_alert(hw->card->dev, in hw_trn_init()
1242 return -1; in hw_trn_init()
1245 vmctl = 0x80000C0F; /* 32-bit, 4k-size page */ in hw_trn_init()
1246 ptp_phys_low = (u32)info->vm_pgt_phys; in hw_trn_init()
1247 ptp_phys_high = upper_32_bits(info->vm_pgt_phys); in hw_trn_init()
1312 set_field(&pllctl, PLLCTL_FD, 48000 == rsr ? 16 - 4 : 147 - 4); in hw_pll_init()
1313 set_field(&pllctl, PLLCTL_RD, 48000 == rsr ? 1 - 1 : 10 - 1); in hw_pll_init()
1318 set_field(&pllctl, PLLCTL_FD, 48000 == rsr ? 16 - 2 : 147 - 2); in hw_pll_init()
1322 for (i = 0; i < 1000; i++) { in hw_pll_init()
1345 if (i >= 1000) { in hw_pll_init()
1346 dev_alert(hw->card->dev, in hw_pll_init()
1348 return -EBUSY; in hw_pll_init()
1371 dev_alert(hw->card->dev, "Card Auto-init failed!!!\n"); in hw_auto_init()
1372 return -EBUSY; in hw_auto_init()
1452 return -1; in hw20k2_i2c_unlock_full_access()
1463 return -1; in hw20k2_i2c_lock_chip()
1477 hw20k2->addr_size = addr_size; in hw20k2_i2c_init()
1478 hw20k2->data_size = data_size; in hw20k2_i2c_init()
1479 hw20k2->dev_id = dev_id; in hw20k2_i2c_init()
1521 } while ((!(ret & DATA_READY)) && --i); in hw20k2_i2c_wait_data_ready()
1533 (4 == hw20k2->addr_size) ? 0 : hw20k2->addr_size); in hw20k2_i2c_read()
1536 return -1; in hw20k2_i2c_read()
1540 return -1; in hw20k2_i2c_read()
1545 return -1; in hw20k2_i2c_read()
1555 unsigned int i2c_data = (data << (hw20k2->addr_size * 8)) | addr; in hw20k2_i2c_write()
1561 (4 == (hw20k2->addr_size + hw20k2->data_size)) ? in hw20k2_i2c_write()
1562 0 : (hw20k2->addr_size + hw20k2->data_size)); in hw20k2_i2c_write()
1627 if (hw->model == CTSB1270) { in hw_dac_init()
1631 if (1 == info->msr) in hw_dac_init()
1632 data |= 0x0000; /* Single Speed Mode 0-50kHz */ in hw_dac_init()
1633 else if (2 == info->msr) in hw_dac_init()
1634 data |= 0x0200; /* Double Speed Mode 50-100kHz */ in hw_dac_init()
1636 data |= 0x0600; /* Quad Speed Mode 100-200kHz */ in hw_dac_init()
1652 /* Reset DAC twice just in-case the chip in hw_dac_init()
1721 if (1 == info->msr) { in hw_dac_init()
1726 } else if (2 == info->msr) { in hw_dac_init()
1742 return -1; in hw_dac_init()
1759 if (hw->model == CTSB1270) { in hw_is_adc_input_selected()
1793 if (gain_in_db < -103) in hw_wm8775_input_select()
1794 gain_in_db = -103; in hw_wm8775_input_select()
1820 hw_wm8775_input_select(hw, 1, 0); /* Line-in, 0dB */ in hw_adc_input_select()
1842 dev_alert(hw->card->dev, "Failure to acquire I2C!!!\n"); in hw_adc_init()
1851 if (hw->model == CTSB1270) { in hw_adc_init()
1854 if (1 == info->msr) in hw_adc_init()
1855 data |= 0x00; /* Single Speed Mode 32-50kHz */ in hw_adc_init()
1856 else if (2 == info->msr) in hw_adc_init()
1857 data |= 0x08; /* Double Speed Mode 50-108kHz */ in hw_adc_init()
1859 data |= 0x04; /* Quad Speed Mode 108kHz-216kHz */ in hw_adc_init()
1870 /* invert bit, interface format to I2S, word length to 24-bit, */ in hw_adc_init()
1876 if (1 == info->msr) { in hw_adc_init()
1880 } else if ((2 == info->msr) || (4 == info->msr)) { in hw_adc_init()
1885 dev_alert(hw->card->dev, in hw_adc_init()
1887 info->msr); in hw_adc_init()
1888 err = -EINVAL; in hw_adc_init()
1892 if (hw->model != CTSB1270) { in hw_adc_init()
1893 /* Configure GPIO bit 14 change to line-in/mic-in */ in hw_adc_init()
1913 cap.dedicated_mic = hw->model == CTSB1270; in hw_capabilities()
1914 cap.output_switch = hw->model == CTSB1270; in hw_capabilities()
1915 cap.mic_source_switch = hw->model == CTSB1270; in hw_capabilities()
1943 /* Mute line and headphones (intended for anti-pop). */ in hw_output_switch_put()
1972 return hw20k2->mic_source; in hw_mic_source_switch_get()
1979 if (position == hw20k2->mic_source) in hw_mic_source_switch_put()
1996 hw20k2->mic_source = position; in hw_mic_source_switch_put()
2010 if (hw->irq_callback) in ct_20k2_interrupt()
2011 hw->irq_callback(hw->irq_callback_data, status); in ct_20k2_interrupt()
2020 struct pci_dev *pci = hw->pci; in hw_card_start()
2029 if (dma_set_mask_and_coherent(&pci->dev, DMA_BIT_MASK(dma_bits))) in hw_card_start()
2030 dma_set_mask_and_coherent(&pci->dev, DMA_BIT_MASK(32)); in hw_card_start()
2032 if (!hw->io_base) { in hw_card_start()
2037 hw->io_base = pci_resource_start(hw->pci, 2); in hw_card_start()
2038 hw->mem_base = ioremap(hw->io_base, in hw_card_start()
2039 pci_resource_len(hw->pci, 2)); in hw_card_start()
2040 if (!hw->mem_base) { in hw_card_start()
2041 err = -ENOENT; in hw_card_start()
2051 if (hw->irq < 0) { in hw_card_start()
2052 err = request_irq(pci->irq, ct_20k2_interrupt, IRQF_SHARED, in hw_card_start()
2055 dev_err(hw->card->dev, in hw_card_start()
2056 "XFi: Cannot get irq %d\n", pci->irq); in hw_card_start()
2059 hw->irq = pci->irq; in hw_card_start()
2060 hw->card->sync_irq = hw->irq; in hw_card_start()
2068 iounmap((void *)hw->mem_base); in hw_card_start()
2069 hw->mem_base = (unsigned long)NULL;*/ in hw_card_start()
2072 hw->io_base = 0; in hw_card_start()
2095 if (hw->irq >= 0) in hw_card_shutdown()
2096 free_irq(hw->irq, hw); in hw_card_shutdown()
2098 hw->irq = -1; in hw_card_shutdown()
2099 iounmap(hw->mem_base); in hw_card_shutdown()
2100 hw->mem_base = NULL; in hw_card_shutdown()
2102 if (hw->io_base) in hw_card_shutdown()
2103 pci_release_regions(hw->pci); in hw_card_shutdown()
2105 hw->io_base = 0; in hw_card_shutdown()
2107 pci_disable_device(hw->pci); in hw_card_shutdown()
2122 /* Get PCI io port/memory base address and in hw_card_init()
2123 * do 20kx core switch if needed. */ in hw_card_init()
2129 err = hw_pll_init(hw, info->rsr); in hw_card_init()
2133 /* kick off auto-init */ in hw_card_init()
2150 if (hw->model != CTSB1270) { in hw_card_init()
2163 trn_info.vm_pgt_phys = info->vm_pgt_phys; in hw_card_init()
2168 daio_info.msr = info->msr; in hw_card_init()
2173 dac_info.msr = info->msr; in hw_card_init()
2178 adc_info.msr = info->msr; in hw_card_init()
2201 /* Re-initialize card hardware. */ in hw_resume()
2208 return readl(hw->mem_base + reg); in hw_read_20kx()
2213 writel(data, hw->mem_base + reg); in hw_write_20kx()
2217 .irq = -1,
2331 return -ENOMEM; in create_20k2_hw_obj()
2333 hw20k2->hw = ct20k2_preset; in create_20k2_hw_obj()
2334 *rhw = &hw20k2->hw; in create_20k2_hw_obj()
2341 if (hw->io_base) in destroy_20k2_hw_obj()