pcr 779 arch/alpha/kernel/perf_event.c unsigned long pcr; pcr 790 arch/alpha/kernel/perf_event.c pcr = wrperfmon(PERFMON_CMD_READ, 0); pcr 791 arch/alpha/kernel/perf_event.c pcr0 = (pcr >> alpha_pmu->pmc_count_shift[0]) & alpha_pmu->pmc_count_mask[0]; pcr 792 arch/alpha/kernel/perf_event.c pcr1 = (pcr >> alpha_pmu->pmc_count_shift[1]) & alpha_pmu->pmc_count_mask[1]; pcr 237 arch/arm/mach-imx/mach-mx21ads.c .pcr = 0xfb108bc7, pcr 341 arch/arm/mach-imx/mach-mx27_3ds.c .pcr = 0xFAC08B82, pcr 273 arch/arm/mach-imx/mach-mx27ads.c .pcr = 0xFB008BC0, pcr 326 arch/arm/mach-imx/mach-pca100.c .pcr = 0xf0c08080, pcr 251 arch/m68k/kernel/setup_mm.c u32 pcr; pcr 254 arch/m68k/kernel/setup_mm.c : "=d" (pcr)); pcr 255 arch/m68k/kernel/setup_mm.c if (((pcr >> 8) & 0xff) <= 5) { pcr 258 arch/m68k/kernel/setup_mm.c : : "d" (pcr | 0x20)); pcr 491 arch/powerpc/include/asm/hvcall.h u64 pcr; pcr 91 arch/powerpc/include/asm/kvm_book3s.h ulong pcr; pcr 578 arch/powerpc/kernel/asm-offsets.c OFFSET(VCORE_PCR, kvmppc_vcore, pcr); pcr 408 arch/powerpc/kvm/book3s_hv.c vc->pcr = (host_pcr_bit - guest_pcr_bit) | PCR_MASK; pcr 3417 arch/powerpc/kvm/book3s_hv.c if (vc->pcr) pcr 3418 arch/powerpc/kvm/book3s_hv.c mtspr(SPRN_PCR, vc->pcr | PCR_MASK); pcr 3497 arch/powerpc/kvm/book3s_hv.c if (vc->pcr) pcr 32 arch/powerpc/kvm/book3s_hv_nested.c hr->pcr = vc->pcr | PCR_MASK; pcr 68 arch/powerpc/kvm/book3s_hv_nested.c hr->pcr = swab64(hr->pcr) | PCR_MASK; pcr 151 arch/powerpc/kvm/book3s_hv_nested.c vc->pcr = hr->pcr | PCR_MASK; pcr 62 arch/powerpc/kvm/book3s_hv_tm.c if ((msr & MSR_PR) && (vcpu->arch.vcore->pcr & PCR_ARCH_206)) { pcr 110 arch/powerpc/kvm/book3s_hv_tm.c if ((msr & MSR_PR) && (vcpu->arch.vcore->pcr & PCR_ARCH_206)) { pcr 42 arch/powerpc/kvm/book3s_hv_tm_builtin.c if ((msr & MSR_PR) && (vcpu->arch.vcore->pcr & PCR_ARCH_206)) pcr 80 arch/powerpc/kvm/book3s_hv_tm_builtin.c if ((msr & MSR_PR) && (vcpu->arch.vcore->pcr & PCR_ARCH_206)) pcr 37 arch/powerpc/platforms/86xx/mpc86xx_smp.c unsigned long pcr; pcr 47 arch/powerpc/platforms/86xx/mpc86xx_smp.c pcr = in_be32(mcm_vaddr + (MCM_PORT_CONFIG_OFFSET >> 2)); pcr 48 arch/powerpc/platforms/86xx/mpc86xx_smp.c pcr |= 1 << (nr + 24); pcr 49 arch/powerpc/platforms/86xx/mpc86xx_smp.c out_be32(mcm_vaddr + (MCM_PORT_CONFIG_OFFSET >> 2), pcr); pcr 52 arch/sparc/include/asm/ptrace.h unsigned long pcr[4]; pcr 108 arch/sparc/kernel/perf_event.c u64 pcr[MAX_HWEVENTS]; pcr 740 arch/sparc/kernel/perf_event.c u64 pcr; pcr 742 arch/sparc/kernel/perf_event.c pcr = pcr_ops->read_pcr(idx); pcr 744 arch/sparc/kernel/perf_event.c pcr &= ~(PCR_N4_OV | PCR_N4_NTC); pcr 748 arch/sparc/kernel/perf_event.c pcr_ops->write_pcr(idx, pcr); pcr 837 arch/sparc/kernel/perf_event.c val = cpuc->pcr[pcr_index]; pcr 840 arch/sparc/kernel/perf_event.c cpuc->pcr[pcr_index] = val; pcr 842 arch/sparc/kernel/perf_event.c pcr_ops->write_pcr(pcr_index, cpuc->pcr[pcr_index]); pcr 855 arch/sparc/kernel/perf_event.c val = cpuc->pcr[pcr_index]; pcr 858 arch/sparc/kernel/perf_event.c cpuc->pcr[pcr_index] = val; pcr 860 arch/sparc/kernel/perf_event.c pcr_ops->write_pcr(pcr_index, cpuc->pcr[pcr_index]); pcr 968 arch/sparc/kernel/perf_event.c cpuc->pcr[0] &= ~mask_for_index(idx); pcr 970 arch/sparc/kernel/perf_event.c cpuc->pcr[0] |= nop_for_index(idx); pcr 972 arch/sparc/kernel/perf_event.c cpuc->pcr[0] |= event_encoding(enc, idx); pcr 977 arch/sparc/kernel/perf_event.c cpuc->pcr[0] |= cpuc->event[0]->hw.config_base; pcr 1010 arch/sparc/kernel/perf_event.c cpuc->pcr[idx] |= cp->hw.config_base; pcr 1044 arch/sparc/kernel/perf_event.c pcr_ops->write_pcr(i, cpuc->pcr[i]); pcr 1059 arch/sparc/kernel/perf_event.c u64 val = cpuc->pcr[i]; pcr 1063 arch/sparc/kernel/perf_event.c cpuc->pcr[i] = val; pcr 1064 arch/sparc/kernel/perf_event.c pcr_ops->write_pcr(i, cpuc->pcr[i]); pcr 1168 arch/sparc/kernel/perf_event.c cpuc->pcr[i] = pcr_ops->read_pcr(i); pcr 1650 arch/sparc/kernel/perf_event.c pcr_ops->write_pcr(0, cpuc->pcr[0]); pcr 1660 arch/sparc/kernel/perf_event.c pcr_ops->write_pcr(idx, cpuc->pcr[idx]); pcr 338 arch/sparc/kernel/process_64.c pp->pcr[i] = pcr_ops->read_pcr(i); pcr 347 arch/sparc/kernel/process_64.c while (!pp->pcr[0] && ++limit < 100) { pcr 375 arch/sparc/kernel/process_64.c pp->pcr[0], pp->pcr[1], pp->pcr[2], pp->pcr[3], pcr 1046 drivers/atm/ambassador.c int pcr = atm_pcr_goal (txtp); pcr 1047 drivers/atm/ambassador.c if (!pcr) { pcr 1054 drivers/atm/ambassador.c if (pcr < 0) { pcr 1056 drivers/atm/ambassador.c pcr = -pcr; pcr 1060 drivers/atm/ambassador.c error = make_rate (pcr, r, &tx_rate_bits, NULL); pcr 1070 drivers/atm/ambassador.c pcr = atm_pcr_goal (txtp); pcr 1071 drivers/atm/ambassador.c PRINTD (DBG_QOS, "pcr goal = %d", pcr); pcr 1110 drivers/atm/ambassador.c pcr = atm_pcr_goal (rxtp); pcr 1111 drivers/atm/ambassador.c PRINTD (DBG_QOS, "pcr goal = %d", pcr); pcr 1252 drivers/atm/eni.c static int comp_tx(struct eni_dev *eni_dev,int *pcr,int reserved,int *pre, pcr 1260 drivers/atm/eni.c if (*pcr > 0) { pcr 1264 drivers/atm/eni.c if (TS_CLOCK/pre_div[*pre]/64 <= *pcr) break; pcr 1265 drivers/atm/eni.c div = pre_div[*pre]**pcr; pcr 1272 drivers/atm/eni.c if (!*pcr) *pcr = eni_dev->tx_bw+reserved; pcr 1274 drivers/atm/eni.c if (TS_CLOCK/pre_div[*pre]/64 > -*pcr) break; pcr 1276 drivers/atm/eni.c div = pre_div[*pre]*-*pcr; pcr 1283 drivers/atm/eni.c *pcr = TS_CLOCK/pre_div[*pre]/(*res+1); pcr 1284 drivers/atm/eni.c DPRINTK("out pcr: %d (%d:%d)\n",*pcr,*pre,*res); pcr 1314 drivers/atm/eni.c txtp->pcr = ATM_OC3_PCR; pcr 1359 drivers/atm/eni.c txtp->pcr = rate; pcr 976 drivers/atm/firestream.c int pcr = atm_pcr_goal (txtp); pcr 978 drivers/atm/firestream.c fs_dprintk (FS_DEBUG_OPEN, "pcr = %d.\n", pcr); pcr 983 drivers/atm/firestream.c if (pcr > 51840000/53/8) pcr = 51840000/53/8; pcr 985 drivers/atm/firestream.c if (pcr > 155520000/53/8) pcr = 155520000/53/8; pcr 987 drivers/atm/firestream.c if (!pcr) { pcr 992 drivers/atm/firestream.c if (pcr < 0) { pcr 994 drivers/atm/firestream.c pcr = -pcr; pcr 998 drivers/atm/firestream.c error = make_rate (pcr, r, &tmc0, NULL); pcr 1004 drivers/atm/firestream.c fs_dprintk (FS_DEBUG_OPEN, "pcr = %d.\n", pcr); pcr 1506 drivers/atm/he.c he_dev->cs_stper[i].pcr = -1; pcr 2211 drivers/atm/he.c he_dev->cs_stper[reg].pcr == pcr_goal) pcr 2224 drivers/atm/he.c he_dev->cs_stper[reg].pcr = pcr_goal; pcr 2476 drivers/atm/he.c he_dev->total_bw -= he_dev->cs_stper[reg].pcr; pcr 2775 drivers/atm/he.c he_dev->cs_stper[i].pcr, pcr 246 drivers/atm/he.h long pcr; pcr 2063 drivers/atm/horizon.c static int atm_pcr_check (struct atm_trafprm * tp, unsigned int pcr) { pcr 2069 drivers/atm/horizon.c else if (tp->min_pcr && tp->min_pcr > pcr) pcr 2079 drivers/atm/horizon.c else if (tp->max_pcr && tp->max_pcr != ATM_MAX_PCR && tp->max_pcr < pcr) pcr 2087 drivers/atm/horizon.c pcr, tp->min_pcr, tp->pcr, tp->max_pcr); pcr 2224 drivers/atm/horizon.c int pcr = atm_pcr_goal (txtp); pcr 2226 drivers/atm/horizon.c if (!pcr) { pcr 2236 drivers/atm/horizon.c pcr = dev->tx_avail; pcr 2237 drivers/atm/horizon.c } else if (pcr < 0) { pcr 2239 drivers/atm/horizon.c pcr = -pcr; pcr 2243 drivers/atm/horizon.c error = make_rate_with_tolerance (dev, pcr, r, 10, pcr 2260 drivers/atm/horizon.c int pcr = atm_pcr_goal (txtp); pcr 2262 drivers/atm/horizon.c int scr = pcr/2; // just for fun pcr 2267 drivers/atm/horizon.c if (!pcr) { pcr 2269 drivers/atm/horizon.c pcr = 1<<30; pcr 2270 drivers/atm/horizon.c } else if (pcr < 0) { pcr 2272 drivers/atm/horizon.c pcr = -pcr; pcr 2276 drivers/atm/horizon.c error = make_rate_with_tolerance (dev, pcr, pr, 10, pcr 2306 drivers/atm/horizon.c bucket = mbs*(pcr-scr)/pcr; pcr 2307 drivers/atm/horizon.c if (bucket*pcr != mbs*(pcr-scr)) pcr 2354 drivers/atm/horizon.c int pcr = atm_pcr_goal (rxtp); pcr 2355 drivers/atm/horizon.c if (!pcr) { pcr 2359 drivers/atm/horizon.c pcr = dev->rx_avail; pcr 2360 drivers/atm/horizon.c } else if (pcr < 0) { pcr 2361 drivers/atm/horizon.c pcr = -pcr; pcr 2363 drivers/atm/horizon.c vcc.rx_rate = pcr; pcr 2064 drivers/atm/idt77252.c idt77252_rate_logindex(struct idt77252_dev *card, int pcr) pcr 2068 drivers/atm/idt77252.c afp = idt77252_int_to_atmfp(pcr < 0 ? -pcr : pcr); pcr 2069 drivers/atm/idt77252.c if (pcr < 0) pcr 2116 drivers/atm/idt77252.c idt77252_init_est(struct vc_map *vc, int pcr) pcr 2123 drivers/atm/idt77252.c est->maxcps = pcr < 0 ? -pcr : pcr; pcr 2145 drivers/atm/idt77252.c (qos->txtp.pcr == 0) && (qos->txtp.min_pcr == 0)) { pcr 164 drivers/atm/iphase.c if (iavcc_r->pcr < dev->rate_limit) { pcr 362 drivers/atm/iphase.c srv_p->pcr = dev->LineRate; pcr 389 drivers/atm/iphase.c if (srv_p->pcr == 0) pcr 391 drivers/atm/iphase.c if (srv_p->pcr > dev->LineRate) pcr 392 drivers/atm/iphase.c srv_p->pcr = dev->LineRate; pcr 395 drivers/atm/iphase.c if (srv_p->mcr > srv_p->pcr) pcr 398 drivers/atm/iphase.c srv_p->icr = srv_p->pcr; pcr 399 drivers/atm/iphase.c if ((srv_p->icr < srv_p->mcr) || (srv_p->icr > srv_p->pcr)) pcr 431 drivers/atm/iphase.c f_abr_vc->f_pcr = cellrate_to_float(srv_p->pcr); pcr 449 drivers/atm/iphase.c air = srv_p->pcr << (15 - srv_p->rif); pcr 1725 drivers/atm/iphase.c if (vcc->qos.txtp.pcr >= iadev->rate_limit) { pcr 1782 drivers/atm/iphase.c vcc->qos.txtp.pcr = iadev->LineRate; pcr 1783 drivers/atm/iphase.c else if ((vcc->qos.txtp.max_pcr == 0)&&( vcc->qos.txtp.pcr <= 0)) pcr 1784 drivers/atm/iphase.c vcc->qos.txtp.pcr = iadev->LineRate; pcr 1785 drivers/atm/iphase.c else if ((vcc->qos.txtp.max_pcr > vcc->qos.txtp.pcr) && (vcc->qos.txtp.max_pcr> 0)) pcr 1786 drivers/atm/iphase.c vcc->qos.txtp.pcr = vcc->qos.txtp.max_pcr; pcr 1787 drivers/atm/iphase.c if (vcc->qos.txtp.pcr > iadev->LineRate) pcr 1788 drivers/atm/iphase.c vcc->qos.txtp.pcr = iadev->LineRate; pcr 1789 drivers/atm/iphase.c ia_vcc->pcr = vcc->qos.txtp.pcr; pcr 1791 drivers/atm/iphase.c if (ia_vcc->pcr > (iadev->LineRate / 6) ) ia_vcc->ltimeout = HZ / 10; pcr 1792 drivers/atm/iphase.c else if (ia_vcc->pcr > (iadev->LineRate / 130)) ia_vcc->ltimeout = HZ; pcr 1793 drivers/atm/iphase.c else if (ia_vcc->pcr <= 170) ia_vcc->ltimeout = 16 * HZ; pcr 1794 drivers/atm/iphase.c else ia_vcc->ltimeout = 2700 * HZ / ia_vcc->pcr; pcr 1795 drivers/atm/iphase.c if (ia_vcc->pcr < iadev->rate_limit) pcr 1797 drivers/atm/iphase.c if (ia_vcc->pcr < iadev->rate_limit) { pcr 1801 drivers/atm/iphase.c if (ia_vcc->pcr > 60000) pcr 1803 drivers/atm/iphase.c else if (ia_vcc->pcr > 2000) pcr 1833 drivers/atm/iphase.c if (vcc->qos.txtp.pcr > 0) pcr 1834 drivers/atm/iphase.c vc->acr = cellrate_to_float(vcc->qos.txtp.pcr); pcr 1842 drivers/atm/iphase.c if (vcc->qos.txtp.pcr > 0) pcr 1843 drivers/atm/iphase.c srv_p.pcr = vcc->qos.txtp.pcr; pcr 1870 drivers/atm/iphase.c if (srv_p.icr > srv_p.pcr) pcr 1871 drivers/atm/iphase.c srv_p.icr = srv_p.pcr; pcr 1873 drivers/atm/iphase.c srv_p.pcr, srv_p.mcr);) pcr 2642 drivers/atm/iphase.c closetime = 300000 / ia_vcc->pcr; pcr 212 drivers/atm/iphase.h u32 pcr; pcr 250 drivers/atm/iphase.h u_short pcr; pcr 811 drivers/atm/iphase.h u32 pcr; /* Peak Cell Rate (24-bit) */ pcr 2071 drivers/atm/lanai.c int x, icg, pcr = atm_pcr_goal(&qos->txtp); pcr 2072 drivers/atm/lanai.c if (pcr == 0) /* Use maximum bandwidth */ pcr 2074 drivers/atm/lanai.c if (pcr < 0) { pcr 2076 drivers/atm/lanai.c pcr = -pcr; pcr 2078 drivers/atm/lanai.c x = pcr * 27; pcr 2086 drivers/atm/lanai.c pcr, rounddown ? 'Y' : 'N', icg); pcr 1278 drivers/atm/nicstar.c if (vcc->qos.txtp.max_pcr == 0 && vcc->qos.txtp.pcr == 0 pcr 789 drivers/atm/zatm.c static int alloc_shaper(struct atm_dev *dev,int *pcr,int min,int max,int ubr) pcr 806 drivers/atm/zatm.c *pcr = 0; pcr 835 drivers/atm/zatm.c *pcr = i*ATM_OC3_PCR/m; pcr 837 drivers/atm/zatm.c if ((min && *pcr < min) || (max && *pcr > max)) return -EINVAL; pcr 838 drivers/atm/zatm.c if (zatm_dev->tx_bw < *pcr) return -EAGAIN; pcr 839 drivers/atm/zatm.c zatm_dev->tx_bw -= *pcr; pcr 842 drivers/atm/zatm.c DPRINTK("i = %d, m = %d, PCR = %d\n",i,m,*pcr); pcr 943 drivers/atm/zatm.c int uninitialized_var(pcr); pcr 946 drivers/atm/zatm.c if ((zatm_vcc->shaper = alloc_shaper(vcc->dev,&pcr, pcr 952 drivers/atm/zatm.c if (pcr > ATM_OC3_PCR) pcr = ATM_OC3_PCR; pcr 953 drivers/atm/zatm.c vcc->qos.txtp.min_pcr = vcc->qos.txtp.max_pcr = pcr; pcr 141 drivers/clk/at91/pmc.c u32 pcr[PMC_MAX_IDS]; pcr 203 drivers/clk/at91/pmc.c &pmc_cache.pcr[registered_ids[i]]); pcr 247 drivers/clk/at91/pmc.c pmc_cache.pcr[registered_ids[i]] | pcr 448 drivers/media/platform/am437x/am437x-vpfe.c int dma_cntl, i, pcr; pcr 453 drivers/media/platform/am437x/am437x-vpfe.c pcr = vpfe_reg_read(ccdc, VPFE_PCR); pcr 454 drivers/media/platform/am437x/am437x-vpfe.c if (!pcr) pcr 28 drivers/media/platform/omap3isp/isph3a_aewb.c u32 pcr; pcr 44 drivers/media/platform/omap3isp/isph3a_aewb.c pcr = conf->saturation_limit << ISPH3A_PCR_AEW_AVE2LMT_SHIFT; pcr 45 drivers/media/platform/omap3isp/isph3a_aewb.c pcr |= !!conf->alaw_enable << ISPH3A_PCR_AEW_ALAW_EN_SHIFT; pcr 70 drivers/media/platform/omap3isp/isph3a_aewb.c ISPH3A_PCR_AEW_MASK, pcr); pcr 29 drivers/media/platform/omap3isp/isph3a_af.c u32 pcr; pcr 104 drivers/media/platform/omap3isp/isph3a_af.c pcr = conf->rgb_pos << AF_RGBPOS_SHIFT; pcr 107 drivers/media/platform/omap3isp/isph3a_af.c pcr |= AF_FVMODE; pcr 110 drivers/media/platform/omap3isp/isph3a_af.c pcr |= AF_ALAW_EN; pcr 114 drivers/media/platform/omap3isp/isph3a_af.c pcr |= AF_MED_EN; pcr 116 drivers/media/platform/omap3isp/isph3a_af.c pcr |= conf->hmf.threshold << AF_MED_TH_SHIFT; pcr 120 drivers/media/platform/omap3isp/isph3a_af.c AF_PCR_MASK, pcr); pcr 442 drivers/media/usb/ttusb-dec/ttusb_dec.c __be16 pcr = htons(dec->pid[DMX_PES_PCR]); pcr 448 drivers/media/usb/ttusb-dec/ttusb_dec.c memcpy(&b[0], &pcr, 2); pcr 20 drivers/memstick/host/rtsx_pci_ms.c struct rtsx_pcr *pcr; pcr 40 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_write_register(host->pcr, CARD_STOP, pcr 48 drivers/memstick/host/rtsx_pci_ms.c struct rtsx_pcr *pcr = host->pcr; pcr 53 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_init_cmd(pcr); pcr 55 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, READ_REG_CMD, i, 0, 0); pcr 57 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, READ_REG_CMD, i, 0, 0); pcr 58 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_send_cmd(pcr, 100); pcr 60 drivers/memstick/host/rtsx_pci_ms.c ptr = rtsx_pci_get_cmd_data(pcr); pcr 75 drivers/memstick/host/rtsx_pci_ms.c struct rtsx_pcr *pcr = host->pcr; pcr 78 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_init_cmd(pcr); pcr 79 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_SELECT, 0x07, MS_MOD_SEL); pcr 80 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_SHARE_MODE, pcr 82 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_CLK_EN, pcr 84 drivers/memstick/host/rtsx_pci_ms.c err = rtsx_pci_send_cmd(pcr, 100); pcr 88 drivers/memstick/host/rtsx_pci_ms.c err = rtsx_pci_card_pull_ctl_enable(pcr, RTSX_MS_CARD); pcr 92 drivers/memstick/host/rtsx_pci_ms.c err = rtsx_pci_card_power_on(pcr, RTSX_MS_CARD); pcr 99 drivers/memstick/host/rtsx_pci_ms.c err = rtsx_pci_write_register(pcr, CARD_OE, pcr 109 drivers/memstick/host/rtsx_pci_ms.c struct rtsx_pcr *pcr = host->pcr; pcr 112 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_init_cmd(pcr); pcr 114 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_CLK_EN, MS_CLK_EN, 0); pcr 115 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_OE, MS_OUTPUT_EN, 0); pcr 117 drivers/memstick/host/rtsx_pci_ms.c err = rtsx_pci_send_cmd(pcr, 100); pcr 121 drivers/memstick/host/rtsx_pci_ms.c err = rtsx_pci_card_power_off(pcr, RTSX_MS_CARD); pcr 125 drivers/memstick/host/rtsx_pci_ms.c return rtsx_pci_card_pull_ctl_disable(pcr, RTSX_MS_CARD); pcr 131 drivers/memstick/host/rtsx_pci_ms.c struct rtsx_pcr *pcr = host->pcr; pcr 151 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_init_cmd(pcr); pcr 153 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, MS_TPC, 0xFF, tpc); pcr 155 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, MS_SECTOR_CNT_H, pcr 157 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, MS_SECTOR_CNT_L, pcr 160 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, MS_TRANS_CFG, 0xFF, cfg); pcr 162 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, IRQSTAT0, pcr 164 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, DMATC3, 0xFF, (u8)(length >> 24)); pcr 165 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, DMATC2, 0xFF, (u8)(length >> 16)); pcr 166 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, DMATC1, 0xFF, (u8)(length >> 8)); pcr 167 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, DMATC0, 0xFF, (u8)length); pcr 168 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, DMACTL, pcr 170 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_DATA_SOURCE, pcr 173 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, MS_TRANSFER, pcr 175 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, CHECK_REG_CMD, MS_TRANSFER, pcr 178 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_send_cmd_no_wait(pcr); pcr 180 drivers/memstick/host/rtsx_pci_ms.c err = rtsx_pci_transfer_data(pcr, sg, 1, data_dir == READ, 10000); pcr 186 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_read_register(pcr, MS_TRANS_CFG, &val); pcr 202 drivers/memstick/host/rtsx_pci_ms.c struct rtsx_pcr *pcr = host->pcr; pcr 210 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_init_cmd(pcr); pcr 213 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, pcr 216 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, pcr 219 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, MS_TPC, 0xFF, tpc); pcr 220 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, MS_BYTE_CNT, 0xFF, cnt); pcr 221 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, MS_TRANS_CFG, 0xFF, cfg); pcr 222 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_DATA_SOURCE, pcr 225 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, MS_TRANSFER, pcr 227 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, CHECK_REG_CMD, MS_TRANSFER, pcr 230 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, READ_REG_CMD, MS_TRANS_CFG, 0, 0); pcr 232 drivers/memstick/host/rtsx_pci_ms.c err = rtsx_pci_send_cmd(pcr, 5000); pcr 236 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_read_register(pcr, MS_TRANS_CFG, &val); pcr 260 drivers/memstick/host/rtsx_pci_ms.c u8 *ptr = rtsx_pci_get_cmd_data(pcr) + 1; pcr 270 drivers/memstick/host/rtsx_pci_ms.c struct rtsx_pcr *pcr = host->pcr; pcr 279 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_init_cmd(pcr); pcr 281 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, MS_TPC, 0xFF, tpc); pcr 282 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, MS_BYTE_CNT, 0xFF, cnt); pcr 283 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, MS_TRANS_CFG, 0xFF, cfg); pcr 284 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_DATA_SOURCE, pcr 287 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, MS_TRANSFER, pcr 289 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, CHECK_REG_CMD, MS_TRANSFER, pcr 292 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, READ_REG_CMD, PPBUF_BASE2 + i, 0, 0); pcr 294 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, READ_REG_CMD, PPBUF_BASE2 + cnt, 0, 0); pcr 296 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, READ_REG_CMD, pcr 299 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_add_cmd(pcr, READ_REG_CMD, MS_TRANS_CFG, 0, 0); pcr 301 drivers/memstick/host/rtsx_pci_ms.c err = rtsx_pci_send_cmd(pcr, 5000); pcr 305 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_read_register(pcr, MS_TRANS_CFG, &val); pcr 328 drivers/memstick/host/rtsx_pci_ms.c ptr = rtsx_pci_get_cmd_data(pcr) + 1; pcr 393 drivers/memstick/host/rtsx_pci_ms.c struct rtsx_pcr *pcr = host->pcr; pcr 397 drivers/memstick/host/rtsx_pci_ms.c mutex_lock(&pcr->pcr_mutex); pcr 399 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_start_run(pcr); pcr 401 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_switch_clock(host->pcr, host->clock, host->ssc_depth, pcr 403 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_write_register(pcr, CARD_SELECT, 0x07, MS_MOD_SEL); pcr 404 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_write_register(pcr, CARD_SHARE_MODE, pcr 417 drivers/memstick/host/rtsx_pci_ms.c mutex_unlock(&pcr->pcr_mutex); pcr 426 drivers/memstick/host/rtsx_pci_ms.c if (rtsx_pci_card_exclusive_check(host->pcr, RTSX_MS_CARD)) pcr 436 drivers/memstick/host/rtsx_pci_ms.c struct rtsx_pcr *pcr = host->pcr; pcr 444 drivers/memstick/host/rtsx_pci_ms.c err = rtsx_pci_card_exclusive_check(host->pcr, RTSX_MS_CARD); pcr 463 drivers/memstick/host/rtsx_pci_ms.c err = rtsx_pci_write_register(pcr, MS_CFG, 0x58, pcr 471 drivers/memstick/host/rtsx_pci_ms.c err = rtsx_pci_write_register(pcr, MS_CFG, pcr 479 drivers/memstick/host/rtsx_pci_ms.c err = rtsx_pci_switch_clock(pcr, clock, pcr 535 drivers/memstick/host/rtsx_pci_ms.c struct rtsx_pcr *pcr; pcr 542 drivers/memstick/host/rtsx_pci_ms.c pcr = handle->pcr; pcr 543 drivers/memstick/host/rtsx_pci_ms.c if (!pcr) pcr 554 drivers/memstick/host/rtsx_pci_ms.c host->pcr = pcr; pcr 558 drivers/memstick/host/rtsx_pci_ms.c pcr->slots[RTSX_MS_CARD].p_dev = pdev; pcr 559 drivers/memstick/host/rtsx_pci_ms.c pcr->slots[RTSX_MS_CARD].card_event = rtsx_pci_ms_card_event; pcr 580 drivers/memstick/host/rtsx_pci_ms.c struct rtsx_pcr *pcr; pcr 587 drivers/memstick/host/rtsx_pci_ms.c pcr = host->pcr; pcr 588 drivers/memstick/host/rtsx_pci_ms.c pcr->slots[RTSX_MS_CARD].p_dev = NULL; pcr 589 drivers/memstick/host/rtsx_pci_ms.c pcr->slots[RTSX_MS_CARD].card_event = NULL; pcr 600 drivers/memstick/host/rtsx_pci_ms.c rtsx_pci_complete_unfinished_transfer(pcr); pcr 18 drivers/misc/cardreader/rtl8411.c static u8 rtl8411_get_ic_version(struct rtsx_pcr *pcr) pcr 22 drivers/misc/cardreader/rtl8411.c rtsx_pci_read_register(pcr, SYS_VER, &val); pcr 26 drivers/misc/cardreader/rtl8411.c static int rtl8411b_is_qfn48(struct rtsx_pcr *pcr) pcr 30 drivers/misc/cardreader/rtl8411.c rtsx_pci_read_register(pcr, RTL8411B_PACKAGE_MODE, &val); pcr 38 drivers/misc/cardreader/rtl8411.c static void rtl8411_fetch_vendor_settings(struct rtsx_pcr *pcr) pcr 43 drivers/misc/cardreader/rtl8411.c rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®1); pcr 44 drivers/misc/cardreader/rtl8411.c pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg1); pcr 49 drivers/misc/cardreader/rtl8411.c pcr->aspm_en = rtsx_reg_to_aspm(reg1); pcr 50 drivers/misc/cardreader/rtl8411.c pcr->sd30_drive_sel_1v8 = pcr 52 drivers/misc/cardreader/rtl8411.c pcr->card_drive_sel &= 0x3F; pcr 53 drivers/misc/cardreader/rtl8411.c pcr->card_drive_sel |= rtsx_reg_to_card_drive_sel(reg1); pcr 55 drivers/misc/cardreader/rtl8411.c rtsx_pci_read_config_byte(pcr, PCR_SETTING_REG3, ®3); pcr 56 drivers/misc/cardreader/rtl8411.c pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG3, reg3); pcr 57 drivers/misc/cardreader/rtl8411.c pcr->sd30_drive_sel_3v3 = rtl8411_reg_to_sd30_drive_sel_3v3(reg3); pcr 60 drivers/misc/cardreader/rtl8411.c static void rtl8411b_fetch_vendor_settings(struct rtsx_pcr *pcr) pcr 64 drivers/misc/cardreader/rtl8411.c rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®); pcr 65 drivers/misc/cardreader/rtl8411.c pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg); pcr 70 drivers/misc/cardreader/rtl8411.c pcr->aspm_en = rtsx_reg_to_aspm(reg); pcr 71 drivers/misc/cardreader/rtl8411.c pcr->sd30_drive_sel_1v8 = pcr 73 drivers/misc/cardreader/rtl8411.c pcr->sd30_drive_sel_3v3 = pcr 77 drivers/misc/cardreader/rtl8411.c static void rtl8411_force_power_down(struct rtsx_pcr *pcr, u8 pm_state) pcr 79 drivers/misc/cardreader/rtl8411.c rtsx_pci_write_register(pcr, FPDCTL, 0x07, 0x07); pcr 82 drivers/misc/cardreader/rtl8411.c static int rtl8411_extra_init_hw(struct rtsx_pcr *pcr) pcr 84 drivers/misc/cardreader/rtl8411.c rtsx_pci_init_cmd(pcr); pcr 86 drivers/misc/cardreader/rtl8411.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD30_DRIVE_SEL, pcr 87 drivers/misc/cardreader/rtl8411.c 0xFF, pcr->sd30_drive_sel_3v3); pcr 88 drivers/misc/cardreader/rtl8411.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CD_PAD_CTL, pcr 91 drivers/misc/cardreader/rtl8411.c return rtsx_pci_send_cmd(pcr, 100); pcr 94 drivers/misc/cardreader/rtl8411.c static int rtl8411b_extra_init_hw(struct rtsx_pcr *pcr) pcr 96 drivers/misc/cardreader/rtl8411.c rtsx_pci_init_cmd(pcr); pcr 98 drivers/misc/cardreader/rtl8411.c if (rtl8411b_is_qfn48(pcr)) pcr 99 drivers/misc/cardreader/rtl8411.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, pcr 101 drivers/misc/cardreader/rtl8411.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD30_DRIVE_SEL, pcr 102 drivers/misc/cardreader/rtl8411.c 0xFF, pcr->sd30_drive_sel_3v3); pcr 103 drivers/misc/cardreader/rtl8411.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CD_PAD_CTL, pcr 105 drivers/misc/cardreader/rtl8411.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, FUNC_FORCE_CTL, pcr 108 drivers/misc/cardreader/rtl8411.c return rtsx_pci_send_cmd(pcr, 100); pcr 111 drivers/misc/cardreader/rtl8411.c static int rtl8411_turn_on_led(struct rtsx_pcr *pcr) pcr 113 drivers/misc/cardreader/rtl8411.c return rtsx_pci_write_register(pcr, CARD_GPIO, 0x01, 0x00); pcr 116 drivers/misc/cardreader/rtl8411.c static int rtl8411_turn_off_led(struct rtsx_pcr *pcr) pcr 118 drivers/misc/cardreader/rtl8411.c return rtsx_pci_write_register(pcr, CARD_GPIO, 0x01, 0x01); pcr 121 drivers/misc/cardreader/rtl8411.c static int rtl8411_enable_auto_blink(struct rtsx_pcr *pcr) pcr 123 drivers/misc/cardreader/rtl8411.c return rtsx_pci_write_register(pcr, CARD_AUTO_BLINK, 0xFF, 0x0D); pcr 126 drivers/misc/cardreader/rtl8411.c static int rtl8411_disable_auto_blink(struct rtsx_pcr *pcr) pcr 128 drivers/misc/cardreader/rtl8411.c return rtsx_pci_write_register(pcr, CARD_AUTO_BLINK, 0x08, 0x00); pcr 131 drivers/misc/cardreader/rtl8411.c static int rtl8411_card_power_on(struct rtsx_pcr *pcr, int card) pcr 135 drivers/misc/cardreader/rtl8411.c rtsx_pci_init_cmd(pcr); pcr 136 drivers/misc/cardreader/rtl8411.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_PWR_CTL, pcr 138 drivers/misc/cardreader/rtl8411.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, LDO_CTL, pcr 140 drivers/misc/cardreader/rtl8411.c err = rtsx_pci_send_cmd(pcr, 100); pcr 147 drivers/misc/cardreader/rtl8411.c err = rtsx_pci_write_register(pcr, CARD_PWR_CTL, pcr 154 drivers/misc/cardreader/rtl8411.c err = rtsx_pci_write_register(pcr, CARD_PWR_CTL, pcr 161 drivers/misc/cardreader/rtl8411.c err = rtsx_pci_write_register(pcr, CARD_PWR_CTL, pcr 166 drivers/misc/cardreader/rtl8411.c return rtsx_pci_write_register(pcr, LDO_CTL, BPP_LDO_POWB, BPP_LDO_ON); pcr 169 drivers/misc/cardreader/rtl8411.c static int rtl8411_card_power_off(struct rtsx_pcr *pcr, int card) pcr 173 drivers/misc/cardreader/rtl8411.c err = rtsx_pci_write_register(pcr, CARD_PWR_CTL, pcr 178 drivers/misc/cardreader/rtl8411.c return rtsx_pci_write_register(pcr, LDO_CTL, pcr 182 drivers/misc/cardreader/rtl8411.c static int rtl8411_do_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage, pcr 190 drivers/misc/cardreader/rtl8411.c err = rtsx_pci_write_register(pcr, pcr 191 drivers/misc/cardreader/rtl8411.c SD30_DRIVE_SEL, 0x07, pcr->sd30_drive_sel_3v3); pcr 196 drivers/misc/cardreader/rtl8411.c err = rtsx_pci_write_register(pcr, pcr 197 drivers/misc/cardreader/rtl8411.c SD30_DRIVE_SEL, 0x07, pcr->sd30_drive_sel_1v8); pcr 205 drivers/misc/cardreader/rtl8411.c return rtsx_pci_write_register(pcr, LDO_CTL, mask, val); pcr 208 drivers/misc/cardreader/rtl8411.c static int rtl8411_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage) pcr 210 drivers/misc/cardreader/rtl8411.c return rtl8411_do_switch_output_voltage(pcr, voltage, pcr 214 drivers/misc/cardreader/rtl8411.c static int rtl8402_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage) pcr 216 drivers/misc/cardreader/rtl8411.c return rtl8411_do_switch_output_voltage(pcr, voltage, pcr 220 drivers/misc/cardreader/rtl8411.c static unsigned int rtl8411_cd_deglitch(struct rtsx_pcr *pcr) pcr 224 drivers/misc/cardreader/rtl8411.c card_exist = rtsx_pci_readl(pcr, RTSX_BIPR); pcr 228 drivers/misc/cardreader/rtl8411.c rtsx_pci_write_register(pcr, CD_PAD_CTL, pcr 231 drivers/misc/cardreader/rtl8411.c rtsx_pci_write_register(pcr, EFUSE_CONTENT, 0xe0, 0x00); pcr 236 drivers/misc/cardreader/rtl8411.c rtsx_pci_write_register(pcr, CARD_PWR_CTL, pcr 240 drivers/misc/cardreader/rtl8411.c card_exist = rtsx_pci_readl(pcr, RTSX_BIPR); pcr 248 drivers/misc/cardreader/rtl8411.c rtsx_pci_write_register(pcr, CARD_PWR_CTL, pcr 251 drivers/misc/cardreader/rtl8411.c pcr_dbg(pcr, "After CD deglitch, card_exist = 0x%x\n", pcr 257 drivers/misc/cardreader/rtl8411.c rtsx_pci_write_register(pcr, EFUSE_CONTENT, 0xe0, 0x40); pcr 258 drivers/misc/cardreader/rtl8411.c rtsx_pci_write_register(pcr, CD_PAD_CTL, pcr 262 drivers/misc/cardreader/rtl8411.c rtsx_pci_write_register(pcr, EFUSE_CONTENT, 0xe0, 0x80); pcr 263 drivers/misc/cardreader/rtl8411.c rtsx_pci_write_register(pcr, CD_PAD_CTL, pcr 460 drivers/misc/cardreader/rtl8411.c static void rtl8411_init_common_params(struct rtsx_pcr *pcr) pcr 462 drivers/misc/cardreader/rtl8411.c pcr->extra_caps = EXTRA_CAPS_SD_SDR50 | EXTRA_CAPS_SD_SDR104; pcr 463 drivers/misc/cardreader/rtl8411.c pcr->num_slots = 2; pcr 464 drivers/misc/cardreader/rtl8411.c pcr->flags = 0; pcr 465 drivers/misc/cardreader/rtl8411.c pcr->card_drive_sel = RTL8411_CARD_DRIVE_DEFAULT; pcr 466 drivers/misc/cardreader/rtl8411.c pcr->sd30_drive_sel_1v8 = DRIVER_TYPE_B; pcr 467 drivers/misc/cardreader/rtl8411.c pcr->sd30_drive_sel_3v3 = DRIVER_TYPE_D; pcr 468 drivers/misc/cardreader/rtl8411.c pcr->aspm_en = ASPM_L1_EN; pcr 469 drivers/misc/cardreader/rtl8411.c pcr->tx_initial_phase = SET_CLOCK_PHASE(23, 7, 14); pcr 470 drivers/misc/cardreader/rtl8411.c pcr->rx_initial_phase = SET_CLOCK_PHASE(4, 3, 10); pcr 471 drivers/misc/cardreader/rtl8411.c pcr->ic_version = rtl8411_get_ic_version(pcr); pcr 474 drivers/misc/cardreader/rtl8411.c void rtl8411_init_params(struct rtsx_pcr *pcr) pcr 476 drivers/misc/cardreader/rtl8411.c rtl8411_init_common_params(pcr); pcr 477 drivers/misc/cardreader/rtl8411.c pcr->ops = &rtl8411_pcr_ops; pcr 478 drivers/misc/cardreader/rtl8411.c set_pull_ctrl_tables(pcr, rtl8411); pcr 481 drivers/misc/cardreader/rtl8411.c void rtl8411b_init_params(struct rtsx_pcr *pcr) pcr 483 drivers/misc/cardreader/rtl8411.c rtl8411_init_common_params(pcr); pcr 484 drivers/misc/cardreader/rtl8411.c pcr->ops = &rtl8411b_pcr_ops; pcr 485 drivers/misc/cardreader/rtl8411.c if (rtl8411b_is_qfn48(pcr)) pcr 486 drivers/misc/cardreader/rtl8411.c set_pull_ctrl_tables(pcr, rtl8411b_qfn48); pcr 488 drivers/misc/cardreader/rtl8411.c set_pull_ctrl_tables(pcr, rtl8411b_qfn64); pcr 491 drivers/misc/cardreader/rtl8411.c void rtl8402_init_params(struct rtsx_pcr *pcr) pcr 493 drivers/misc/cardreader/rtl8411.c rtl8411_init_common_params(pcr); pcr 494 drivers/misc/cardreader/rtl8411.c pcr->ops = &rtl8402_pcr_ops; pcr 495 drivers/misc/cardreader/rtl8411.c set_pull_ctrl_tables(pcr, rtl8411); pcr 16 drivers/misc/cardreader/rts5209.c static u8 rts5209_get_ic_version(struct rtsx_pcr *pcr) pcr 20 drivers/misc/cardreader/rts5209.c val = rtsx_pci_readb(pcr, 0x1C); pcr 24 drivers/misc/cardreader/rts5209.c static void rts5209_fetch_vendor_settings(struct rtsx_pcr *pcr) pcr 28 drivers/misc/cardreader/rts5209.c rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®); pcr 29 drivers/misc/cardreader/rts5209.c pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg); pcr 33 drivers/misc/cardreader/rts5209.c pcr->flags |= PCR_MS_PMOS; pcr 34 drivers/misc/cardreader/rts5209.c pcr->aspm_en = rts5209_reg_to_aspm(reg); pcr 37 drivers/misc/cardreader/rts5209.c rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG2, ®); pcr 38 drivers/misc/cardreader/rts5209.c pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG2, reg); pcr 41 drivers/misc/cardreader/rts5209.c pcr->sd30_drive_sel_1v8 = pcr 43 drivers/misc/cardreader/rts5209.c pcr->sd30_drive_sel_3v3 = pcr 45 drivers/misc/cardreader/rts5209.c pcr->card_drive_sel = rts5209_reg_to_card_drive_sel(reg); pcr 49 drivers/misc/cardreader/rts5209.c static void rts5209_force_power_down(struct rtsx_pcr *pcr, u8 pm_state) pcr 51 drivers/misc/cardreader/rts5209.c rtsx_pci_write_register(pcr, FPDCTL, 0x07, 0x07); pcr 54 drivers/misc/cardreader/rts5209.c static int rts5209_extra_init_hw(struct rtsx_pcr *pcr) pcr 56 drivers/misc/cardreader/rts5209.c rtsx_pci_init_cmd(pcr); pcr 59 drivers/misc/cardreader/rts5209.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_GPIO, 0xFF, 0x03); pcr 61 drivers/misc/cardreader/rts5209.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, ASPM_FORCE_CTL, 0x3F, 0); pcr 63 drivers/misc/cardreader/rts5209.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PETXCFG, 0x08, 0x08); pcr 65 drivers/misc/cardreader/rts5209.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_GPIO_DIR, 0xFF, 0x03); pcr 67 drivers/misc/cardreader/rts5209.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD30_DRIVE_SEL, pcr 68 drivers/misc/cardreader/rts5209.c 0xFF, pcr->sd30_drive_sel_3v3); pcr 70 drivers/misc/cardreader/rts5209.c return rtsx_pci_send_cmd(pcr, 100); pcr 73 drivers/misc/cardreader/rts5209.c static int rts5209_optimize_phy(struct rtsx_pcr *pcr) pcr 75 drivers/misc/cardreader/rts5209.c return rtsx_pci_write_phy_register(pcr, 0x00, 0xB966); pcr 78 drivers/misc/cardreader/rts5209.c static int rts5209_turn_on_led(struct rtsx_pcr *pcr) pcr 80 drivers/misc/cardreader/rts5209.c return rtsx_pci_write_register(pcr, CARD_GPIO, 0x01, 0x00); pcr 83 drivers/misc/cardreader/rts5209.c static int rts5209_turn_off_led(struct rtsx_pcr *pcr) pcr 85 drivers/misc/cardreader/rts5209.c return rtsx_pci_write_register(pcr, CARD_GPIO, 0x01, 0x01); pcr 88 drivers/misc/cardreader/rts5209.c static int rts5209_enable_auto_blink(struct rtsx_pcr *pcr) pcr 90 drivers/misc/cardreader/rts5209.c return rtsx_pci_write_register(pcr, CARD_AUTO_BLINK, 0xFF, 0x0D); pcr 93 drivers/misc/cardreader/rts5209.c static int rts5209_disable_auto_blink(struct rtsx_pcr *pcr) pcr 95 drivers/misc/cardreader/rts5209.c return rtsx_pci_write_register(pcr, CARD_AUTO_BLINK, 0x08, 0x00); pcr 98 drivers/misc/cardreader/rts5209.c static int rts5209_card_power_on(struct rtsx_pcr *pcr, int card) pcr 107 drivers/misc/cardreader/rts5209.c if ((pcr->flags & PCR_MS_PMOS) && (card == RTSX_MS_CARD)) { pcr 113 drivers/misc/cardreader/rts5209.c rtsx_pci_init_cmd(pcr); pcr 114 drivers/misc/cardreader/rts5209.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_PWR_CTL, pcr 116 drivers/misc/cardreader/rts5209.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PWR_GATE_CTRL, pcr 118 drivers/misc/cardreader/rts5209.c err = rtsx_pci_send_cmd(pcr, 100); pcr 125 drivers/misc/cardreader/rts5209.c rtsx_pci_init_cmd(pcr); pcr 126 drivers/misc/cardreader/rts5209.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_PWR_CTL, pwr_mask, pwr_on); pcr 127 drivers/misc/cardreader/rts5209.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PWR_GATE_CTRL, pcr 129 drivers/misc/cardreader/rts5209.c return rtsx_pci_send_cmd(pcr, 100); pcr 132 drivers/misc/cardreader/rts5209.c static int rts5209_card_power_off(struct rtsx_pcr *pcr, int card) pcr 139 drivers/misc/cardreader/rts5209.c if ((pcr->flags & PCR_MS_PMOS) && (card == RTSX_MS_CARD)) { pcr 144 drivers/misc/cardreader/rts5209.c rtsx_pci_init_cmd(pcr); pcr 145 drivers/misc/cardreader/rts5209.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_PWR_CTL, pcr 147 drivers/misc/cardreader/rts5209.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PWR_GATE_CTRL, pcr 149 drivers/misc/cardreader/rts5209.c return rtsx_pci_send_cmd(pcr, 100); pcr 152 drivers/misc/cardreader/rts5209.c static int rts5209_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage) pcr 157 drivers/misc/cardreader/rts5209.c err = rtsx_pci_write_register(pcr, pcr 158 drivers/misc/cardreader/rts5209.c SD30_DRIVE_SEL, 0x07, pcr->sd30_drive_sel_3v3); pcr 161 drivers/misc/cardreader/rts5209.c err = rtsx_pci_write_phy_register(pcr, 0x08, 0x4FC0 | 0x24); pcr 165 drivers/misc/cardreader/rts5209.c err = rtsx_pci_write_register(pcr, pcr 166 drivers/misc/cardreader/rts5209.c SD30_DRIVE_SEL, 0x07, pcr->sd30_drive_sel_1v8); pcr 169 drivers/misc/cardreader/rts5209.c err = rtsx_pci_write_phy_register(pcr, 0x08, 0x4C40 | 0x24); pcr 245 drivers/misc/cardreader/rts5209.c void rts5209_init_params(struct rtsx_pcr *pcr) pcr 247 drivers/misc/cardreader/rts5209.c pcr->extra_caps = EXTRA_CAPS_SD_SDR50 | pcr 249 drivers/misc/cardreader/rts5209.c pcr->num_slots = 2; pcr 250 drivers/misc/cardreader/rts5209.c pcr->ops = &rts5209_pcr_ops; pcr 252 drivers/misc/cardreader/rts5209.c pcr->flags = 0; pcr 253 drivers/misc/cardreader/rts5209.c pcr->card_drive_sel = RTS5209_CARD_DRIVE_DEFAULT; pcr 254 drivers/misc/cardreader/rts5209.c pcr->sd30_drive_sel_1v8 = DRIVER_TYPE_B; pcr 255 drivers/misc/cardreader/rts5209.c pcr->sd30_drive_sel_3v3 = DRIVER_TYPE_D; pcr 256 drivers/misc/cardreader/rts5209.c pcr->aspm_en = ASPM_L1_EN; pcr 257 drivers/misc/cardreader/rts5209.c pcr->tx_initial_phase = SET_CLOCK_PHASE(27, 27, 16); pcr 258 drivers/misc/cardreader/rts5209.c pcr->rx_initial_phase = SET_CLOCK_PHASE(24, 6, 5); pcr 260 drivers/misc/cardreader/rts5209.c pcr->ic_version = rts5209_get_ic_version(pcr); pcr 261 drivers/misc/cardreader/rts5209.c pcr->sd_pull_ctl_enable_tbl = rts5209_sd_pull_ctl_enable_tbl; pcr 262 drivers/misc/cardreader/rts5209.c pcr->sd_pull_ctl_disable_tbl = rts5209_sd_pull_ctl_disable_tbl; pcr 263 drivers/misc/cardreader/rts5209.c pcr->ms_pull_ctl_enable_tbl = rts5209_ms_pull_ctl_enable_tbl; pcr 264 drivers/misc/cardreader/rts5209.c pcr->ms_pull_ctl_disable_tbl = rts5209_ms_pull_ctl_disable_tbl; pcr 17 drivers/misc/cardreader/rts5227.c static u8 rts5227_get_ic_version(struct rtsx_pcr *pcr) pcr 21 drivers/misc/cardreader/rts5227.c rtsx_pci_read_register(pcr, DUMMY_REG_RESET_0, &val); pcr 25 drivers/misc/cardreader/rts5227.c static void rts5227_fill_driving(struct rtsx_pcr *pcr, u8 voltage) pcr 43 drivers/misc/cardreader/rts5227.c drive_sel = pcr->sd30_drive_sel_3v3; pcr 46 drivers/misc/cardreader/rts5227.c drive_sel = pcr->sd30_drive_sel_1v8; pcr 49 drivers/misc/cardreader/rts5227.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD30_CLK_DRIVE_SEL, pcr 51 drivers/misc/cardreader/rts5227.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD30_CMD_DRIVE_SEL, pcr 53 drivers/misc/cardreader/rts5227.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD30_DAT_DRIVE_SEL, pcr 57 drivers/misc/cardreader/rts5227.c static void rts5227_fetch_vendor_settings(struct rtsx_pcr *pcr) pcr 61 drivers/misc/cardreader/rts5227.c rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®); pcr 62 drivers/misc/cardreader/rts5227.c pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg); pcr 67 drivers/misc/cardreader/rts5227.c pcr->aspm_en = rtsx_reg_to_aspm(reg); pcr 68 drivers/misc/cardreader/rts5227.c pcr->sd30_drive_sel_1v8 = rtsx_reg_to_sd30_drive_sel_1v8(reg); pcr 69 drivers/misc/cardreader/rts5227.c pcr->card_drive_sel &= 0x3F; pcr 70 drivers/misc/cardreader/rts5227.c pcr->card_drive_sel |= rtsx_reg_to_card_drive_sel(reg); pcr 72 drivers/misc/cardreader/rts5227.c rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG2, ®); pcr 73 drivers/misc/cardreader/rts5227.c pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG2, reg); pcr 74 drivers/misc/cardreader/rts5227.c pcr->sd30_drive_sel_3v3 = rtsx_reg_to_sd30_drive_sel_3v3(reg); pcr 76 drivers/misc/cardreader/rts5227.c pcr->flags |= PCR_REVERSE_SOCKET; pcr 79 drivers/misc/cardreader/rts5227.c static void rts5227_force_power_down(struct rtsx_pcr *pcr, u8 pm_state) pcr 82 drivers/misc/cardreader/rts5227.c rtsx_pci_write_register(pcr, AUTOLOAD_CFG_BASE + 1, 0xFF, 0); pcr 83 drivers/misc/cardreader/rts5227.c rtsx_pci_write_register(pcr, AUTOLOAD_CFG_BASE + 2, 0xFF, 0); pcr 84 drivers/misc/cardreader/rts5227.c rtsx_pci_write_register(pcr, AUTOLOAD_CFG_BASE + 3, 0x01, 0); pcr 87 drivers/misc/cardreader/rts5227.c rtsx_pci_write_register(pcr, pcr->reg_pm_ctrl3, 0x10, 0x10); pcr 89 drivers/misc/cardreader/rts5227.c rtsx_pci_write_register(pcr, FPDCTL, 0x03, 0x03); pcr 92 drivers/misc/cardreader/rts5227.c static int rts5227_extra_init_hw(struct rtsx_pcr *pcr) pcr 96 drivers/misc/cardreader/rts5227.c rtsx_pci_init_cmd(pcr); pcr 99 drivers/misc/cardreader/rts5227.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, GPIO_CTL, 0x02, 0x02); pcr 101 drivers/misc/cardreader/rts5227.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, ASPM_FORCE_CTL, 0x3F, 0); pcr 103 drivers/misc/cardreader/rts5227.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, LDO_PWR_SEL, 0x03, 0x00); pcr 104 drivers/misc/cardreader/rts5227.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, LDO_PWR_SEL, 0x03, 0x01); pcr 106 drivers/misc/cardreader/rts5227.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, OLT_LED_CTL, 0x0F, 0x02); pcr 108 drivers/misc/cardreader/rts5227.c pcie_capability_read_word(pcr->pci, PCI_EXP_DEVCTL2, &cap); pcr 110 drivers/misc/cardreader/rts5227.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, LTR_CTL, 0xFF, 0xA3); pcr 112 drivers/misc/cardreader/rts5227.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, OBFF_CFG, 0x03, 0x03); pcr 114 drivers/misc/cardreader/rts5227.c rts5227_fill_driving(pcr, OUTPUT_3V3); pcr 116 drivers/misc/cardreader/rts5227.c if (pcr->flags & PCR_REVERSE_SOCKET) pcr 117 drivers/misc/cardreader/rts5227.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PETXCFG, 0xB8, 0xB8); pcr 119 drivers/misc/cardreader/rts5227.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PETXCFG, 0xB8, 0x88); pcr 120 drivers/misc/cardreader/rts5227.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, pcr->reg_pm_ctrl3, 0x10, 0x00); pcr 122 drivers/misc/cardreader/rts5227.c return rtsx_pci_send_cmd(pcr, 100); pcr 125 drivers/misc/cardreader/rts5227.c static int rts5227_optimize_phy(struct rtsx_pcr *pcr) pcr 129 drivers/misc/cardreader/rts5227.c err = rtsx_pci_write_register(pcr, PM_CTRL3, D3_DELINK_MODE_EN, 0x00); pcr 134 drivers/misc/cardreader/rts5227.c return rtsx_pci_write_phy_register(pcr, 0x00, 0xBA42); pcr 137 drivers/misc/cardreader/rts5227.c static int rts5227_turn_on_led(struct rtsx_pcr *pcr) pcr 139 drivers/misc/cardreader/rts5227.c return rtsx_pci_write_register(pcr, GPIO_CTL, 0x02, 0x02); pcr 142 drivers/misc/cardreader/rts5227.c static int rts5227_turn_off_led(struct rtsx_pcr *pcr) pcr 144 drivers/misc/cardreader/rts5227.c return rtsx_pci_write_register(pcr, GPIO_CTL, 0x02, 0x00); pcr 147 drivers/misc/cardreader/rts5227.c static int rts5227_enable_auto_blink(struct rtsx_pcr *pcr) pcr 149 drivers/misc/cardreader/rts5227.c return rtsx_pci_write_register(pcr, OLT_LED_CTL, 0x08, 0x08); pcr 152 drivers/misc/cardreader/rts5227.c static int rts5227_disable_auto_blink(struct rtsx_pcr *pcr) pcr 154 drivers/misc/cardreader/rts5227.c return rtsx_pci_write_register(pcr, OLT_LED_CTL, 0x08, 0x00); pcr 157 drivers/misc/cardreader/rts5227.c static int rts5227_card_power_on(struct rtsx_pcr *pcr, int card) pcr 161 drivers/misc/cardreader/rts5227.c if (pcr->option.ocp_en) pcr 162 drivers/misc/cardreader/rts5227.c rtsx_pci_enable_ocp(pcr); pcr 164 drivers/misc/cardreader/rts5227.c rtsx_pci_init_cmd(pcr); pcr 165 drivers/misc/cardreader/rts5227.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_PWR_CTL, pcr 168 drivers/misc/cardreader/rts5227.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PWR_GATE_CTRL, pcr 171 drivers/misc/cardreader/rts5227.c err = rtsx_pci_send_cmd(pcr, 100); pcr 177 drivers/misc/cardreader/rts5227.c rtsx_pci_init_cmd(pcr); pcr 178 drivers/misc/cardreader/rts5227.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_PWR_CTL, pcr 181 drivers/misc/cardreader/rts5227.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PWR_GATE_CTRL, pcr 184 drivers/misc/cardreader/rts5227.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_OE, pcr 186 drivers/misc/cardreader/rts5227.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_OE, pcr 188 drivers/misc/cardreader/rts5227.c return rtsx_pci_send_cmd(pcr, 100); pcr 191 drivers/misc/cardreader/rts5227.c static int rts5227_card_power_off(struct rtsx_pcr *pcr, int card) pcr 193 drivers/misc/cardreader/rts5227.c if (pcr->option.ocp_en) pcr 194 drivers/misc/cardreader/rts5227.c rtsx_pci_disable_ocp(pcr); pcr 196 drivers/misc/cardreader/rts5227.c rtsx_pci_write_register(pcr, CARD_PWR_CTL, SD_POWER_MASK | pcr 198 drivers/misc/cardreader/rts5227.c rtsx_pci_write_register(pcr, PWR_GATE_CTRL, LDO3318_PWR_MASK, 0X00); pcr 203 drivers/misc/cardreader/rts5227.c static int rts5227_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage) pcr 208 drivers/misc/cardreader/rts5227.c err = rtsx_pci_write_phy_register(pcr, 0x08, 0x4FC0 | 0x24); pcr 212 drivers/misc/cardreader/rts5227.c err = rtsx_pci_write_phy_register(pcr, 0x11, 0x3C02); pcr 215 drivers/misc/cardreader/rts5227.c err = rtsx_pci_write_phy_register(pcr, 0x08, 0x4C80 | 0x24); pcr 223 drivers/misc/cardreader/rts5227.c rtsx_pci_init_cmd(pcr); pcr 224 drivers/misc/cardreader/rts5227.c rts5227_fill_driving(pcr, voltage); pcr 225 drivers/misc/cardreader/rts5227.c return rtsx_pci_send_cmd(pcr, 100); pcr 290 drivers/misc/cardreader/rts5227.c void rts5227_init_params(struct rtsx_pcr *pcr) pcr 292 drivers/misc/cardreader/rts5227.c pcr->extra_caps = EXTRA_CAPS_SD_SDR50 | EXTRA_CAPS_SD_SDR104; pcr 293 drivers/misc/cardreader/rts5227.c pcr->num_slots = 2; pcr 294 drivers/misc/cardreader/rts5227.c pcr->ops = &rts5227_pcr_ops; pcr 296 drivers/misc/cardreader/rts5227.c pcr->flags = 0; pcr 297 drivers/misc/cardreader/rts5227.c pcr->card_drive_sel = RTSX_CARD_DRIVE_DEFAULT; pcr 298 drivers/misc/cardreader/rts5227.c pcr->sd30_drive_sel_1v8 = CFG_DRIVER_TYPE_B; pcr 299 drivers/misc/cardreader/rts5227.c pcr->sd30_drive_sel_3v3 = CFG_DRIVER_TYPE_B; pcr 300 drivers/misc/cardreader/rts5227.c pcr->aspm_en = ASPM_L1_EN; pcr 301 drivers/misc/cardreader/rts5227.c pcr->tx_initial_phase = SET_CLOCK_PHASE(27, 27, 15); pcr 302 drivers/misc/cardreader/rts5227.c pcr->rx_initial_phase = SET_CLOCK_PHASE(30, 7, 7); pcr 304 drivers/misc/cardreader/rts5227.c pcr->ic_version = rts5227_get_ic_version(pcr); pcr 305 drivers/misc/cardreader/rts5227.c pcr->sd_pull_ctl_enable_tbl = rts5227_sd_pull_ctl_enable_tbl; pcr 306 drivers/misc/cardreader/rts5227.c pcr->sd_pull_ctl_disable_tbl = rts5227_sd_pull_ctl_disable_tbl; pcr 307 drivers/misc/cardreader/rts5227.c pcr->ms_pull_ctl_enable_tbl = rts5227_ms_pull_ctl_enable_tbl; pcr 308 drivers/misc/cardreader/rts5227.c pcr->ms_pull_ctl_disable_tbl = rts5227_ms_pull_ctl_disable_tbl; pcr 310 drivers/misc/cardreader/rts5227.c pcr->reg_pm_ctrl3 = PM_CTRL3; pcr 313 drivers/misc/cardreader/rts5227.c static int rts522a_optimize_phy(struct rtsx_pcr *pcr) pcr 317 drivers/misc/cardreader/rts5227.c err = rtsx_pci_write_register(pcr, RTS522A_PM_CTRL3, D3_DELINK_MODE_EN, pcr 322 drivers/misc/cardreader/rts5227.c if (is_version(pcr, 0x522A, IC_VER_A)) { pcr 323 drivers/misc/cardreader/rts5227.c err = rtsx_pci_write_phy_register(pcr, PHY_RCR2, pcr 328 drivers/misc/cardreader/rts5227.c rtsx_pci_write_phy_register(pcr, PHY_RCR1, PHY_RCR1_INIT_27S); pcr 329 drivers/misc/cardreader/rts5227.c rtsx_pci_write_phy_register(pcr, PHY_FLD0, PHY_FLD0_INIT_27S); pcr 330 drivers/misc/cardreader/rts5227.c rtsx_pci_write_phy_register(pcr, PHY_FLD3, PHY_FLD3_INIT_27S); pcr 331 drivers/misc/cardreader/rts5227.c rtsx_pci_write_phy_register(pcr, PHY_FLD4, PHY_FLD4_INIT_27S); pcr 337 drivers/misc/cardreader/rts5227.c static int rts522a_extra_init_hw(struct rtsx_pcr *pcr) pcr 339 drivers/misc/cardreader/rts5227.c rts5227_extra_init_hw(pcr); pcr 341 drivers/misc/cardreader/rts5227.c rtsx_pci_write_register(pcr, FUNC_FORCE_CTL, FUNC_FORCE_UPME_XMT_DBG, pcr 343 drivers/misc/cardreader/rts5227.c rtsx_pci_write_register(pcr, PCLK_CTL, 0x04, 0x04); pcr 344 drivers/misc/cardreader/rts5227.c rtsx_pci_write_register(pcr, PM_EVENT_DEBUG, PME_DEBUG_0, PME_DEBUG_0); pcr 345 drivers/misc/cardreader/rts5227.c rtsx_pci_write_register(pcr, PM_CLK_FORCE_CTL, 0xFF, 0x11); pcr 350 drivers/misc/cardreader/rts5227.c static int rts522a_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage) pcr 355 drivers/misc/cardreader/rts5227.c err = rtsx_pci_write_phy_register(pcr, 0x08, 0x57E4); pcr 359 drivers/misc/cardreader/rts5227.c err = rtsx_pci_write_phy_register(pcr, 0x11, 0x3C02); pcr 362 drivers/misc/cardreader/rts5227.c err = rtsx_pci_write_phy_register(pcr, 0x08, 0x54A4); pcr 370 drivers/misc/cardreader/rts5227.c rtsx_pci_init_cmd(pcr); pcr 371 drivers/misc/cardreader/rts5227.c rts5227_fill_driving(pcr, voltage); pcr 372 drivers/misc/cardreader/rts5227.c return rtsx_pci_send_cmd(pcr, 100); pcr 394 drivers/misc/cardreader/rts5227.c void rts522a_init_params(struct rtsx_pcr *pcr) pcr 396 drivers/misc/cardreader/rts5227.c rts5227_init_params(pcr); pcr 397 drivers/misc/cardreader/rts5227.c pcr->ops = &rts522a_pcr_ops; pcr 398 drivers/misc/cardreader/rts5227.c pcr->tx_initial_phase = SET_CLOCK_PHASE(20, 20, 11); pcr 399 drivers/misc/cardreader/rts5227.c pcr->reg_pm_ctrl3 = RTS522A_PM_CTRL3; pcr 401 drivers/misc/cardreader/rts5227.c pcr->option.ocp_en = 1; pcr 402 drivers/misc/cardreader/rts5227.c if (pcr->option.ocp_en) pcr 403 drivers/misc/cardreader/rts5227.c pcr->hw_param.interrupt_en |= SD_OC_INT_EN; pcr 404 drivers/misc/cardreader/rts5227.c pcr->hw_param.ocp_glitch = SD_OCP_GLITCH_10M; pcr 405 drivers/misc/cardreader/rts5227.c pcr->option.sd_800mA_ocp_thd = RTS522A_OCP_THD_800; pcr 16 drivers/misc/cardreader/rts5229.c static u8 rts5229_get_ic_version(struct rtsx_pcr *pcr) pcr 20 drivers/misc/cardreader/rts5229.c rtsx_pci_read_register(pcr, DUMMY_REG_RESET_0, &val); pcr 24 drivers/misc/cardreader/rts5229.c static void rts5229_fetch_vendor_settings(struct rtsx_pcr *pcr) pcr 28 drivers/misc/cardreader/rts5229.c rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®); pcr 29 drivers/misc/cardreader/rts5229.c pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg); pcr 34 drivers/misc/cardreader/rts5229.c pcr->aspm_en = rtsx_reg_to_aspm(reg); pcr 35 drivers/misc/cardreader/rts5229.c pcr->sd30_drive_sel_1v8 = pcr 37 drivers/misc/cardreader/rts5229.c pcr->card_drive_sel &= 0x3F; pcr 38 drivers/misc/cardreader/rts5229.c pcr->card_drive_sel |= rtsx_reg_to_card_drive_sel(reg); pcr 40 drivers/misc/cardreader/rts5229.c rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG2, ®); pcr 41 drivers/misc/cardreader/rts5229.c pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG2, reg); pcr 42 drivers/misc/cardreader/rts5229.c pcr->sd30_drive_sel_3v3 = pcr 46 drivers/misc/cardreader/rts5229.c static void rts5229_force_power_down(struct rtsx_pcr *pcr, u8 pm_state) pcr 48 drivers/misc/cardreader/rts5229.c rtsx_pci_write_register(pcr, FPDCTL, 0x03, 0x03); pcr 51 drivers/misc/cardreader/rts5229.c static int rts5229_extra_init_hw(struct rtsx_pcr *pcr) pcr 53 drivers/misc/cardreader/rts5229.c rtsx_pci_init_cmd(pcr); pcr 56 drivers/misc/cardreader/rts5229.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, GPIO_CTL, 0x02, 0x02); pcr 58 drivers/misc/cardreader/rts5229.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, ASPM_FORCE_CTL, 0x3F, 0); pcr 60 drivers/misc/cardreader/rts5229.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PETXCFG, 0x08, 0x08); pcr 62 drivers/misc/cardreader/rts5229.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, LDO_PWR_SEL, 0x03, 0x00); pcr 63 drivers/misc/cardreader/rts5229.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, LDO_PWR_SEL, 0x03, 0x01); pcr 65 drivers/misc/cardreader/rts5229.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, OLT_LED_CTL, 0x0F, 0x02); pcr 67 drivers/misc/cardreader/rts5229.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD30_DRIVE_SEL, pcr 68 drivers/misc/cardreader/rts5229.c 0xFF, pcr->sd30_drive_sel_3v3); pcr 70 drivers/misc/cardreader/rts5229.c return rtsx_pci_send_cmd(pcr, 100); pcr 73 drivers/misc/cardreader/rts5229.c static int rts5229_optimize_phy(struct rtsx_pcr *pcr) pcr 76 drivers/misc/cardreader/rts5229.c return rtsx_pci_write_phy_register(pcr, 0x00, 0xBA42); pcr 79 drivers/misc/cardreader/rts5229.c static int rts5229_turn_on_led(struct rtsx_pcr *pcr) pcr 81 drivers/misc/cardreader/rts5229.c return rtsx_pci_write_register(pcr, GPIO_CTL, 0x02, 0x02); pcr 84 drivers/misc/cardreader/rts5229.c static int rts5229_turn_off_led(struct rtsx_pcr *pcr) pcr 86 drivers/misc/cardreader/rts5229.c return rtsx_pci_write_register(pcr, GPIO_CTL, 0x02, 0x00); pcr 89 drivers/misc/cardreader/rts5229.c static int rts5229_enable_auto_blink(struct rtsx_pcr *pcr) pcr 91 drivers/misc/cardreader/rts5229.c return rtsx_pci_write_register(pcr, OLT_LED_CTL, 0x08, 0x08); pcr 94 drivers/misc/cardreader/rts5229.c static int rts5229_disable_auto_blink(struct rtsx_pcr *pcr) pcr 96 drivers/misc/cardreader/rts5229.c return rtsx_pci_write_register(pcr, OLT_LED_CTL, 0x08, 0x00); pcr 99 drivers/misc/cardreader/rts5229.c static int rts5229_card_power_on(struct rtsx_pcr *pcr, int card) pcr 103 drivers/misc/cardreader/rts5229.c rtsx_pci_init_cmd(pcr); pcr 104 drivers/misc/cardreader/rts5229.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_PWR_CTL, pcr 106 drivers/misc/cardreader/rts5229.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PWR_GATE_CTRL, pcr 108 drivers/misc/cardreader/rts5229.c err = rtsx_pci_send_cmd(pcr, 100); pcr 115 drivers/misc/cardreader/rts5229.c rtsx_pci_init_cmd(pcr); pcr 116 drivers/misc/cardreader/rts5229.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_PWR_CTL, pcr 118 drivers/misc/cardreader/rts5229.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PWR_GATE_CTRL, pcr 120 drivers/misc/cardreader/rts5229.c return rtsx_pci_send_cmd(pcr, 100); pcr 123 drivers/misc/cardreader/rts5229.c static int rts5229_card_power_off(struct rtsx_pcr *pcr, int card) pcr 125 drivers/misc/cardreader/rts5229.c rtsx_pci_init_cmd(pcr); pcr 126 drivers/misc/cardreader/rts5229.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_PWR_CTL, pcr 129 drivers/misc/cardreader/rts5229.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PWR_GATE_CTRL, pcr 131 drivers/misc/cardreader/rts5229.c return rtsx_pci_send_cmd(pcr, 100); pcr 134 drivers/misc/cardreader/rts5229.c static int rts5229_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage) pcr 139 drivers/misc/cardreader/rts5229.c err = rtsx_pci_write_register(pcr, pcr 140 drivers/misc/cardreader/rts5229.c SD30_DRIVE_SEL, 0x07, pcr->sd30_drive_sel_3v3); pcr 143 drivers/misc/cardreader/rts5229.c err = rtsx_pci_write_phy_register(pcr, 0x08, 0x4FC0 | 0x24); pcr 147 drivers/misc/cardreader/rts5229.c err = rtsx_pci_write_register(pcr, pcr 148 drivers/misc/cardreader/rts5229.c SD30_DRIVE_SEL, 0x07, pcr->sd30_drive_sel_1v8); pcr 151 drivers/misc/cardreader/rts5229.c err = rtsx_pci_write_phy_register(pcr, 0x08, 0x4C40 | 0x24); pcr 237 drivers/misc/cardreader/rts5229.c void rts5229_init_params(struct rtsx_pcr *pcr) pcr 239 drivers/misc/cardreader/rts5229.c pcr->extra_caps = EXTRA_CAPS_SD_SDR50 | EXTRA_CAPS_SD_SDR104; pcr 240 drivers/misc/cardreader/rts5229.c pcr->num_slots = 2; pcr 241 drivers/misc/cardreader/rts5229.c pcr->ops = &rts5229_pcr_ops; pcr 243 drivers/misc/cardreader/rts5229.c pcr->flags = 0; pcr 244 drivers/misc/cardreader/rts5229.c pcr->card_drive_sel = RTSX_CARD_DRIVE_DEFAULT; pcr 245 drivers/misc/cardreader/rts5229.c pcr->sd30_drive_sel_1v8 = DRIVER_TYPE_B; pcr 246 drivers/misc/cardreader/rts5229.c pcr->sd30_drive_sel_3v3 = DRIVER_TYPE_D; pcr 247 drivers/misc/cardreader/rts5229.c pcr->aspm_en = ASPM_L1_EN; pcr 248 drivers/misc/cardreader/rts5229.c pcr->tx_initial_phase = SET_CLOCK_PHASE(27, 27, 15); pcr 249 drivers/misc/cardreader/rts5229.c pcr->rx_initial_phase = SET_CLOCK_PHASE(30, 6, 6); pcr 251 drivers/misc/cardreader/rts5229.c pcr->ic_version = rts5229_get_ic_version(pcr); pcr 252 drivers/misc/cardreader/rts5229.c if (pcr->ic_version == IC_VER_C) { pcr 253 drivers/misc/cardreader/rts5229.c pcr->sd_pull_ctl_enable_tbl = rts5229_sd_pull_ctl_enable_tbl2; pcr 254 drivers/misc/cardreader/rts5229.c pcr->sd_pull_ctl_disable_tbl = rts5229_sd_pull_ctl_disable_tbl2; pcr 256 drivers/misc/cardreader/rts5229.c pcr->sd_pull_ctl_enable_tbl = rts5229_sd_pull_ctl_enable_tbl1; pcr 257 drivers/misc/cardreader/rts5229.c pcr->sd_pull_ctl_disable_tbl = rts5229_sd_pull_ctl_disable_tbl1; pcr 259 drivers/misc/cardreader/rts5229.c pcr->ms_pull_ctl_enable_tbl = rts5229_ms_pull_ctl_enable_tbl; pcr 260 drivers/misc/cardreader/rts5229.c pcr->ms_pull_ctl_disable_tbl = rts5229_ms_pull_ctl_disable_tbl; pcr 16 drivers/misc/cardreader/rts5249.c static u8 rts5249_get_ic_version(struct rtsx_pcr *pcr) pcr 20 drivers/misc/cardreader/rts5249.c rtsx_pci_read_register(pcr, DUMMY_REG_RESET_0, &val); pcr 24 drivers/misc/cardreader/rts5249.c static void rts5249_fill_driving(struct rtsx_pcr *pcr, u8 voltage) pcr 42 drivers/misc/cardreader/rts5249.c drive_sel = pcr->sd30_drive_sel_3v3; pcr 45 drivers/misc/cardreader/rts5249.c drive_sel = pcr->sd30_drive_sel_1v8; pcr 48 drivers/misc/cardreader/rts5249.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD30_CLK_DRIVE_SEL, pcr 50 drivers/misc/cardreader/rts5249.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD30_CMD_DRIVE_SEL, pcr 52 drivers/misc/cardreader/rts5249.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD30_DAT_DRIVE_SEL, pcr 56 drivers/misc/cardreader/rts5249.c static void rtsx_base_fetch_vendor_settings(struct rtsx_pcr *pcr) pcr 60 drivers/misc/cardreader/rts5249.c rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®); pcr 61 drivers/misc/cardreader/rts5249.c pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg); pcr 64 drivers/misc/cardreader/rts5249.c pcr_dbg(pcr, "skip fetch vendor setting\n"); pcr 68 drivers/misc/cardreader/rts5249.c pcr->aspm_en = rtsx_reg_to_aspm(reg); pcr 69 drivers/misc/cardreader/rts5249.c pcr->sd30_drive_sel_1v8 = rtsx_reg_to_sd30_drive_sel_1v8(reg); pcr 70 drivers/misc/cardreader/rts5249.c pcr->card_drive_sel &= 0x3F; pcr 71 drivers/misc/cardreader/rts5249.c pcr->card_drive_sel |= rtsx_reg_to_card_drive_sel(reg); pcr 73 drivers/misc/cardreader/rts5249.c rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG2, ®); pcr 74 drivers/misc/cardreader/rts5249.c pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG2, reg); pcr 75 drivers/misc/cardreader/rts5249.c pcr->sd30_drive_sel_3v3 = rtsx_reg_to_sd30_drive_sel_3v3(reg); pcr 77 drivers/misc/cardreader/rts5249.c pcr->flags |= PCR_REVERSE_SOCKET; pcr 80 drivers/misc/cardreader/rts5249.c static void rtsx_base_force_power_down(struct rtsx_pcr *pcr, u8 pm_state) pcr 83 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, AUTOLOAD_CFG_BASE + 1, 0xFF, 0); pcr 84 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, AUTOLOAD_CFG_BASE + 2, 0xFF, 0); pcr 85 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, AUTOLOAD_CFG_BASE + 3, 0x01, 0); pcr 88 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, pcr->reg_pm_ctrl3, pcr 91 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, FPDCTL, 0x03, 0x03); pcr 94 drivers/misc/cardreader/rts5249.c static void rts5249_init_from_cfg(struct rtsx_pcr *pcr) pcr 96 drivers/misc/cardreader/rts5249.c struct rtsx_cr_option *option = &(pcr->option); pcr 99 drivers/misc/cardreader/rts5249.c if (CHK_PCI_PID(pcr, PID_524A)) pcr 100 drivers/misc/cardreader/rts5249.c rtsx_pci_read_config_dword(pcr, pcr 103 drivers/misc/cardreader/rts5249.c rtsx_pci_read_config_dword(pcr, pcr 107 drivers/misc/cardreader/rts5249.c rtsx_set_dev_flag(pcr, ASPM_L1_1_EN); pcr 110 drivers/misc/cardreader/rts5249.c rtsx_set_dev_flag(pcr, ASPM_L1_2_EN); pcr 113 drivers/misc/cardreader/rts5249.c rtsx_set_dev_flag(pcr, PM_L1_1_EN); pcr 116 drivers/misc/cardreader/rts5249.c rtsx_set_dev_flag(pcr, PM_L1_2_EN); pcr 121 drivers/misc/cardreader/rts5249.c pcie_capability_read_word(pcr->pci, PCI_EXP_DEVCTL2, &val); pcr 125 drivers/misc/cardreader/rts5249.c rtsx_set_ltr_latency(pcr, option->ltr_active_latency); pcr 132 drivers/misc/cardreader/rts5249.c static int rts5249_init_from_hw(struct rtsx_pcr *pcr) pcr 134 drivers/misc/cardreader/rts5249.c struct rtsx_cr_option *option = &(pcr->option); pcr 136 drivers/misc/cardreader/rts5249.c if (rtsx_check_dev_flag(pcr, ASPM_L1_1_EN | ASPM_L1_2_EN pcr 145 drivers/misc/cardreader/rts5249.c static int rts5249_extra_init_hw(struct rtsx_pcr *pcr) pcr 147 drivers/misc/cardreader/rts5249.c struct rtsx_cr_option *option = &(pcr->option); pcr 149 drivers/misc/cardreader/rts5249.c rts5249_init_from_cfg(pcr); pcr 150 drivers/misc/cardreader/rts5249.c rts5249_init_from_hw(pcr); pcr 152 drivers/misc/cardreader/rts5249.c rtsx_pci_init_cmd(pcr); pcr 155 drivers/misc/cardreader/rts5249.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, L1SUB_CONFIG3, 0xFF, 0x00); pcr 157 drivers/misc/cardreader/rts5249.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, GPIO_CTL, 0x02, 0x02); pcr 159 drivers/misc/cardreader/rts5249.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, ASPM_FORCE_CTL, 0x3F, 0); pcr 161 drivers/misc/cardreader/rts5249.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, LDO_PWR_SEL, 0x03, 0x00); pcr 162 drivers/misc/cardreader/rts5249.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, LDO_PWR_SEL, 0x03, 0x01); pcr 164 drivers/misc/cardreader/rts5249.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, OLT_LED_CTL, 0x0F, 0x02); pcr 166 drivers/misc/cardreader/rts5249.c rts5249_fill_driving(pcr, OUTPUT_3V3); pcr 167 drivers/misc/cardreader/rts5249.c if (pcr->flags & PCR_REVERSE_SOCKET) pcr 168 drivers/misc/cardreader/rts5249.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PETXCFG, 0xB0, 0xB0); pcr 170 drivers/misc/cardreader/rts5249.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PETXCFG, 0xB0, 0x80); pcr 177 drivers/misc/cardreader/rts5249.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PETXCFG, pcr 180 drivers/misc/cardreader/rts5249.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PETXCFG, pcr 183 drivers/misc/cardreader/rts5249.c return rtsx_pci_send_cmd(pcr, CMD_TIMEOUT_DEF); pcr 186 drivers/misc/cardreader/rts5249.c static int rts5249_optimize_phy(struct rtsx_pcr *pcr) pcr 190 drivers/misc/cardreader/rts5249.c err = rtsx_pci_write_register(pcr, PM_CTRL3, D3_DELINK_MODE_EN, 0x00); pcr 194 drivers/misc/cardreader/rts5249.c err = rtsx_pci_write_phy_register(pcr, PHY_REV, pcr 205 drivers/misc/cardreader/rts5249.c err = rtsx_pci_write_phy_register(pcr, PHY_BPCR, pcr 211 drivers/misc/cardreader/rts5249.c err = rtsx_pci_write_phy_register(pcr, PHY_PCR, pcr 218 drivers/misc/cardreader/rts5249.c err = rtsx_pci_write_phy_register(pcr, PHY_RCR2, pcr 225 drivers/misc/cardreader/rts5249.c err = rtsx_pci_write_phy_register(pcr, PHY_FLD4, pcr 232 drivers/misc/cardreader/rts5249.c err = rtsx_pci_write_phy_register(pcr, PHY_RDR, pcr 236 drivers/misc/cardreader/rts5249.c err = rtsx_pci_write_phy_register(pcr, PHY_RCR1, pcr 240 drivers/misc/cardreader/rts5249.c err = rtsx_pci_write_phy_register(pcr, PHY_FLD3, pcr 246 drivers/misc/cardreader/rts5249.c return rtsx_pci_write_phy_register(pcr, PHY_TUNE, pcr 252 drivers/misc/cardreader/rts5249.c static int rtsx_base_turn_on_led(struct rtsx_pcr *pcr) pcr 254 drivers/misc/cardreader/rts5249.c return rtsx_pci_write_register(pcr, GPIO_CTL, 0x02, 0x02); pcr 257 drivers/misc/cardreader/rts5249.c static int rtsx_base_turn_off_led(struct rtsx_pcr *pcr) pcr 259 drivers/misc/cardreader/rts5249.c return rtsx_pci_write_register(pcr, GPIO_CTL, 0x02, 0x00); pcr 262 drivers/misc/cardreader/rts5249.c static int rtsx_base_enable_auto_blink(struct rtsx_pcr *pcr) pcr 264 drivers/misc/cardreader/rts5249.c return rtsx_pci_write_register(pcr, OLT_LED_CTL, 0x08, 0x08); pcr 267 drivers/misc/cardreader/rts5249.c static int rtsx_base_disable_auto_blink(struct rtsx_pcr *pcr) pcr 269 drivers/misc/cardreader/rts5249.c return rtsx_pci_write_register(pcr, OLT_LED_CTL, 0x08, 0x00); pcr 272 drivers/misc/cardreader/rts5249.c static int rtsx_base_card_power_on(struct rtsx_pcr *pcr, int card) pcr 275 drivers/misc/cardreader/rts5249.c struct rtsx_cr_option *option = &pcr->option; pcr 278 drivers/misc/cardreader/rts5249.c rtsx_pci_enable_ocp(pcr); pcr 280 drivers/misc/cardreader/rts5249.c rtsx_pci_init_cmd(pcr); pcr 281 drivers/misc/cardreader/rts5249.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_PWR_CTL, pcr 283 drivers/misc/cardreader/rts5249.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PWR_GATE_CTRL, pcr 285 drivers/misc/cardreader/rts5249.c err = rtsx_pci_send_cmd(pcr, 100); pcr 291 drivers/misc/cardreader/rts5249.c rtsx_pci_init_cmd(pcr); pcr 292 drivers/misc/cardreader/rts5249.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_PWR_CTL, pcr 294 drivers/misc/cardreader/rts5249.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PWR_GATE_CTRL, pcr 296 drivers/misc/cardreader/rts5249.c return rtsx_pci_send_cmd(pcr, 100); pcr 299 drivers/misc/cardreader/rts5249.c static int rtsx_base_card_power_off(struct rtsx_pcr *pcr, int card) pcr 301 drivers/misc/cardreader/rts5249.c struct rtsx_cr_option *option = &pcr->option; pcr 304 drivers/misc/cardreader/rts5249.c rtsx_pci_disable_ocp(pcr); pcr 306 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, CARD_PWR_CTL, SD_POWER_MASK, SD_POWER_OFF); pcr 308 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, PWR_GATE_CTRL, LDO3318_PWR_MASK, 0x00); pcr 312 drivers/misc/cardreader/rts5249.c static int rtsx_base_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage) pcr 319 drivers/misc/cardreader/rts5249.c err = rtsx_pci_update_phy(pcr, PHY_TUNE, PHY_TUNE_VOLTAGE_MASK, pcr 326 drivers/misc/cardreader/rts5249.c if (CHK_PCI_PID(pcr, 0x5249)) { pcr 327 drivers/misc/cardreader/rts5249.c err = rtsx_pci_update_phy(pcr, PHY_BACR, pcr 334 drivers/misc/cardreader/rts5249.c err = rtsx_pci_update_phy(pcr, PHY_TUNE, PHY_TUNE_VOLTAGE_MASK, pcr 340 drivers/misc/cardreader/rts5249.c pcr_dbg(pcr, "unknown output voltage %d\n", voltage); pcr 345 drivers/misc/cardreader/rts5249.c rtsx_pci_init_cmd(pcr); pcr 346 drivers/misc/cardreader/rts5249.c rts5249_fill_driving(pcr, voltage); pcr 347 drivers/misc/cardreader/rts5249.c return rtsx_pci_send_cmd(pcr, 100); pcr 350 drivers/misc/cardreader/rts5249.c static void rts5249_set_aspm(struct rtsx_pcr *pcr, bool enable) pcr 352 drivers/misc/cardreader/rts5249.c struct rtsx_cr_option *option = &pcr->option; pcr 355 drivers/misc/cardreader/rts5249.c if (pcr->aspm_enabled == enable) pcr 360 drivers/misc/cardreader/rts5249.c val = pcr->aspm_en; pcr 361 drivers/misc/cardreader/rts5249.c rtsx_pci_update_cfg_byte(pcr, pcr 362 drivers/misc/cardreader/rts5249.c pcr->pcie_cap + PCI_EXP_LNKCTL, pcr 369 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, ASPM_FORCE_CTL, mask, val); pcr 372 drivers/misc/cardreader/rts5249.c pcr->aspm_enabled = enable; pcr 442 drivers/misc/cardreader/rts5249.c void rts5249_init_params(struct rtsx_pcr *pcr) pcr 444 drivers/misc/cardreader/rts5249.c struct rtsx_cr_option *option = &(pcr->option); pcr 446 drivers/misc/cardreader/rts5249.c pcr->extra_caps = EXTRA_CAPS_SD_SDR50 | EXTRA_CAPS_SD_SDR104; pcr 447 drivers/misc/cardreader/rts5249.c pcr->num_slots = 2; pcr 448 drivers/misc/cardreader/rts5249.c pcr->ops = &rts5249_pcr_ops; pcr 450 drivers/misc/cardreader/rts5249.c pcr->flags = 0; pcr 451 drivers/misc/cardreader/rts5249.c pcr->card_drive_sel = RTSX_CARD_DRIVE_DEFAULT; pcr 452 drivers/misc/cardreader/rts5249.c pcr->sd30_drive_sel_1v8 = CFG_DRIVER_TYPE_B; pcr 453 drivers/misc/cardreader/rts5249.c pcr->sd30_drive_sel_3v3 = CFG_DRIVER_TYPE_B; pcr 454 drivers/misc/cardreader/rts5249.c pcr->aspm_en = ASPM_L1_EN; pcr 455 drivers/misc/cardreader/rts5249.c pcr->tx_initial_phase = SET_CLOCK_PHASE(1, 29, 16); pcr 456 drivers/misc/cardreader/rts5249.c pcr->rx_initial_phase = SET_CLOCK_PHASE(24, 6, 5); pcr 458 drivers/misc/cardreader/rts5249.c pcr->ic_version = rts5249_get_ic_version(pcr); pcr 459 drivers/misc/cardreader/rts5249.c pcr->sd_pull_ctl_enable_tbl = rts5249_sd_pull_ctl_enable_tbl; pcr 460 drivers/misc/cardreader/rts5249.c pcr->sd_pull_ctl_disable_tbl = rts5249_sd_pull_ctl_disable_tbl; pcr 461 drivers/misc/cardreader/rts5249.c pcr->ms_pull_ctl_enable_tbl = rts5249_ms_pull_ctl_enable_tbl; pcr 462 drivers/misc/cardreader/rts5249.c pcr->ms_pull_ctl_disable_tbl = rts5249_ms_pull_ctl_disable_tbl; pcr 464 drivers/misc/cardreader/rts5249.c pcr->reg_pm_ctrl3 = PM_CTRL3; pcr 481 drivers/misc/cardreader/rts5249.c static int rts524a_write_phy(struct rtsx_pcr *pcr, u8 addr, u16 val) pcr 485 drivers/misc/cardreader/rts5249.c return __rtsx_pci_write_phy_register(pcr, addr, val); pcr 488 drivers/misc/cardreader/rts5249.c static int rts524a_read_phy(struct rtsx_pcr *pcr, u8 addr, u16 *val) pcr 492 drivers/misc/cardreader/rts5249.c return __rtsx_pci_read_phy_register(pcr, addr, val); pcr 495 drivers/misc/cardreader/rts5249.c static int rts524a_optimize_phy(struct rtsx_pcr *pcr) pcr 499 drivers/misc/cardreader/rts5249.c err = rtsx_pci_write_register(pcr, RTS524A_PM_CTRL3, pcr 504 drivers/misc/cardreader/rts5249.c rtsx_pci_write_phy_register(pcr, PHY_PCR, pcr 507 drivers/misc/cardreader/rts5249.c rtsx_pci_write_phy_register(pcr, PHY_SSCCR3, pcr 510 drivers/misc/cardreader/rts5249.c if (is_version(pcr, 0x524A, IC_VER_A)) { pcr 511 drivers/misc/cardreader/rts5249.c rtsx_pci_write_phy_register(pcr, PHY_SSCCR3, pcr 513 drivers/misc/cardreader/rts5249.c rtsx_pci_write_phy_register(pcr, PHY_SSCCR2, pcr 516 drivers/misc/cardreader/rts5249.c rtsx_pci_write_phy_register(pcr, PHY_ANA1A, pcr 519 drivers/misc/cardreader/rts5249.c rtsx_pci_write_phy_register(pcr, PHY_ANA1D, pcr 521 drivers/misc/cardreader/rts5249.c rtsx_pci_write_phy_register(pcr, PHY_DIG1E, pcr 531 drivers/misc/cardreader/rts5249.c rtsx_pci_write_phy_register(pcr, PHY_ANA08, pcr 538 drivers/misc/cardreader/rts5249.c static int rts524a_extra_init_hw(struct rtsx_pcr *pcr) pcr 540 drivers/misc/cardreader/rts5249.c rts5249_extra_init_hw(pcr); pcr 542 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, FUNC_FORCE_CTL, pcr 544 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, PM_EVENT_DEBUG, PME_DEBUG_0, PME_DEBUG_0); pcr 545 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, LDO_VCC_CFG1, LDO_VCC_LMT_EN, pcr 547 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, PCLK_CTL, PCLK_MODE_SEL, PCLK_MODE_SEL); pcr 548 drivers/misc/cardreader/rts5249.c if (is_version(pcr, 0x524A, IC_VER_A)) { pcr 549 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, LDO_DV18_CFG, pcr 551 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, LDO_VCC_CFG1, pcr 553 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, LDO_VIO_CFG, pcr 555 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, LDO_VIO_CFG, pcr 557 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, LDO_DV12S_CFG, pcr 559 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, SD40_LDO_CTL1, pcr 566 drivers/misc/cardreader/rts5249.c static void rts5250_set_l1off_cfg_sub_d0(struct rtsx_pcr *pcr, int active) pcr 568 drivers/misc/cardreader/rts5249.c struct rtsx_cr_option *option = &(pcr->option); pcr 570 drivers/misc/cardreader/rts5249.c u32 interrupt = rtsx_pci_readl(pcr, RTSX_BIPR); pcr 575 drivers/misc/cardreader/rts5249.c aspm_L1_1 = rtsx_check_dev_flag(pcr, ASPM_L1_1_EN); pcr 576 drivers/misc/cardreader/rts5249.c aspm_L1_2 = rtsx_check_dev_flag(pcr, ASPM_L1_2_EN); pcr 589 drivers/misc/cardreader/rts5249.c if (rtsx_check_dev_flag(pcr, pcr 597 drivers/misc/cardreader/rts5249.c rtsx_set_l1off_sub(pcr, val); pcr 618 drivers/misc/cardreader/rts5249.c void rts524a_init_params(struct rtsx_pcr *pcr) pcr 620 drivers/misc/cardreader/rts5249.c rts5249_init_params(pcr); pcr 621 drivers/misc/cardreader/rts5249.c pcr->tx_initial_phase = SET_CLOCK_PHASE(27, 29, 11); pcr 622 drivers/misc/cardreader/rts5249.c pcr->option.ltr_l1off_sspwrgate = LTR_L1OFF_SSPWRGATE_5250_DEF; pcr 623 drivers/misc/cardreader/rts5249.c pcr->option.ltr_l1off_snooze_sspwrgate = pcr 626 drivers/misc/cardreader/rts5249.c pcr->reg_pm_ctrl3 = RTS524A_PM_CTRL3; pcr 627 drivers/misc/cardreader/rts5249.c pcr->ops = &rts524a_pcr_ops; pcr 629 drivers/misc/cardreader/rts5249.c pcr->option.ocp_en = 1; pcr 630 drivers/misc/cardreader/rts5249.c if (pcr->option.ocp_en) pcr 631 drivers/misc/cardreader/rts5249.c pcr->hw_param.interrupt_en |= SD_OC_INT_EN; pcr 632 drivers/misc/cardreader/rts5249.c pcr->hw_param.ocp_glitch = SD_OCP_GLITCH_10M; pcr 633 drivers/misc/cardreader/rts5249.c pcr->option.sd_800mA_ocp_thd = RTS524A_OCP_THD_800; pcr 637 drivers/misc/cardreader/rts5249.c static int rts525a_card_power_on(struct rtsx_pcr *pcr, int card) pcr 639 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, LDO_VCC_CFG1, pcr 641 drivers/misc/cardreader/rts5249.c return rtsx_base_card_power_on(pcr, card); pcr 644 drivers/misc/cardreader/rts5249.c static int rts525a_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage) pcr 648 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, LDO_CONFIG2, pcr 650 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, SD_PAD_CTL, SD_IO_USING_1V8, 0); pcr 653 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, LDO_CONFIG2, pcr 655 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, SD_PAD_CTL, SD_IO_USING_1V8, pcr 662 drivers/misc/cardreader/rts5249.c rtsx_pci_init_cmd(pcr); pcr 663 drivers/misc/cardreader/rts5249.c rts5249_fill_driving(pcr, voltage); pcr 664 drivers/misc/cardreader/rts5249.c return rtsx_pci_send_cmd(pcr, 100); pcr 667 drivers/misc/cardreader/rts5249.c static int rts525a_optimize_phy(struct rtsx_pcr *pcr) pcr 671 drivers/misc/cardreader/rts5249.c err = rtsx_pci_write_register(pcr, RTS524A_PM_CTRL3, pcr 676 drivers/misc/cardreader/rts5249.c rtsx_pci_write_phy_register(pcr, _PHY_FLD0, pcr 681 drivers/misc/cardreader/rts5249.c rtsx_pci_write_phy_register(pcr, _PHY_ANA03, pcr 685 drivers/misc/cardreader/rts5249.c if (is_version(pcr, 0x525A, IC_VER_A)) pcr 686 drivers/misc/cardreader/rts5249.c rtsx_pci_write_phy_register(pcr, _PHY_REV0, pcr 693 drivers/misc/cardreader/rts5249.c static int rts525a_extra_init_hw(struct rtsx_pcr *pcr) pcr 695 drivers/misc/cardreader/rts5249.c rts5249_extra_init_hw(pcr); pcr 697 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, PCLK_CTL, PCLK_MODE_SEL, PCLK_MODE_SEL); pcr 698 drivers/misc/cardreader/rts5249.c if (is_version(pcr, 0x525A, IC_VER_A)) { pcr 699 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, L1SUB_CONFIG2, pcr 701 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, RREF_CFG, pcr 703 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, LDO_VIO_CFG, pcr 705 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, LDO_DV12S_CFG, pcr 707 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, LDO_AV12S_CFG, pcr 709 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, LDO_VCC_CFG0, pcr 711 drivers/misc/cardreader/rts5249.c rtsx_pci_write_register(pcr, OOBS_CONFIG, pcr 734 drivers/misc/cardreader/rts5249.c void rts525a_init_params(struct rtsx_pcr *pcr) pcr 736 drivers/misc/cardreader/rts5249.c rts5249_init_params(pcr); pcr 737 drivers/misc/cardreader/rts5249.c pcr->tx_initial_phase = SET_CLOCK_PHASE(25, 29, 11); pcr 738 drivers/misc/cardreader/rts5249.c pcr->option.ltr_l1off_sspwrgate = LTR_L1OFF_SSPWRGATE_5250_DEF; pcr 739 drivers/misc/cardreader/rts5249.c pcr->option.ltr_l1off_snooze_sspwrgate = pcr 742 drivers/misc/cardreader/rts5249.c pcr->reg_pm_ctrl3 = RTS524A_PM_CTRL3; pcr 743 drivers/misc/cardreader/rts5249.c pcr->ops = &rts525a_pcr_ops; pcr 745 drivers/misc/cardreader/rts5249.c pcr->option.ocp_en = 1; pcr 746 drivers/misc/cardreader/rts5249.c if (pcr->option.ocp_en) pcr 747 drivers/misc/cardreader/rts5249.c pcr->hw_param.interrupt_en |= SD_OC_INT_EN; pcr 748 drivers/misc/cardreader/rts5249.c pcr->hw_param.ocp_glitch = SD_OCP_GLITCH_10M; pcr 749 drivers/misc/cardreader/rts5249.c pcr->option.sd_800mA_ocp_thd = RTS525A_OCP_THD_800; pcr 19 drivers/misc/cardreader/rts5260.c static u8 rts5260_get_ic_version(struct rtsx_pcr *pcr) pcr 23 drivers/misc/cardreader/rts5260.c rtsx_pci_read_register(pcr, DUMMY_REG_RESET_0, &val); pcr 27 drivers/misc/cardreader/rts5260.c static void rts5260_fill_driving(struct rtsx_pcr *pcr, u8 voltage) pcr 49 drivers/misc/cardreader/rts5260.c drive_sel = pcr->sd30_drive_sel_3v3; pcr 52 drivers/misc/cardreader/rts5260.c drive_sel = pcr->sd30_drive_sel_1v8; pcr 55 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, SD30_CLK_DRIVE_SEL, pcr 58 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, SD30_CMD_DRIVE_SEL, pcr 61 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, SD30_CMD_DRIVE_SEL, pcr 65 drivers/misc/cardreader/rts5260.c static void rtsx_base_fetch_vendor_settings(struct rtsx_pcr *pcr) pcr 69 drivers/misc/cardreader/rts5260.c rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®); pcr 70 drivers/misc/cardreader/rts5260.c pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg); pcr 73 drivers/misc/cardreader/rts5260.c pcr_dbg(pcr, "skip fetch vendor setting\n"); pcr 77 drivers/misc/cardreader/rts5260.c pcr->aspm_en = rtsx_reg_to_aspm(reg); pcr 78 drivers/misc/cardreader/rts5260.c pcr->sd30_drive_sel_1v8 = rtsx_reg_to_sd30_drive_sel_1v8(reg); pcr 79 drivers/misc/cardreader/rts5260.c pcr->card_drive_sel &= 0x3F; pcr 80 drivers/misc/cardreader/rts5260.c pcr->card_drive_sel |= rtsx_reg_to_card_drive_sel(reg); pcr 82 drivers/misc/cardreader/rts5260.c rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG2, ®); pcr 83 drivers/misc/cardreader/rts5260.c pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG2, reg); pcr 84 drivers/misc/cardreader/rts5260.c pcr->sd30_drive_sel_3v3 = rtsx_reg_to_sd30_drive_sel_3v3(reg); pcr 86 drivers/misc/cardreader/rts5260.c pcr->flags |= PCR_REVERSE_SOCKET; pcr 89 drivers/misc/cardreader/rts5260.c static void rtsx_base_force_power_down(struct rtsx_pcr *pcr, u8 pm_state) pcr 92 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, AUTOLOAD_CFG_BASE + 1, MASK_8_BIT_DEF, 0); pcr 93 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, AUTOLOAD_CFG_BASE + 2, MASK_8_BIT_DEF, 0); pcr 94 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, AUTOLOAD_CFG_BASE + 3, pcr 98 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, pcr->reg_pm_ctrl3, pcr 101 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, FPDCTL, ALL_POWER_DOWN, ALL_POWER_DOWN); pcr 104 drivers/misc/cardreader/rts5260.c static int rtsx_base_enable_auto_blink(struct rtsx_pcr *pcr) pcr 106 drivers/misc/cardreader/rts5260.c return rtsx_pci_write_register(pcr, OLT_LED_CTL, pcr 110 drivers/misc/cardreader/rts5260.c static int rtsx_base_disable_auto_blink(struct rtsx_pcr *pcr) pcr 112 drivers/misc/cardreader/rts5260.c return rtsx_pci_write_register(pcr, OLT_LED_CTL, pcr 116 drivers/misc/cardreader/rts5260.c static int rts5260_turn_on_led(struct rtsx_pcr *pcr) pcr 118 drivers/misc/cardreader/rts5260.c return rtsx_pci_write_register(pcr, RTS5260_REG_GPIO_CTL0, pcr 122 drivers/misc/cardreader/rts5260.c static int rts5260_turn_off_led(struct rtsx_pcr *pcr) pcr 124 drivers/misc/cardreader/rts5260.c return rtsx_pci_write_register(pcr, RTS5260_REG_GPIO_CTL0, pcr 180 drivers/misc/cardreader/rts5260.c static int sd_set_sample_push_timing_sd30(struct rtsx_pcr *pcr) pcr 182 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, SD_CFG1, SD_MODE_SELECT_MASK pcr 184 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, CLK_CTL, CLK_LOW_FREQ, CLK_LOW_FREQ); pcr 185 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, CARD_CLK_SOURCE, 0xFF, pcr 187 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, CLK_CTL, CLK_LOW_FREQ, 0); pcr 192 drivers/misc/cardreader/rts5260.c static int rts5260_card_power_on(struct rtsx_pcr *pcr, int card) pcr 195 drivers/misc/cardreader/rts5260.c struct rtsx_cr_option *option = &pcr->option; pcr 198 drivers/misc/cardreader/rts5260.c rtsx_pci_enable_ocp(pcr); pcr 201 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, LDO_CONFIG2, DV331812_VDD1, DV331812_VDD1); pcr 202 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, LDO_VCC_CFG0, pcr 205 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, LDO_VCC_CFG1, LDO_POW_SDVDD1_MASK, pcr 208 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, LDO_CONFIG2, pcr 212 drivers/misc/cardreader/rts5260.c if (pcr->extra_caps & EXTRA_CAPS_SD_SDR50 || pcr 213 drivers/misc/cardreader/rts5260.c pcr->extra_caps & EXTRA_CAPS_SD_SDR104) pcr 214 drivers/misc/cardreader/rts5260.c sd_set_sample_push_timing_sd30(pcr); pcr 217 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, SD_CFG1, 0xFF, pcr 220 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, SD_SAMPLE_POINT_CTL, pcr 222 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, SD_PUSH_POINT_CTL, 0xFF, 0); pcr 223 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, CARD_STOP, SD_STOP | SD_CLR_ERR, pcr 227 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, SD_CFG3, SD30_CLK_END_EN, 0); pcr 228 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, REG_SD_STOP_SDCLK_CFG, pcr 232 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, REG_PRE_RW_MODE, EN_INFINITE_MODE, 0); pcr 237 drivers/misc/cardreader/rts5260.c static int rts5260_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage) pcr 241 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, LDO_CONFIG2, pcr 243 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, LDO_DV18_CFG, pcr 245 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, SD_PAD_CTL, SD_IO_USING_1V8, 0); pcr 248 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, LDO_CONFIG2, pcr 250 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, LDO_DV18_CFG, pcr 252 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, SD_PAD_CTL, SD_IO_USING_1V8, pcr 260 drivers/misc/cardreader/rts5260.c rts5260_fill_driving(pcr, voltage); pcr 265 drivers/misc/cardreader/rts5260.c static void rts5260_stop_cmd(struct rtsx_pcr *pcr) pcr 267 drivers/misc/cardreader/rts5260.c rtsx_pci_writel(pcr, RTSX_HCBCTLR, STOP_CMD); pcr 268 drivers/misc/cardreader/rts5260.c rtsx_pci_writel(pcr, RTSX_HDBCTLR, STOP_DMA); pcr 269 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, RTS5260_DMA_RST_CTL_0, pcr 272 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, RBCTL, RB_FLUSH, RB_FLUSH); pcr 275 drivers/misc/cardreader/rts5260.c static void rts5260_card_before_power_off(struct rtsx_pcr *pcr) pcr 277 drivers/misc/cardreader/rts5260.c rts5260_stop_cmd(pcr); pcr 278 drivers/misc/cardreader/rts5260.c rts5260_switch_output_voltage(pcr, OUTPUT_3V3); pcr 282 drivers/misc/cardreader/rts5260.c static int rts5260_card_power_off(struct rtsx_pcr *pcr, int card) pcr 286 drivers/misc/cardreader/rts5260.c rts5260_card_before_power_off(pcr); pcr 287 drivers/misc/cardreader/rts5260.c err = rtsx_pci_write_register(pcr, LDO_VCC_CFG1, pcr 289 drivers/misc/cardreader/rts5260.c err = rtsx_pci_write_register(pcr, LDO_CONFIG2, pcr 291 drivers/misc/cardreader/rts5260.c if (pcr->option.ocp_en) pcr 292 drivers/misc/cardreader/rts5260.c rtsx_pci_disable_ocp(pcr); pcr 297 drivers/misc/cardreader/rts5260.c static void rts5260_init_ocp(struct rtsx_pcr *pcr) pcr 299 drivers/misc/cardreader/rts5260.c struct rtsx_cr_option *option = &pcr->option; pcr 305 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, RTS5260_DVCC_CTRL, pcr 309 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, RTS5260_DV331812_CFG, pcr 314 drivers/misc/cardreader/rts5260.c val = pcr->hw_param.ocp_glitch; pcr 315 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, REG_OCPGLITCH, mask, val); pcr 316 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, RTS5260_DVCC_CTRL, pcr 322 drivers/misc/cardreader/rts5260.c rtsx_pci_enable_ocp(pcr); pcr 324 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, RTS5260_DVCC_CTRL, pcr 330 drivers/misc/cardreader/rts5260.c static void rts5260_enable_ocp(struct rtsx_pcr *pcr) pcr 335 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, REG_OCPCTL, 0xFF, val); pcr 339 drivers/misc/cardreader/rts5260.c static void rts5260_disable_ocp(struct rtsx_pcr *pcr) pcr 344 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, REG_OCPCTL, mask, 0); pcr 349 drivers/misc/cardreader/rts5260.c static int rts5260_get_ocpstat(struct rtsx_pcr *pcr, u8 *val) pcr 351 drivers/misc/cardreader/rts5260.c return rtsx_pci_read_register(pcr, REG_OCPSTAT, val); pcr 354 drivers/misc/cardreader/rts5260.c static int rts5260_get_ocpstat2(struct rtsx_pcr *pcr, u8 *val) pcr 356 drivers/misc/cardreader/rts5260.c return rtsx_pci_read_register(pcr, REG_DV3318_OCPSTAT, val); pcr 359 drivers/misc/cardreader/rts5260.c static void rts5260_clear_ocpstat(struct rtsx_pcr *pcr) pcr 367 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, REG_OCPCTL, mask, val); pcr 368 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, REG_DV3318_OCPCTL, pcr 372 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, REG_OCPCTL, mask, 0); pcr 373 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, REG_DV3318_OCPCTL, pcr 377 drivers/misc/cardreader/rts5260.c static void rts5260_process_ocp(struct rtsx_pcr *pcr) pcr 379 drivers/misc/cardreader/rts5260.c if (!pcr->option.ocp_en) pcr 382 drivers/misc/cardreader/rts5260.c rtsx_pci_get_ocpstat(pcr, &pcr->ocp_stat); pcr 383 drivers/misc/cardreader/rts5260.c rts5260_get_ocpstat2(pcr, &pcr->ocp_stat2); pcr 385 drivers/misc/cardreader/rts5260.c if ((pcr->ocp_stat & (SD_OC_NOW | SD_OC_EVER)) || pcr 386 drivers/misc/cardreader/rts5260.c (pcr->ocp_stat2 & (DV3318_OCP_NOW | DV3318_OCP_EVER))) { pcr 387 drivers/misc/cardreader/rts5260.c rtsx_pci_card_power_off(pcr, RTSX_SD_CARD); pcr 388 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, CARD_OE, SD_OUTPUT_EN, 0); pcr 389 drivers/misc/cardreader/rts5260.c rtsx_pci_clear_ocpstat(pcr); pcr 390 drivers/misc/cardreader/rts5260.c pcr->ocp_stat = 0; pcr 391 drivers/misc/cardreader/rts5260.c pcr->ocp_stat2 = 0; pcr 396 drivers/misc/cardreader/rts5260.c static int rts5260_init_hw(struct rtsx_pcr *pcr) pcr 400 drivers/misc/cardreader/rts5260.c rtsx_pci_init_cmd(pcr); pcr 402 drivers/misc/cardreader/rts5260.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, L1SUB_CONFIG1, pcr 405 drivers/misc/cardreader/rts5260.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, L1SUB_CONFIG3, 0xFF, 0x00); pcr 406 drivers/misc/cardreader/rts5260.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PM_CLK_FORCE_CTL, pcr 408 drivers/misc/cardreader/rts5260.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PWD_SUSPEND_EN, 0xFF, 0xFF); pcr 409 drivers/misc/cardreader/rts5260.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PWR_GATE_CTRL, pcr 411 drivers/misc/cardreader/rts5260.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, REG_VREF, pcr 413 drivers/misc/cardreader/rts5260.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, RBCTL, pcr 416 drivers/misc/cardreader/rts5260.c if (pcr->flags & PCR_REVERSE_SOCKET) pcr 417 drivers/misc/cardreader/rts5260.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PETXCFG, 0xB0, 0xB0); pcr 419 drivers/misc/cardreader/rts5260.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PETXCFG, 0xB0, 0x80); pcr 421 drivers/misc/cardreader/rts5260.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, OBFF_CFG, pcr 424 drivers/misc/cardreader/rts5260.c err = rtsx_pci_send_cmd(pcr, CMD_TIMEOUT_DEF); pcr 428 drivers/misc/cardreader/rts5260.c rtsx_pci_init_ocp(pcr); pcr 433 drivers/misc/cardreader/rts5260.c static void rts5260_pwr_saving_setting(struct rtsx_pcr *pcr) pcr 437 drivers/misc/cardreader/rts5260.c lss_l1_1 = rtsx_check_dev_flag(pcr, ASPM_L1_1_EN) pcr 438 drivers/misc/cardreader/rts5260.c | rtsx_check_dev_flag(pcr, PM_L1_1_EN); pcr 439 drivers/misc/cardreader/rts5260.c lss_l1_2 = rtsx_check_dev_flag(pcr, ASPM_L1_2_EN) pcr 440 drivers/misc/cardreader/rts5260.c | rtsx_check_dev_flag(pcr, PM_L1_2_EN); pcr 442 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, ASPM_FORCE_CTL, 0xFF, 0); pcr 444 drivers/misc/cardreader/rts5260.c pcr_dbg(pcr, "Set parameters for L1.2."); pcr 445 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, PWR_GLOBAL_CTRL, pcr 447 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, RTS5260_DVCC_CTRL, pcr 453 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, PWR_FE_CTL, pcr 456 drivers/misc/cardreader/rts5260.c pcr_dbg(pcr, "Set parameters for L1.1."); pcr 457 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, PWR_GLOBAL_CTRL, pcr 459 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, PWR_FE_CTL, pcr 462 drivers/misc/cardreader/rts5260.c pcr_dbg(pcr, "Set parameters for L1."); pcr 463 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, PWR_GLOBAL_CTRL, pcr 465 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, PWR_FE_CTL, pcr 469 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, CFG_L1_0_PCIE_DPHY_RET_VALUE, pcr 471 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, CFG_L1_0_PCIE_MAC_RET_VALUE, pcr 473 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, CFG_L1_0_CRC_SD30_RET_VALUE, pcr 475 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, CFG_L1_0_CRC_SD40_RET_VALUE, pcr 477 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, CFG_L1_0_SYS_RET_VALUE, pcr 480 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, CFG_PCIE_APHY_OFF_0, pcr 482 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, CFG_PCIE_APHY_OFF_1, pcr 484 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, CFG_PCIE_APHY_OFF_2, pcr 486 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, CFG_PCIE_APHY_OFF_3, pcr 489 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, PWC_CDR, 0xFF, PWC_CDR_DEFAULT); pcr 491 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, CFG_LP_FPWM_VALUE, pcr 494 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, CFG_L1_0_CRC_MISC_RET_VALUE, pcr 498 drivers/misc/cardreader/rts5260.c static void rts5260_init_from_cfg(struct rtsx_pcr *pcr) pcr 500 drivers/misc/cardreader/rts5260.c struct rtsx_cr_option *option = &pcr->option; pcr 503 drivers/misc/cardreader/rts5260.c rtsx_pci_read_config_dword(pcr, PCR_ASPM_SETTING_5260, &lval); pcr 506 drivers/misc/cardreader/rts5260.c rtsx_set_dev_flag(pcr, ASPM_L1_1_EN); pcr 509 drivers/misc/cardreader/rts5260.c rtsx_set_dev_flag(pcr, ASPM_L1_2_EN); pcr 512 drivers/misc/cardreader/rts5260.c rtsx_set_dev_flag(pcr, PM_L1_1_EN); pcr 515 drivers/misc/cardreader/rts5260.c rtsx_set_dev_flag(pcr, PM_L1_2_EN); pcr 517 drivers/misc/cardreader/rts5260.c rts5260_pwr_saving_setting(pcr); pcr 522 drivers/misc/cardreader/rts5260.c pcie_capability_read_word(pcr->pci, PCI_EXP_DEVCTL2, &val); pcr 526 drivers/misc/cardreader/rts5260.c rtsx_set_ltr_latency(pcr, option->ltr_active_latency); pcr 532 drivers/misc/cardreader/rts5260.c if (rtsx_check_dev_flag(pcr, ASPM_L1_1_EN | ASPM_L1_2_EN pcr 539 drivers/misc/cardreader/rts5260.c static int rts5260_extra_init_hw(struct rtsx_pcr *pcr) pcr 541 drivers/misc/cardreader/rts5260.c struct rtsx_cr_option *option = &pcr->option; pcr 544 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, 0xFC03, 0x7F, 0x07); pcr 545 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, SSC_DIV_N_0, 0xFF, 0x5D); pcr 547 drivers/misc/cardreader/rts5260.c rts5260_init_from_cfg(pcr); pcr 550 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, RTS5260_AUTOLOAD_CFG4, pcr 553 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, LDO_VCC_CFG0, pcr 556 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, PCLK_CTL, PCLK_MODE_SEL, PCLK_MODE_SEL); pcr 558 drivers/misc/cardreader/rts5260.c rts5260_init_hw(pcr); pcr 565 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, PETXCFG, pcr 568 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, PETXCFG, pcr 574 drivers/misc/cardreader/rts5260.c static void rts5260_set_aspm(struct rtsx_pcr *pcr, bool enable) pcr 576 drivers/misc/cardreader/rts5260.c struct rtsx_cr_option *option = &pcr->option; pcr 579 drivers/misc/cardreader/rts5260.c if (pcr->aspm_enabled == enable) pcr 584 drivers/misc/cardreader/rts5260.c val = pcr->aspm_en; pcr 585 drivers/misc/cardreader/rts5260.c rtsx_pci_update_cfg_byte(pcr, pcr->pcie_cap + PCI_EXP_LNKCTL, pcr 592 drivers/misc/cardreader/rts5260.c rtsx_pci_write_register(pcr, ASPM_FORCE_CTL, mask, val); pcr 595 drivers/misc/cardreader/rts5260.c pcr->aspm_enabled = enable; pcr 598 drivers/misc/cardreader/rts5260.c static void rts5260_set_l1off_cfg_sub_d0(struct rtsx_pcr *pcr, int active) pcr 600 drivers/misc/cardreader/rts5260.c struct rtsx_cr_option *option = &pcr->option; pcr 601 drivers/misc/cardreader/rts5260.c u32 interrupt = rtsx_pci_readl(pcr, RTSX_BIPR); pcr 606 drivers/misc/cardreader/rts5260.c aspm_L1_1 = rtsx_check_dev_flag(pcr, ASPM_L1_1_EN); pcr 607 drivers/misc/cardreader/rts5260.c aspm_L1_2 = rtsx_check_dev_flag(pcr, ASPM_L1_2_EN); pcr 620 drivers/misc/cardreader/rts5260.c if (rtsx_check_dev_flag(pcr, pcr 628 drivers/misc/cardreader/rts5260.c rtsx_set_l1off_sub(pcr, val); pcr 653 drivers/misc/cardreader/rts5260.c void rts5260_init_params(struct rtsx_pcr *pcr) pcr 655 drivers/misc/cardreader/rts5260.c struct rtsx_cr_option *option = &pcr->option; pcr 656 drivers/misc/cardreader/rts5260.c struct rtsx_hw_param *hw_param = &pcr->hw_param; pcr 658 drivers/misc/cardreader/rts5260.c pcr->extra_caps = EXTRA_CAPS_SD_SDR50 | EXTRA_CAPS_SD_SDR104; pcr 659 drivers/misc/cardreader/rts5260.c pcr->num_slots = 2; pcr 661 drivers/misc/cardreader/rts5260.c pcr->flags = 0; pcr 662 drivers/misc/cardreader/rts5260.c pcr->card_drive_sel = RTSX_CARD_DRIVE_DEFAULT; pcr 663 drivers/misc/cardreader/rts5260.c pcr->sd30_drive_sel_1v8 = CFG_DRIVER_TYPE_B; pcr 664 drivers/misc/cardreader/rts5260.c pcr->sd30_drive_sel_3v3 = CFG_DRIVER_TYPE_B; pcr 665 drivers/misc/cardreader/rts5260.c pcr->aspm_en = ASPM_L1_EN; pcr 666 drivers/misc/cardreader/rts5260.c pcr->tx_initial_phase = SET_CLOCK_PHASE(27, 29, 11); pcr 667 drivers/misc/cardreader/rts5260.c pcr->rx_initial_phase = SET_CLOCK_PHASE(24, 6, 5); pcr 669 drivers/misc/cardreader/rts5260.c pcr->ic_version = rts5260_get_ic_version(pcr); pcr 670 drivers/misc/cardreader/rts5260.c pcr->sd_pull_ctl_enable_tbl = rts5260_sd_pull_ctl_enable_tbl; pcr 671 drivers/misc/cardreader/rts5260.c pcr->sd_pull_ctl_disable_tbl = rts5260_sd_pull_ctl_disable_tbl; pcr 672 drivers/misc/cardreader/rts5260.c pcr->ms_pull_ctl_enable_tbl = rts5260_ms_pull_ctl_enable_tbl; pcr 673 drivers/misc/cardreader/rts5260.c pcr->ms_pull_ctl_disable_tbl = rts5260_ms_pull_ctl_disable_tbl; pcr 675 drivers/misc/cardreader/rts5260.c pcr->reg_pm_ctrl3 = RTS524A_PM_CTRL3; pcr 677 drivers/misc/cardreader/rts5260.c pcr->ops = &rts5260_pcr_ops; pcr 59 drivers/misc/cardreader/rtsx_pcr.c static inline void rtsx_pci_enable_aspm(struct rtsx_pcr *pcr) pcr 61 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_update_cfg_byte(pcr, pcr->pcie_cap + PCI_EXP_LNKCTL, pcr 62 drivers/misc/cardreader/rtsx_pcr.c 0xFC, pcr->aspm_en); pcr 65 drivers/misc/cardreader/rtsx_pcr.c static inline void rtsx_pci_disable_aspm(struct rtsx_pcr *pcr) pcr 67 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_update_cfg_byte(pcr, pcr->pcie_cap + PCI_EXP_LNKCTL, pcr 71 drivers/misc/cardreader/rtsx_pcr.c static int rtsx_comm_set_ltr_latency(struct rtsx_pcr *pcr, u32 latency) pcr 73 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_register(pcr, MSGTXDATA0, pcr 75 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_register(pcr, MSGTXDATA1, pcr 77 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_register(pcr, MSGTXDATA2, pcr 79 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_register(pcr, MSGTXDATA3, pcr 81 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_register(pcr, LTR_CTL, LTR_TX_EN_MASK | pcr 87 drivers/misc/cardreader/rtsx_pcr.c int rtsx_set_ltr_latency(struct rtsx_pcr *pcr, u32 latency) pcr 89 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->set_ltr_latency) pcr 90 drivers/misc/cardreader/rtsx_pcr.c return pcr->ops->set_ltr_latency(pcr, latency); pcr 92 drivers/misc/cardreader/rtsx_pcr.c return rtsx_comm_set_ltr_latency(pcr, latency); pcr 95 drivers/misc/cardreader/rtsx_pcr.c static void rtsx_comm_set_aspm(struct rtsx_pcr *pcr, bool enable) pcr 97 drivers/misc/cardreader/rtsx_pcr.c struct rtsx_cr_option *option = &pcr->option; pcr 99 drivers/misc/cardreader/rtsx_pcr.c if (pcr->aspm_enabled == enable) pcr 104 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_enable_aspm(pcr); pcr 106 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_disable_aspm(pcr); pcr 112 drivers/misc/cardreader/rtsx_pcr.c val = pcr->aspm_en; pcr 113 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_register(pcr, ASPM_FORCE_CTL, mask, val); pcr 116 drivers/misc/cardreader/rtsx_pcr.c pcr->aspm_enabled = enable; pcr 119 drivers/misc/cardreader/rtsx_pcr.c static void rtsx_disable_aspm(struct rtsx_pcr *pcr) pcr 121 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->set_aspm) pcr 122 drivers/misc/cardreader/rtsx_pcr.c pcr->ops->set_aspm(pcr, false); pcr 124 drivers/misc/cardreader/rtsx_pcr.c rtsx_comm_set_aspm(pcr, false); pcr 127 drivers/misc/cardreader/rtsx_pcr.c int rtsx_set_l1off_sub(struct rtsx_pcr *pcr, u8 val) pcr 129 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_register(pcr, L1SUB_CONFIG3, 0xFF, val); pcr 134 drivers/misc/cardreader/rtsx_pcr.c static void rtsx_set_l1off_sub_cfg_d0(struct rtsx_pcr *pcr, int active) pcr 136 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->set_l1off_cfg_sub_d0) pcr 137 drivers/misc/cardreader/rtsx_pcr.c pcr->ops->set_l1off_cfg_sub_d0(pcr, active); pcr 140 drivers/misc/cardreader/rtsx_pcr.c static void rtsx_comm_pm_full_on(struct rtsx_pcr *pcr) pcr 142 drivers/misc/cardreader/rtsx_pcr.c struct rtsx_cr_option *option = &pcr->option; pcr 144 drivers/misc/cardreader/rtsx_pcr.c rtsx_disable_aspm(pcr); pcr 150 drivers/misc/cardreader/rtsx_pcr.c rtsx_set_ltr_latency(pcr, option->ltr_active_latency); pcr 152 drivers/misc/cardreader/rtsx_pcr.c if (rtsx_check_dev_flag(pcr, LTR_L1SS_PWR_GATE_EN)) pcr 153 drivers/misc/cardreader/rtsx_pcr.c rtsx_set_l1off_sub_cfg_d0(pcr, 1); pcr 156 drivers/misc/cardreader/rtsx_pcr.c static void rtsx_pm_full_on(struct rtsx_pcr *pcr) pcr 158 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->full_on) pcr 159 drivers/misc/cardreader/rtsx_pcr.c pcr->ops->full_on(pcr); pcr 161 drivers/misc/cardreader/rtsx_pcr.c rtsx_comm_pm_full_on(pcr); pcr 164 drivers/misc/cardreader/rtsx_pcr.c void rtsx_pci_start_run(struct rtsx_pcr *pcr) pcr 167 drivers/misc/cardreader/rtsx_pcr.c if (pcr->remove_pci) pcr 170 drivers/misc/cardreader/rtsx_pcr.c if (pcr->state != PDEV_STAT_RUN) { pcr 171 drivers/misc/cardreader/rtsx_pcr.c pcr->state = PDEV_STAT_RUN; pcr 172 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->enable_auto_blink) pcr 173 drivers/misc/cardreader/rtsx_pcr.c pcr->ops->enable_auto_blink(pcr); pcr 174 drivers/misc/cardreader/rtsx_pcr.c rtsx_pm_full_on(pcr); pcr 177 drivers/misc/cardreader/rtsx_pcr.c mod_delayed_work(system_wq, &pcr->idle_work, msecs_to_jiffies(200)); pcr 181 drivers/misc/cardreader/rtsx_pcr.c int rtsx_pci_write_register(struct rtsx_pcr *pcr, u16 addr, u8 mask, u8 data) pcr 190 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_writel(pcr, RTSX_HAIMR, val); pcr 193 drivers/misc/cardreader/rtsx_pcr.c val = rtsx_pci_readl(pcr, RTSX_HAIMR); pcr 205 drivers/misc/cardreader/rtsx_pcr.c int rtsx_pci_read_register(struct rtsx_pcr *pcr, u16 addr, u8 *data) pcr 211 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_writel(pcr, RTSX_HAIMR, val); pcr 214 drivers/misc/cardreader/rtsx_pcr.c val = rtsx_pci_readl(pcr, RTSX_HAIMR); pcr 229 drivers/misc/cardreader/rtsx_pcr.c int __rtsx_pci_write_phy_register(struct rtsx_pcr *pcr, u8 addr, u16 val) pcr 234 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_init_cmd(pcr); pcr 236 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PHYDATA0, 0xFF, (u8)val); pcr 237 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PHYDATA1, 0xFF, (u8)(val >> 8)); pcr 238 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PHYADDR, 0xFF, addr); pcr 239 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PHYRWCTL, 0xFF, 0x81); pcr 241 drivers/misc/cardreader/rtsx_pcr.c err = rtsx_pci_send_cmd(pcr, 100); pcr 246 drivers/misc/cardreader/rtsx_pcr.c err = rtsx_pci_read_register(pcr, PHYRWCTL, &tmp); pcr 262 drivers/misc/cardreader/rtsx_pcr.c int rtsx_pci_write_phy_register(struct rtsx_pcr *pcr, u8 addr, u16 val) pcr 264 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->write_phy) pcr 265 drivers/misc/cardreader/rtsx_pcr.c return pcr->ops->write_phy(pcr, addr, val); pcr 267 drivers/misc/cardreader/rtsx_pcr.c return __rtsx_pci_write_phy_register(pcr, addr, val); pcr 271 drivers/misc/cardreader/rtsx_pcr.c int __rtsx_pci_read_phy_register(struct rtsx_pcr *pcr, u8 addr, u16 *val) pcr 277 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_init_cmd(pcr); pcr 279 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PHYADDR, 0xFF, addr); pcr 280 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PHYRWCTL, 0xFF, 0x80); pcr 282 drivers/misc/cardreader/rtsx_pcr.c err = rtsx_pci_send_cmd(pcr, 100); pcr 287 drivers/misc/cardreader/rtsx_pcr.c err = rtsx_pci_read_register(pcr, PHYRWCTL, &tmp); pcr 300 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_init_cmd(pcr); pcr 302 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, READ_REG_CMD, PHYDATA0, 0, 0); pcr 303 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, READ_REG_CMD, PHYDATA1, 0, 0); pcr 305 drivers/misc/cardreader/rtsx_pcr.c err = rtsx_pci_send_cmd(pcr, 100); pcr 309 drivers/misc/cardreader/rtsx_pcr.c ptr = rtsx_pci_get_cmd_data(pcr); pcr 318 drivers/misc/cardreader/rtsx_pcr.c int rtsx_pci_read_phy_register(struct rtsx_pcr *pcr, u8 addr, u16 *val) pcr 320 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->read_phy) pcr 321 drivers/misc/cardreader/rtsx_pcr.c return pcr->ops->read_phy(pcr, addr, val); pcr 323 drivers/misc/cardreader/rtsx_pcr.c return __rtsx_pci_read_phy_register(pcr, addr, val); pcr 327 drivers/misc/cardreader/rtsx_pcr.c void rtsx_pci_stop_cmd(struct rtsx_pcr *pcr) pcr 329 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->stop_cmd) pcr 330 drivers/misc/cardreader/rtsx_pcr.c return pcr->ops->stop_cmd(pcr); pcr 332 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_writel(pcr, RTSX_HCBCTLR, STOP_CMD); pcr 333 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_writel(pcr, RTSX_HDBCTLR, STOP_DMA); pcr 335 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_register(pcr, DMACTL, 0x80, 0x80); pcr 336 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_register(pcr, RBCTL, 0x80, 0x80); pcr 340 drivers/misc/cardreader/rtsx_pcr.c void rtsx_pci_add_cmd(struct rtsx_pcr *pcr, pcr 345 drivers/misc/cardreader/rtsx_pcr.c u32 *ptr = (u32 *)(pcr->host_cmds_ptr); pcr 352 drivers/misc/cardreader/rtsx_pcr.c spin_lock_irqsave(&pcr->lock, flags); pcr 353 drivers/misc/cardreader/rtsx_pcr.c ptr += pcr->ci; pcr 354 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ci < (HOST_CMDS_BUF_LEN / 4)) { pcr 357 drivers/misc/cardreader/rtsx_pcr.c pcr->ci++; pcr 359 drivers/misc/cardreader/rtsx_pcr.c spin_unlock_irqrestore(&pcr->lock, flags); pcr 363 drivers/misc/cardreader/rtsx_pcr.c void rtsx_pci_send_cmd_no_wait(struct rtsx_pcr *pcr) pcr 367 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_writel(pcr, RTSX_HCBAR, pcr->host_cmds_addr); pcr 369 drivers/misc/cardreader/rtsx_pcr.c val |= (u32)(pcr->ci * 4) & 0x00FFFFFF; pcr 372 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_writel(pcr, RTSX_HCBCTLR, val); pcr 376 drivers/misc/cardreader/rtsx_pcr.c int rtsx_pci_send_cmd(struct rtsx_pcr *pcr, int timeout) pcr 384 drivers/misc/cardreader/rtsx_pcr.c spin_lock_irqsave(&pcr->lock, flags); pcr 387 drivers/misc/cardreader/rtsx_pcr.c pcr->done = &trans_done; pcr 388 drivers/misc/cardreader/rtsx_pcr.c pcr->trans_result = TRANS_NOT_READY; pcr 391 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_writel(pcr, RTSX_HCBAR, pcr->host_cmds_addr); pcr 393 drivers/misc/cardreader/rtsx_pcr.c val |= (u32)(pcr->ci * 4) & 0x00FFFFFF; pcr 396 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_writel(pcr, RTSX_HCBCTLR, val); pcr 398 drivers/misc/cardreader/rtsx_pcr.c spin_unlock_irqrestore(&pcr->lock, flags); pcr 404 drivers/misc/cardreader/rtsx_pcr.c pcr_dbg(pcr, "Timeout (%s %d)\n", __func__, __LINE__); pcr 409 drivers/misc/cardreader/rtsx_pcr.c spin_lock_irqsave(&pcr->lock, flags); pcr 410 drivers/misc/cardreader/rtsx_pcr.c if (pcr->trans_result == TRANS_RESULT_FAIL) pcr 412 drivers/misc/cardreader/rtsx_pcr.c else if (pcr->trans_result == TRANS_RESULT_OK) pcr 414 drivers/misc/cardreader/rtsx_pcr.c else if (pcr->trans_result == TRANS_NO_DEVICE) pcr 416 drivers/misc/cardreader/rtsx_pcr.c spin_unlock_irqrestore(&pcr->lock, flags); pcr 419 drivers/misc/cardreader/rtsx_pcr.c spin_lock_irqsave(&pcr->lock, flags); pcr 420 drivers/misc/cardreader/rtsx_pcr.c pcr->done = NULL; pcr 421 drivers/misc/cardreader/rtsx_pcr.c spin_unlock_irqrestore(&pcr->lock, flags); pcr 424 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_stop_cmd(pcr); pcr 426 drivers/misc/cardreader/rtsx_pcr.c if (pcr->finish_me) pcr 427 drivers/misc/cardreader/rtsx_pcr.c complete(pcr->finish_me); pcr 433 drivers/misc/cardreader/rtsx_pcr.c static void rtsx_pci_add_sg_tbl(struct rtsx_pcr *pcr, pcr 436 drivers/misc/cardreader/rtsx_pcr.c u64 *ptr = (u64 *)(pcr->host_sg_tbl_ptr) + pcr->sgi; pcr 440 drivers/misc/cardreader/rtsx_pcr.c pcr_dbg(pcr, "DMA addr: 0x%x, Len: 0x%x\n", (unsigned int)addr, len); pcr 447 drivers/misc/cardreader/rtsx_pcr.c pcr->sgi++; pcr 450 drivers/misc/cardreader/rtsx_pcr.c int rtsx_pci_transfer_data(struct rtsx_pcr *pcr, struct scatterlist *sglist, pcr 455 drivers/misc/cardreader/rtsx_pcr.c pcr_dbg(pcr, "--> %s: num_sg = %d\n", __func__, num_sg); pcr 456 drivers/misc/cardreader/rtsx_pcr.c count = rtsx_pci_dma_map_sg(pcr, sglist, num_sg, read); pcr 459 drivers/misc/cardreader/rtsx_pcr.c pcr_dbg(pcr, "DMA mapping count: %d\n", count); pcr 461 drivers/misc/cardreader/rtsx_pcr.c err = rtsx_pci_dma_transfer(pcr, sglist, count, read, timeout); pcr 463 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_dma_unmap_sg(pcr, sglist, num_sg, read); pcr 469 drivers/misc/cardreader/rtsx_pcr.c int rtsx_pci_dma_map_sg(struct rtsx_pcr *pcr, struct scatterlist *sglist, pcr 474 drivers/misc/cardreader/rtsx_pcr.c if (pcr->remove_pci) pcr 480 drivers/misc/cardreader/rtsx_pcr.c return dma_map_sg(&(pcr->pci->dev), sglist, num_sg, dir); pcr 484 drivers/misc/cardreader/rtsx_pcr.c void rtsx_pci_dma_unmap_sg(struct rtsx_pcr *pcr, struct scatterlist *sglist, pcr 489 drivers/misc/cardreader/rtsx_pcr.c dma_unmap_sg(&(pcr->pci->dev), sglist, num_sg, dir); pcr 493 drivers/misc/cardreader/rtsx_pcr.c int rtsx_pci_dma_transfer(struct rtsx_pcr *pcr, struct scatterlist *sglist, pcr 506 drivers/misc/cardreader/rtsx_pcr.c if (pcr->remove_pci) pcr 513 drivers/misc/cardreader/rtsx_pcr.c pcr->sgi = 0; pcr 517 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_sg_tbl(pcr, addr, len, i == count - 1); pcr 520 drivers/misc/cardreader/rtsx_pcr.c spin_lock_irqsave(&pcr->lock, flags); pcr 522 drivers/misc/cardreader/rtsx_pcr.c pcr->done = &trans_done; pcr 523 drivers/misc/cardreader/rtsx_pcr.c pcr->trans_result = TRANS_NOT_READY; pcr 525 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_writel(pcr, RTSX_HDBAR, pcr->host_sg_tbl_addr); pcr 526 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_writel(pcr, RTSX_HDBCTLR, val); pcr 528 drivers/misc/cardreader/rtsx_pcr.c spin_unlock_irqrestore(&pcr->lock, flags); pcr 533 drivers/misc/cardreader/rtsx_pcr.c pcr_dbg(pcr, "Timeout (%s %d)\n", __func__, __LINE__); pcr 538 drivers/misc/cardreader/rtsx_pcr.c spin_lock_irqsave(&pcr->lock, flags); pcr 539 drivers/misc/cardreader/rtsx_pcr.c if (pcr->trans_result == TRANS_RESULT_FAIL) { pcr 541 drivers/misc/cardreader/rtsx_pcr.c if (pcr->dma_error_count < RTS_MAX_TIMES_FREQ_REDUCTION) pcr 542 drivers/misc/cardreader/rtsx_pcr.c pcr->dma_error_count++; pcr 545 drivers/misc/cardreader/rtsx_pcr.c else if (pcr->trans_result == TRANS_NO_DEVICE) pcr 547 drivers/misc/cardreader/rtsx_pcr.c spin_unlock_irqrestore(&pcr->lock, flags); pcr 550 drivers/misc/cardreader/rtsx_pcr.c spin_lock_irqsave(&pcr->lock, flags); pcr 551 drivers/misc/cardreader/rtsx_pcr.c pcr->done = NULL; pcr 552 drivers/misc/cardreader/rtsx_pcr.c spin_unlock_irqrestore(&pcr->lock, flags); pcr 555 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_stop_cmd(pcr); pcr 557 drivers/misc/cardreader/rtsx_pcr.c if (pcr->finish_me) pcr 558 drivers/misc/cardreader/rtsx_pcr.c complete(pcr->finish_me); pcr 564 drivers/misc/cardreader/rtsx_pcr.c int rtsx_pci_read_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len) pcr 577 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_init_cmd(pcr); pcr 580 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, READ_REG_CMD, reg++, 0, 0); pcr 582 drivers/misc/cardreader/rtsx_pcr.c err = rtsx_pci_send_cmd(pcr, 250); pcr 586 drivers/misc/cardreader/rtsx_pcr.c memcpy(ptr, rtsx_pci_get_cmd_data(pcr), 256); pcr 591 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_init_cmd(pcr); pcr 594 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, READ_REG_CMD, reg++, 0, 0); pcr 596 drivers/misc/cardreader/rtsx_pcr.c err = rtsx_pci_send_cmd(pcr, 250); pcr 601 drivers/misc/cardreader/rtsx_pcr.c memcpy(ptr, rtsx_pci_get_cmd_data(pcr), buf_len % 256); pcr 607 drivers/misc/cardreader/rtsx_pcr.c int rtsx_pci_write_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len) pcr 620 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_init_cmd(pcr); pcr 623 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, pcr 628 drivers/misc/cardreader/rtsx_pcr.c err = rtsx_pci_send_cmd(pcr, 250); pcr 634 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_init_cmd(pcr); pcr 637 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, pcr 642 drivers/misc/cardreader/rtsx_pcr.c err = rtsx_pci_send_cmd(pcr, 250); pcr 651 drivers/misc/cardreader/rtsx_pcr.c static int rtsx_pci_set_pull_ctl(struct rtsx_pcr *pcr, const u32 *tbl) pcr 653 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_init_cmd(pcr); pcr 656 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, pcr 661 drivers/misc/cardreader/rtsx_pcr.c return rtsx_pci_send_cmd(pcr, 100); pcr 664 drivers/misc/cardreader/rtsx_pcr.c int rtsx_pci_card_pull_ctl_enable(struct rtsx_pcr *pcr, int card) pcr 669 drivers/misc/cardreader/rtsx_pcr.c tbl = pcr->sd_pull_ctl_enable_tbl; pcr 671 drivers/misc/cardreader/rtsx_pcr.c tbl = pcr->ms_pull_ctl_enable_tbl; pcr 675 drivers/misc/cardreader/rtsx_pcr.c return rtsx_pci_set_pull_ctl(pcr, tbl); pcr 679 drivers/misc/cardreader/rtsx_pcr.c int rtsx_pci_card_pull_ctl_disable(struct rtsx_pcr *pcr, int card) pcr 684 drivers/misc/cardreader/rtsx_pcr.c tbl = pcr->sd_pull_ctl_disable_tbl; pcr 686 drivers/misc/cardreader/rtsx_pcr.c tbl = pcr->ms_pull_ctl_disable_tbl; pcr 691 drivers/misc/cardreader/rtsx_pcr.c return rtsx_pci_set_pull_ctl(pcr, tbl); pcr 695 drivers/misc/cardreader/rtsx_pcr.c static void rtsx_pci_enable_bus_int(struct rtsx_pcr *pcr) pcr 697 drivers/misc/cardreader/rtsx_pcr.c struct rtsx_hw_param *hw_param = &pcr->hw_param; pcr 699 drivers/misc/cardreader/rtsx_pcr.c pcr->bier = TRANS_OK_INT_EN | TRANS_FAIL_INT_EN | SD_INT_EN pcr 702 drivers/misc/cardreader/rtsx_pcr.c if (pcr->num_slots > 1) pcr 703 drivers/misc/cardreader/rtsx_pcr.c pcr->bier |= MS_INT_EN; pcr 706 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_writel(pcr, RTSX_BIER, pcr->bier); pcr 708 drivers/misc/cardreader/rtsx_pcr.c pcr_dbg(pcr, "RTSX_BIER: 0x%08x\n", pcr->bier); pcr 728 drivers/misc/cardreader/rtsx_pcr.c int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock, pcr 748 drivers/misc/cardreader/rtsx_pcr.c err = rtsx_pci_write_register(pcr, SD_CFG1, pcr 755 drivers/misc/cardreader/rtsx_pcr.c pcr->dma_error_count && pcr 756 drivers/misc/cardreader/rtsx_pcr.c PCI_PID(pcr) == RTS5227_DEVICE_ID) pcr 758 drivers/misc/cardreader/rtsx_pcr.c (pcr->dma_error_count * 20000000); pcr 761 drivers/misc/cardreader/rtsx_pcr.c pcr_dbg(pcr, "Switch card clock to %dMHz\n", card_clock); pcr 766 drivers/misc/cardreader/rtsx_pcr.c pcr_dbg(pcr, "Internal SSC clock: %dMHz (cur_clock = %d)\n", pcr 767 drivers/misc/cardreader/rtsx_pcr.c clk, pcr->cur_clock); pcr 769 drivers/misc/cardreader/rtsx_pcr.c if (clk == pcr->cur_clock) pcr 772 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->conv_clk_and_div_n) pcr 773 drivers/misc/cardreader/rtsx_pcr.c n = (u8)pcr->ops->conv_clk_and_div_n(clk, CLK_TO_DIV_N); pcr 786 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->conv_clk_and_div_n) { pcr 787 drivers/misc/cardreader/rtsx_pcr.c int dbl_clk = pcr->ops->conv_clk_and_div_n(n, pcr 789 drivers/misc/cardreader/rtsx_pcr.c n = (u8)pcr->ops->conv_clk_and_div_n(dbl_clk, pcr 796 drivers/misc/cardreader/rtsx_pcr.c pcr_dbg(pcr, "n = %d, div = %d\n", n, div); pcr 803 drivers/misc/cardreader/rtsx_pcr.c pcr_dbg(pcr, "ssc_depth = %d\n", ssc_depth); pcr 805 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_init_cmd(pcr); pcr 806 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CLK_CTL, pcr 808 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CLK_DIV, pcr 810 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SSC_CTL1, SSC_RSTB, 0); pcr 811 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SSC_CTL2, pcr 813 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SSC_DIV_N_0, 0xFF, n); pcr 814 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SSC_CTL1, SSC_RSTB, SSC_RSTB); pcr 816 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_VPCLK0_CTL, pcr 818 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_VPCLK0_CTL, pcr 822 drivers/misc/cardreader/rtsx_pcr.c err = rtsx_pci_send_cmd(pcr, 2000); pcr 828 drivers/misc/cardreader/rtsx_pcr.c err = rtsx_pci_write_register(pcr, CLK_CTL, CLK_LOW_FREQ, 0); pcr 832 drivers/misc/cardreader/rtsx_pcr.c pcr->cur_clock = clk; pcr 837 drivers/misc/cardreader/rtsx_pcr.c int rtsx_pci_card_power_on(struct rtsx_pcr *pcr, int card) pcr 839 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->card_power_on) pcr 840 drivers/misc/cardreader/rtsx_pcr.c return pcr->ops->card_power_on(pcr, card); pcr 846 drivers/misc/cardreader/rtsx_pcr.c int rtsx_pci_card_power_off(struct rtsx_pcr *pcr, int card) pcr 848 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->card_power_off) pcr 849 drivers/misc/cardreader/rtsx_pcr.c return pcr->ops->card_power_off(pcr, card); pcr 855 drivers/misc/cardreader/rtsx_pcr.c int rtsx_pci_card_exclusive_check(struct rtsx_pcr *pcr, int card) pcr 862 drivers/misc/cardreader/rtsx_pcr.c if (!(pcr->flags & PCR_MS_PMOS)) { pcr 866 drivers/misc/cardreader/rtsx_pcr.c if (pcr->card_exist & (~cd_mask[card])) pcr 874 drivers/misc/cardreader/rtsx_pcr.c int rtsx_pci_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage) pcr 876 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->switch_output_voltage) pcr 877 drivers/misc/cardreader/rtsx_pcr.c return pcr->ops->switch_output_voltage(pcr, voltage); pcr 883 drivers/misc/cardreader/rtsx_pcr.c unsigned int rtsx_pci_card_exist(struct rtsx_pcr *pcr) pcr 887 drivers/misc/cardreader/rtsx_pcr.c val = rtsx_pci_readl(pcr, RTSX_BIPR); pcr 888 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->cd_deglitch) pcr 889 drivers/misc/cardreader/rtsx_pcr.c val = pcr->ops->cd_deglitch(pcr); pcr 895 drivers/misc/cardreader/rtsx_pcr.c void rtsx_pci_complete_unfinished_transfer(struct rtsx_pcr *pcr) pcr 899 drivers/misc/cardreader/rtsx_pcr.c pcr->finish_me = &finish; pcr 902 drivers/misc/cardreader/rtsx_pcr.c if (pcr->done) pcr 903 drivers/misc/cardreader/rtsx_pcr.c complete(pcr->done); pcr 905 drivers/misc/cardreader/rtsx_pcr.c if (!pcr->remove_pci) pcr 906 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_stop_cmd(pcr); pcr 910 drivers/misc/cardreader/rtsx_pcr.c pcr->finish_me = NULL; pcr 917 drivers/misc/cardreader/rtsx_pcr.c struct rtsx_pcr *pcr; pcr 923 drivers/misc/cardreader/rtsx_pcr.c pcr = container_of(dwork, struct rtsx_pcr, carddet_work); pcr 925 drivers/misc/cardreader/rtsx_pcr.c pcr_dbg(pcr, "--> %s\n", __func__); pcr 927 drivers/misc/cardreader/rtsx_pcr.c mutex_lock(&pcr->pcr_mutex); pcr 928 drivers/misc/cardreader/rtsx_pcr.c spin_lock_irqsave(&pcr->lock, flags); pcr 930 drivers/misc/cardreader/rtsx_pcr.c irq_status = rtsx_pci_readl(pcr, RTSX_BIPR); pcr 931 drivers/misc/cardreader/rtsx_pcr.c pcr_dbg(pcr, "irq_status: 0x%08x\n", irq_status); pcr 934 drivers/misc/cardreader/rtsx_pcr.c card_inserted = pcr->card_inserted & irq_status; pcr 935 drivers/misc/cardreader/rtsx_pcr.c card_removed = pcr->card_removed; pcr 936 drivers/misc/cardreader/rtsx_pcr.c pcr->card_inserted = 0; pcr 937 drivers/misc/cardreader/rtsx_pcr.c pcr->card_removed = 0; pcr 939 drivers/misc/cardreader/rtsx_pcr.c spin_unlock_irqrestore(&pcr->lock, flags); pcr 942 drivers/misc/cardreader/rtsx_pcr.c pcr_dbg(pcr, "card_inserted: 0x%x, card_removed: 0x%x\n", pcr 945 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->cd_deglitch) pcr 946 drivers/misc/cardreader/rtsx_pcr.c card_inserted = pcr->ops->cd_deglitch(pcr); pcr 950 drivers/misc/cardreader/rtsx_pcr.c pcr->card_exist |= card_inserted; pcr 951 drivers/misc/cardreader/rtsx_pcr.c pcr->card_exist &= ~card_removed; pcr 954 drivers/misc/cardreader/rtsx_pcr.c mutex_unlock(&pcr->pcr_mutex); pcr 956 drivers/misc/cardreader/rtsx_pcr.c if ((card_detect & SD_EXIST) && pcr->slots[RTSX_SD_CARD].card_event) pcr 957 drivers/misc/cardreader/rtsx_pcr.c pcr->slots[RTSX_SD_CARD].card_event( pcr 958 drivers/misc/cardreader/rtsx_pcr.c pcr->slots[RTSX_SD_CARD].p_dev); pcr 959 drivers/misc/cardreader/rtsx_pcr.c if ((card_detect & MS_EXIST) && pcr->slots[RTSX_MS_CARD].card_event) pcr 960 drivers/misc/cardreader/rtsx_pcr.c pcr->slots[RTSX_MS_CARD].card_event( pcr 961 drivers/misc/cardreader/rtsx_pcr.c pcr->slots[RTSX_MS_CARD].p_dev); pcr 964 drivers/misc/cardreader/rtsx_pcr.c static void rtsx_pci_process_ocp(struct rtsx_pcr *pcr) pcr 966 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->process_ocp) { pcr 967 drivers/misc/cardreader/rtsx_pcr.c pcr->ops->process_ocp(pcr); pcr 969 drivers/misc/cardreader/rtsx_pcr.c if (!pcr->option.ocp_en) pcr 971 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_get_ocpstat(pcr, &pcr->ocp_stat); pcr 972 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ocp_stat & (SD_OC_NOW | SD_OC_EVER)) { pcr 973 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_card_power_off(pcr, RTSX_SD_CARD); pcr 974 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_register(pcr, CARD_OE, SD_OUTPUT_EN, 0); pcr 975 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_clear_ocpstat(pcr); pcr 976 drivers/misc/cardreader/rtsx_pcr.c pcr->ocp_stat = 0; pcr 981 drivers/misc/cardreader/rtsx_pcr.c static int rtsx_pci_process_ocp_interrupt(struct rtsx_pcr *pcr) pcr 983 drivers/misc/cardreader/rtsx_pcr.c if (pcr->option.ocp_en) pcr 984 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_process_ocp(pcr); pcr 991 drivers/misc/cardreader/rtsx_pcr.c struct rtsx_pcr *pcr = dev_id; pcr 994 drivers/misc/cardreader/rtsx_pcr.c if (!pcr) pcr 997 drivers/misc/cardreader/rtsx_pcr.c spin_lock(&pcr->lock); pcr 999 drivers/misc/cardreader/rtsx_pcr.c int_reg = rtsx_pci_readl(pcr, RTSX_BIPR); pcr 1001 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_writel(pcr, RTSX_BIPR, int_reg); pcr 1002 drivers/misc/cardreader/rtsx_pcr.c if ((int_reg & pcr->bier) == 0) { pcr 1003 drivers/misc/cardreader/rtsx_pcr.c spin_unlock(&pcr->lock); pcr 1007 drivers/misc/cardreader/rtsx_pcr.c spin_unlock(&pcr->lock); pcr 1011 drivers/misc/cardreader/rtsx_pcr.c int_reg &= (pcr->bier | 0x7FFFFF); pcr 1014 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_process_ocp_interrupt(pcr); pcr 1018 drivers/misc/cardreader/rtsx_pcr.c pcr->card_inserted |= SD_EXIST; pcr 1020 drivers/misc/cardreader/rtsx_pcr.c pcr->card_removed |= SD_EXIST; pcr 1021 drivers/misc/cardreader/rtsx_pcr.c pcr->card_inserted &= ~SD_EXIST; pcr 1023 drivers/misc/cardreader/rtsx_pcr.c pcr->dma_error_count = 0; pcr 1028 drivers/misc/cardreader/rtsx_pcr.c pcr->card_inserted |= MS_EXIST; pcr 1030 drivers/misc/cardreader/rtsx_pcr.c pcr->card_removed |= MS_EXIST; pcr 1031 drivers/misc/cardreader/rtsx_pcr.c pcr->card_inserted &= ~MS_EXIST; pcr 1037 drivers/misc/cardreader/rtsx_pcr.c pcr->trans_result = TRANS_RESULT_FAIL; pcr 1038 drivers/misc/cardreader/rtsx_pcr.c if (pcr->done) pcr 1039 drivers/misc/cardreader/rtsx_pcr.c complete(pcr->done); pcr 1041 drivers/misc/cardreader/rtsx_pcr.c pcr->trans_result = TRANS_RESULT_OK; pcr 1042 drivers/misc/cardreader/rtsx_pcr.c if (pcr->done) pcr 1043 drivers/misc/cardreader/rtsx_pcr.c complete(pcr->done); pcr 1047 drivers/misc/cardreader/rtsx_pcr.c if ((pcr->card_inserted || pcr->card_removed) && !(int_reg & SD_OC_INT)) pcr 1048 drivers/misc/cardreader/rtsx_pcr.c schedule_delayed_work(&pcr->carddet_work, pcr 1051 drivers/misc/cardreader/rtsx_pcr.c spin_unlock(&pcr->lock); pcr 1055 drivers/misc/cardreader/rtsx_pcr.c static int rtsx_pci_acquire_irq(struct rtsx_pcr *pcr) pcr 1057 drivers/misc/cardreader/rtsx_pcr.c pcr_dbg(pcr, "%s: pcr->msi_en = %d, pci->irq = %d\n", pcr 1058 drivers/misc/cardreader/rtsx_pcr.c __func__, pcr->msi_en, pcr->pci->irq); pcr 1060 drivers/misc/cardreader/rtsx_pcr.c if (request_irq(pcr->pci->irq, rtsx_pci_isr, pcr 1061 drivers/misc/cardreader/rtsx_pcr.c pcr->msi_en ? 0 : IRQF_SHARED, pcr 1062 drivers/misc/cardreader/rtsx_pcr.c DRV_NAME_RTSX_PCI, pcr)) { pcr 1063 drivers/misc/cardreader/rtsx_pcr.c dev_err(&(pcr->pci->dev), pcr 1065 drivers/misc/cardreader/rtsx_pcr.c pcr->pci->irq); pcr 1069 drivers/misc/cardreader/rtsx_pcr.c pcr->irq = pcr->pci->irq; pcr 1070 drivers/misc/cardreader/rtsx_pcr.c pci_intx(pcr->pci, !pcr->msi_en); pcr 1075 drivers/misc/cardreader/rtsx_pcr.c static void rtsx_enable_aspm(struct rtsx_pcr *pcr) pcr 1077 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->set_aspm) pcr 1078 drivers/misc/cardreader/rtsx_pcr.c pcr->ops->set_aspm(pcr, true); pcr 1080 drivers/misc/cardreader/rtsx_pcr.c rtsx_comm_set_aspm(pcr, true); pcr 1083 drivers/misc/cardreader/rtsx_pcr.c static void rtsx_comm_pm_power_saving(struct rtsx_pcr *pcr) pcr 1085 drivers/misc/cardreader/rtsx_pcr.c struct rtsx_cr_option *option = &pcr->option; pcr 1090 drivers/misc/cardreader/rtsx_pcr.c if (rtsx_check_dev_flag(pcr, L1_SNOOZE_TEST_EN)) pcr 1093 drivers/misc/cardreader/rtsx_pcr.c rtsx_set_ltr_latency(pcr, latency); pcr 1096 drivers/misc/cardreader/rtsx_pcr.c if (rtsx_check_dev_flag(pcr, LTR_L1SS_PWR_GATE_EN)) pcr 1097 drivers/misc/cardreader/rtsx_pcr.c rtsx_set_l1off_sub_cfg_d0(pcr, 0); pcr 1099 drivers/misc/cardreader/rtsx_pcr.c rtsx_enable_aspm(pcr); pcr 1102 drivers/misc/cardreader/rtsx_pcr.c static void rtsx_pm_power_saving(struct rtsx_pcr *pcr) pcr 1104 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->power_saving) pcr 1105 drivers/misc/cardreader/rtsx_pcr.c pcr->ops->power_saving(pcr); pcr 1107 drivers/misc/cardreader/rtsx_pcr.c rtsx_comm_pm_power_saving(pcr); pcr 1113 drivers/misc/cardreader/rtsx_pcr.c struct rtsx_pcr *pcr = container_of(dwork, struct rtsx_pcr, idle_work); pcr 1115 drivers/misc/cardreader/rtsx_pcr.c pcr_dbg(pcr, "--> %s\n", __func__); pcr 1117 drivers/misc/cardreader/rtsx_pcr.c mutex_lock(&pcr->pcr_mutex); pcr 1119 drivers/misc/cardreader/rtsx_pcr.c pcr->state = PDEV_STAT_IDLE; pcr 1121 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->disable_auto_blink) pcr 1122 drivers/misc/cardreader/rtsx_pcr.c pcr->ops->disable_auto_blink(pcr); pcr 1123 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->turn_off_led) pcr 1124 drivers/misc/cardreader/rtsx_pcr.c pcr->ops->turn_off_led(pcr); pcr 1126 drivers/misc/cardreader/rtsx_pcr.c rtsx_pm_power_saving(pcr); pcr 1128 drivers/misc/cardreader/rtsx_pcr.c mutex_unlock(&pcr->pcr_mutex); pcr 1132 drivers/misc/cardreader/rtsx_pcr.c static void rtsx_pci_power_off(struct rtsx_pcr *pcr, u8 pm_state) pcr 1134 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->turn_off_led) pcr 1135 drivers/misc/cardreader/rtsx_pcr.c pcr->ops->turn_off_led(pcr); pcr 1137 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_writel(pcr, RTSX_BIER, 0); pcr 1138 drivers/misc/cardreader/rtsx_pcr.c pcr->bier = 0; pcr 1140 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_register(pcr, PETXCFG, 0x08, 0x08); pcr 1141 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_register(pcr, HOST_SLEEP_STATE, 0x03, pm_state); pcr 1143 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->force_power_down) pcr 1144 drivers/misc/cardreader/rtsx_pcr.c pcr->ops->force_power_down(pcr, pm_state); pcr 1148 drivers/misc/cardreader/rtsx_pcr.c void rtsx_pci_enable_ocp(struct rtsx_pcr *pcr) pcr 1152 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->enable_ocp) { pcr 1153 drivers/misc/cardreader/rtsx_pcr.c pcr->ops->enable_ocp(pcr); pcr 1155 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_register(pcr, FPDCTL, OC_POWER_DOWN, 0); pcr 1156 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_register(pcr, REG_OCPCTL, 0xFF, val); pcr 1161 drivers/misc/cardreader/rtsx_pcr.c void rtsx_pci_disable_ocp(struct rtsx_pcr *pcr) pcr 1165 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->disable_ocp) { pcr 1166 drivers/misc/cardreader/rtsx_pcr.c pcr->ops->disable_ocp(pcr); pcr 1168 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_register(pcr, REG_OCPCTL, mask, 0); pcr 1169 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_register(pcr, FPDCTL, OC_POWER_DOWN, pcr 1174 drivers/misc/cardreader/rtsx_pcr.c void rtsx_pci_init_ocp(struct rtsx_pcr *pcr) pcr 1176 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->init_ocp) { pcr 1177 drivers/misc/cardreader/rtsx_pcr.c pcr->ops->init_ocp(pcr); pcr 1179 drivers/misc/cardreader/rtsx_pcr.c struct rtsx_cr_option *option = &(pcr->option); pcr 1184 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_register(pcr, FPDCTL, OC_POWER_DOWN, 0); pcr 1185 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_register(pcr, REG_OCPPARA1, pcr 1187 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_register(pcr, REG_OCPPARA2, pcr 1189 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_register(pcr, REG_OCPGLITCH, pcr 1190 drivers/misc/cardreader/rtsx_pcr.c SD_OCP_GLITCH_MASK, pcr->hw_param.ocp_glitch); pcr 1191 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_enable_ocp(pcr); pcr 1194 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_register(pcr, FPDCTL, OC_POWER_DOWN, pcr 1200 drivers/misc/cardreader/rtsx_pcr.c int rtsx_pci_get_ocpstat(struct rtsx_pcr *pcr, u8 *val) pcr 1202 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->get_ocpstat) pcr 1203 drivers/misc/cardreader/rtsx_pcr.c return pcr->ops->get_ocpstat(pcr, val); pcr 1205 drivers/misc/cardreader/rtsx_pcr.c return rtsx_pci_read_register(pcr, REG_OCPSTAT, val); pcr 1208 drivers/misc/cardreader/rtsx_pcr.c void rtsx_pci_clear_ocpstat(struct rtsx_pcr *pcr) pcr 1210 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->clear_ocpstat) { pcr 1211 drivers/misc/cardreader/rtsx_pcr.c pcr->ops->clear_ocpstat(pcr); pcr 1216 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_register(pcr, REG_OCPCTL, mask, val); pcr 1218 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_register(pcr, REG_OCPCTL, mask, 0); pcr 1222 drivers/misc/cardreader/rtsx_pcr.c int rtsx_sd_power_off_card3v3(struct rtsx_pcr *pcr) pcr 1224 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_register(pcr, CARD_CLK_EN, SD_CLK_EN | pcr 1226 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_register(pcr, CARD_OE, SD_OUTPUT_EN, 0); pcr 1227 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_card_power_off(pcr, RTSX_SD_CARD); pcr 1231 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_card_pull_ctl_disable(pcr, RTSX_SD_CARD); pcr 1236 drivers/misc/cardreader/rtsx_pcr.c int rtsx_ms_power_off_card3v3(struct rtsx_pcr *pcr) pcr 1238 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_register(pcr, CARD_CLK_EN, SD_CLK_EN | pcr 1241 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_card_pull_ctl_disable(pcr, RTSX_MS_CARD); pcr 1243 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_register(pcr, CARD_OE, MS_OUTPUT_EN, 0); pcr 1244 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_card_power_off(pcr, RTSX_MS_CARD); pcr 1249 drivers/misc/cardreader/rtsx_pcr.c static int rtsx_pci_init_hw(struct rtsx_pcr *pcr) pcr 1253 drivers/misc/cardreader/rtsx_pcr.c pcr->pcie_cap = pci_find_capability(pcr->pci, PCI_CAP_ID_EXP); pcr 1254 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_writel(pcr, RTSX_HCBAR, pcr->host_cmds_addr); pcr 1256 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_enable_bus_int(pcr); pcr 1259 drivers/misc/cardreader/rtsx_pcr.c err = rtsx_pci_write_register(pcr, FPDCTL, SSC_POWER_DOWN, 0); pcr 1266 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_disable_aspm(pcr); pcr 1267 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->optimize_phy) { pcr 1268 drivers/misc/cardreader/rtsx_pcr.c err = pcr->ops->optimize_phy(pcr); pcr 1273 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_init_cmd(pcr); pcr 1276 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CLK_DIV, 0x07, 0x07); pcr 1278 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, HOST_SLEEP_STATE, 0x03, 0x00); pcr 1280 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_CLK_EN, 0x1E, 0); pcr 1282 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CHANGE_LINK_STATE, 0x0A, 0); pcr 1284 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_DRIVE_SEL, pcr 1285 drivers/misc/cardreader/rtsx_pcr.c 0xFF, pcr->card_drive_sel); pcr 1287 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SSC_CTL1, pcr 1289 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SSC_CTL2, 0xFF, 0x12); pcr 1291 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CHANGE_LINK_STATE, 0x16, 0x10); pcr 1293 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, IRQSTAT0, pcr 1298 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PERST_GLITCH_WIDTH, 0xFF, 0x80); pcr 1303 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, RCCTL, 0x01, 0x00); pcr 1309 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, NFTS_TX_CTRL, 0x02, 0); pcr 1311 drivers/misc/cardreader/rtsx_pcr.c err = rtsx_pci_send_cmd(pcr, 100); pcr 1315 drivers/misc/cardreader/rtsx_pcr.c switch (PCI_PID(pcr)) { pcr 1320 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_register(pcr, PM_CLK_FORCE_CTL, 1, 1); pcr 1327 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_init_ocp(pcr); pcr 1330 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_config_byte(pcr, pcr->pcie_cap + PCI_EXP_LNKCTL + 1, 1); pcr 1332 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_write_config_byte(pcr, 0x70F, 0x5B); pcr 1334 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->extra_init_hw) { pcr 1335 drivers/misc/cardreader/rtsx_pcr.c err = pcr->ops->extra_init_hw(pcr); pcr 1343 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->cd_deglitch) pcr 1344 drivers/misc/cardreader/rtsx_pcr.c pcr->card_exist = pcr->ops->cd_deglitch(pcr); pcr 1346 drivers/misc/cardreader/rtsx_pcr.c pcr->card_exist = rtsx_pci_readl(pcr, RTSX_BIPR) & CARD_EXIST; pcr 1351 drivers/misc/cardreader/rtsx_pcr.c static int rtsx_pci_init_chip(struct rtsx_pcr *pcr) pcr 1355 drivers/misc/cardreader/rtsx_pcr.c spin_lock_init(&pcr->lock); pcr 1356 drivers/misc/cardreader/rtsx_pcr.c mutex_init(&pcr->pcr_mutex); pcr 1358 drivers/misc/cardreader/rtsx_pcr.c switch (PCI_PID(pcr)) { pcr 1361 drivers/misc/cardreader/rtsx_pcr.c rts5209_init_params(pcr); pcr 1365 drivers/misc/cardreader/rtsx_pcr.c rts5229_init_params(pcr); pcr 1369 drivers/misc/cardreader/rtsx_pcr.c rtl8411_init_params(pcr); pcr 1373 drivers/misc/cardreader/rtsx_pcr.c rts5227_init_params(pcr); pcr 1377 drivers/misc/cardreader/rtsx_pcr.c rts522a_init_params(pcr); pcr 1381 drivers/misc/cardreader/rtsx_pcr.c rts5249_init_params(pcr); pcr 1385 drivers/misc/cardreader/rtsx_pcr.c rts524a_init_params(pcr); pcr 1389 drivers/misc/cardreader/rtsx_pcr.c rts525a_init_params(pcr); pcr 1393 drivers/misc/cardreader/rtsx_pcr.c rtl8411b_init_params(pcr); pcr 1397 drivers/misc/cardreader/rtsx_pcr.c rtl8402_init_params(pcr); pcr 1400 drivers/misc/cardreader/rtsx_pcr.c rts5260_init_params(pcr); pcr 1404 drivers/misc/cardreader/rtsx_pcr.c pcr_dbg(pcr, "PID: 0x%04x, IC version: 0x%02x\n", pcr 1405 drivers/misc/cardreader/rtsx_pcr.c PCI_PID(pcr), pcr->ic_version); pcr 1407 drivers/misc/cardreader/rtsx_pcr.c pcr->slots = kcalloc(pcr->num_slots, sizeof(struct rtsx_slot), pcr 1409 drivers/misc/cardreader/rtsx_pcr.c if (!pcr->slots) pcr 1412 drivers/misc/cardreader/rtsx_pcr.c if (pcr->ops->fetch_vendor_settings) pcr 1413 drivers/misc/cardreader/rtsx_pcr.c pcr->ops->fetch_vendor_settings(pcr); pcr 1415 drivers/misc/cardreader/rtsx_pcr.c pcr_dbg(pcr, "pcr->aspm_en = 0x%x\n", pcr->aspm_en); pcr 1416 drivers/misc/cardreader/rtsx_pcr.c pcr_dbg(pcr, "pcr->sd30_drive_sel_1v8 = 0x%x\n", pcr 1417 drivers/misc/cardreader/rtsx_pcr.c pcr->sd30_drive_sel_1v8); pcr 1418 drivers/misc/cardreader/rtsx_pcr.c pcr_dbg(pcr, "pcr->sd30_drive_sel_3v3 = 0x%x\n", pcr 1419 drivers/misc/cardreader/rtsx_pcr.c pcr->sd30_drive_sel_3v3); pcr 1420 drivers/misc/cardreader/rtsx_pcr.c pcr_dbg(pcr, "pcr->card_drive_sel = 0x%x\n", pcr 1421 drivers/misc/cardreader/rtsx_pcr.c pcr->card_drive_sel); pcr 1422 drivers/misc/cardreader/rtsx_pcr.c pcr_dbg(pcr, "pcr->flags = 0x%x\n", pcr->flags); pcr 1424 drivers/misc/cardreader/rtsx_pcr.c pcr->state = PDEV_STAT_IDLE; pcr 1425 drivers/misc/cardreader/rtsx_pcr.c err = rtsx_pci_init_hw(pcr); pcr 1427 drivers/misc/cardreader/rtsx_pcr.c kfree(pcr->slots); pcr 1437 drivers/misc/cardreader/rtsx_pcr.c struct rtsx_pcr *pcr; pcr 1459 drivers/misc/cardreader/rtsx_pcr.c pcr = kzalloc(sizeof(*pcr), GFP_KERNEL); pcr 1460 drivers/misc/cardreader/rtsx_pcr.c if (!pcr) { pcr 1470 drivers/misc/cardreader/rtsx_pcr.c handle->pcr = pcr; pcr 1474 drivers/misc/cardreader/rtsx_pcr.c ret = idr_alloc(&rtsx_pci_idr, pcr, 0, 0, GFP_NOWAIT); pcr 1476 drivers/misc/cardreader/rtsx_pcr.c pcr->id = ret; pcr 1482 drivers/misc/cardreader/rtsx_pcr.c pcr->pci = pcidev; pcr 1485 drivers/misc/cardreader/rtsx_pcr.c if (CHK_PCI_PID(pcr, 0x525A)) pcr 1489 drivers/misc/cardreader/rtsx_pcr.c pcr->remap_addr = ioremap_nocache(base, len); pcr 1490 drivers/misc/cardreader/rtsx_pcr.c if (!pcr->remap_addr) { pcr 1495 drivers/misc/cardreader/rtsx_pcr.c pcr->rtsx_resv_buf = dma_alloc_coherent(&(pcidev->dev), pcr 1496 drivers/misc/cardreader/rtsx_pcr.c RTSX_RESV_BUF_LEN, &(pcr->rtsx_resv_buf_addr), pcr 1498 drivers/misc/cardreader/rtsx_pcr.c if (pcr->rtsx_resv_buf == NULL) { pcr 1502 drivers/misc/cardreader/rtsx_pcr.c pcr->host_cmds_ptr = pcr->rtsx_resv_buf; pcr 1503 drivers/misc/cardreader/rtsx_pcr.c pcr->host_cmds_addr = pcr->rtsx_resv_buf_addr; pcr 1504 drivers/misc/cardreader/rtsx_pcr.c pcr->host_sg_tbl_ptr = pcr->rtsx_resv_buf + HOST_CMDS_BUF_LEN; pcr 1505 drivers/misc/cardreader/rtsx_pcr.c pcr->host_sg_tbl_addr = pcr->rtsx_resv_buf_addr + HOST_CMDS_BUF_LEN; pcr 1507 drivers/misc/cardreader/rtsx_pcr.c pcr->card_inserted = 0; pcr 1508 drivers/misc/cardreader/rtsx_pcr.c pcr->card_removed = 0; pcr 1509 drivers/misc/cardreader/rtsx_pcr.c INIT_DELAYED_WORK(&pcr->carddet_work, rtsx_pci_card_detect); pcr 1510 drivers/misc/cardreader/rtsx_pcr.c INIT_DELAYED_WORK(&pcr->idle_work, rtsx_pci_idle_work); pcr 1512 drivers/misc/cardreader/rtsx_pcr.c pcr->msi_en = msi_en; pcr 1513 drivers/misc/cardreader/rtsx_pcr.c if (pcr->msi_en) { pcr 1516 drivers/misc/cardreader/rtsx_pcr.c pcr->msi_en = false; pcr 1519 drivers/misc/cardreader/rtsx_pcr.c ret = rtsx_pci_acquire_irq(pcr); pcr 1524 drivers/misc/cardreader/rtsx_pcr.c synchronize_irq(pcr->irq); pcr 1526 drivers/misc/cardreader/rtsx_pcr.c ret = rtsx_pci_init_chip(pcr); pcr 1534 drivers/misc/cardreader/rtsx_pcr.c ret = mfd_add_devices(&pcidev->dev, pcr->id, rtsx_pcr_cells, pcr 1539 drivers/misc/cardreader/rtsx_pcr.c schedule_delayed_work(&pcr->idle_work, msecs_to_jiffies(200)); pcr 1544 drivers/misc/cardreader/rtsx_pcr.c free_irq(pcr->irq, (void *)pcr); pcr 1546 drivers/misc/cardreader/rtsx_pcr.c if (pcr->msi_en) pcr 1547 drivers/misc/cardreader/rtsx_pcr.c pci_disable_msi(pcr->pci); pcr 1548 drivers/misc/cardreader/rtsx_pcr.c dma_free_coherent(&(pcr->pci->dev), RTSX_RESV_BUF_LEN, pcr 1549 drivers/misc/cardreader/rtsx_pcr.c pcr->rtsx_resv_buf, pcr->rtsx_resv_buf_addr); pcr 1551 drivers/misc/cardreader/rtsx_pcr.c iounmap(pcr->remap_addr); pcr 1555 drivers/misc/cardreader/rtsx_pcr.c kfree(pcr); pcr 1567 drivers/misc/cardreader/rtsx_pcr.c struct rtsx_pcr *pcr = handle->pcr; pcr 1569 drivers/misc/cardreader/rtsx_pcr.c pcr->remove_pci = true; pcr 1572 drivers/misc/cardreader/rtsx_pcr.c spin_lock_irq(&pcr->lock); pcr 1573 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_writel(pcr, RTSX_BIER, 0); pcr 1574 drivers/misc/cardreader/rtsx_pcr.c pcr->bier = 0; pcr 1575 drivers/misc/cardreader/rtsx_pcr.c spin_unlock_irq(&pcr->lock); pcr 1577 drivers/misc/cardreader/rtsx_pcr.c cancel_delayed_work_sync(&pcr->carddet_work); pcr 1578 drivers/misc/cardreader/rtsx_pcr.c cancel_delayed_work_sync(&pcr->idle_work); pcr 1582 drivers/misc/cardreader/rtsx_pcr.c dma_free_coherent(&(pcr->pci->dev), RTSX_RESV_BUF_LEN, pcr 1583 drivers/misc/cardreader/rtsx_pcr.c pcr->rtsx_resv_buf, pcr->rtsx_resv_buf_addr); pcr 1584 drivers/misc/cardreader/rtsx_pcr.c free_irq(pcr->irq, (void *)pcr); pcr 1585 drivers/misc/cardreader/rtsx_pcr.c if (pcr->msi_en) pcr 1586 drivers/misc/cardreader/rtsx_pcr.c pci_disable_msi(pcr->pci); pcr 1587 drivers/misc/cardreader/rtsx_pcr.c iounmap(pcr->remap_addr); pcr 1593 drivers/misc/cardreader/rtsx_pcr.c idr_remove(&rtsx_pci_idr, pcr->id); pcr 1596 drivers/misc/cardreader/rtsx_pcr.c kfree(pcr->slots); pcr 1597 drivers/misc/cardreader/rtsx_pcr.c kfree(pcr); pcr 1610 drivers/misc/cardreader/rtsx_pcr.c struct rtsx_pcr *pcr; pcr 1615 drivers/misc/cardreader/rtsx_pcr.c pcr = handle->pcr; pcr 1617 drivers/misc/cardreader/rtsx_pcr.c cancel_delayed_work(&pcr->carddet_work); pcr 1618 drivers/misc/cardreader/rtsx_pcr.c cancel_delayed_work(&pcr->idle_work); pcr 1620 drivers/misc/cardreader/rtsx_pcr.c mutex_lock(&pcr->pcr_mutex); pcr 1622 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_power_off(pcr, HOST_ENTER_S3); pcr 1629 drivers/misc/cardreader/rtsx_pcr.c mutex_unlock(&pcr->pcr_mutex); pcr 1636 drivers/misc/cardreader/rtsx_pcr.c struct rtsx_pcr *pcr; pcr 1642 drivers/misc/cardreader/rtsx_pcr.c pcr = handle->pcr; pcr 1644 drivers/misc/cardreader/rtsx_pcr.c mutex_lock(&pcr->pcr_mutex); pcr 1653 drivers/misc/cardreader/rtsx_pcr.c ret = rtsx_pci_write_register(pcr, HOST_SLEEP_STATE, 0x03, 0x00); pcr 1657 drivers/misc/cardreader/rtsx_pcr.c ret = rtsx_pci_init_hw(pcr); pcr 1661 drivers/misc/cardreader/rtsx_pcr.c schedule_delayed_work(&pcr->idle_work, msecs_to_jiffies(200)); pcr 1664 drivers/misc/cardreader/rtsx_pcr.c mutex_unlock(&pcr->pcr_mutex); pcr 1671 drivers/misc/cardreader/rtsx_pcr.c struct rtsx_pcr *pcr; pcr 1676 drivers/misc/cardreader/rtsx_pcr.c pcr = handle->pcr; pcr 1677 drivers/misc/cardreader/rtsx_pcr.c rtsx_pci_power_off(pcr, HOST_ENTER_S1); pcr 1680 drivers/misc/cardreader/rtsx_pcr.c free_irq(pcr->irq, (void *)pcr); pcr 1681 drivers/misc/cardreader/rtsx_pcr.c if (pcr->msi_en) pcr 1682 drivers/misc/cardreader/rtsx_pcr.c pci_disable_msi(pcr->pci); pcr 42 drivers/misc/cardreader/rtsx_pcr.h int __rtsx_pci_write_phy_register(struct rtsx_pcr *pcr, u8 addr, u16 val); pcr 43 drivers/misc/cardreader/rtsx_pcr.h int __rtsx_pci_read_phy_register(struct rtsx_pcr *pcr, u8 addr, u16 *val); pcr 45 drivers/misc/cardreader/rtsx_pcr.h void rts5209_init_params(struct rtsx_pcr *pcr); pcr 46 drivers/misc/cardreader/rtsx_pcr.h void rts5229_init_params(struct rtsx_pcr *pcr); pcr 47 drivers/misc/cardreader/rtsx_pcr.h void rtl8411_init_params(struct rtsx_pcr *pcr); pcr 48 drivers/misc/cardreader/rtsx_pcr.h void rtl8402_init_params(struct rtsx_pcr *pcr); pcr 49 drivers/misc/cardreader/rtsx_pcr.h void rts5227_init_params(struct rtsx_pcr *pcr); pcr 50 drivers/misc/cardreader/rtsx_pcr.h void rts522a_init_params(struct rtsx_pcr *pcr); pcr 51 drivers/misc/cardreader/rtsx_pcr.h void rts5249_init_params(struct rtsx_pcr *pcr); pcr 52 drivers/misc/cardreader/rtsx_pcr.h void rts524a_init_params(struct rtsx_pcr *pcr); pcr 53 drivers/misc/cardreader/rtsx_pcr.h void rts525a_init_params(struct rtsx_pcr *pcr); pcr 54 drivers/misc/cardreader/rtsx_pcr.h void rtl8411b_init_params(struct rtsx_pcr *pcr); pcr 55 drivers/misc/cardreader/rtsx_pcr.h void rts5260_init_params(struct rtsx_pcr *pcr); pcr 86 drivers/misc/cardreader/rtsx_pcr.h #define set_pull_ctrl_tables(pcr, __device) \ pcr 88 drivers/misc/cardreader/rtsx_pcr.h pcr->sd_pull_ctl_enable_tbl = __device##_sd_pull_ctl_enable_tbl; \ pcr 89 drivers/misc/cardreader/rtsx_pcr.h pcr->sd_pull_ctl_disable_tbl = __device##_sd_pull_ctl_disable_tbl; \ pcr 90 drivers/misc/cardreader/rtsx_pcr.h pcr->ms_pull_ctl_enable_tbl = __device##_ms_pull_ctl_enable_tbl; \ pcr 91 drivers/misc/cardreader/rtsx_pcr.h pcr->ms_pull_ctl_disable_tbl = __device##_ms_pull_ctl_disable_tbl; \ pcr 95 drivers/misc/cardreader/rtsx_pcr.h int rtsx_gops_pm_reset(struct rtsx_pcr *pcr); pcr 96 drivers/misc/cardreader/rtsx_pcr.h int rtsx_set_ltr_latency(struct rtsx_pcr *pcr, u32 latency); pcr 97 drivers/misc/cardreader/rtsx_pcr.h int rtsx_set_l1off_sub(struct rtsx_pcr *pcr, u8 val); pcr 98 drivers/misc/cardreader/rtsx_pcr.h void rtsx_pci_init_ocp(struct rtsx_pcr *pcr); pcr 99 drivers/misc/cardreader/rtsx_pcr.h void rtsx_pci_disable_ocp(struct rtsx_pcr *pcr); pcr 100 drivers/misc/cardreader/rtsx_pcr.h void rtsx_pci_enable_ocp(struct rtsx_pcr *pcr); pcr 101 drivers/misc/cardreader/rtsx_pcr.h int rtsx_pci_get_ocpstat(struct rtsx_pcr *pcr, u8 *val); pcr 102 drivers/misc/cardreader/rtsx_pcr.h void rtsx_pci_clear_ocpstat(struct rtsx_pcr *pcr); pcr 103 drivers/misc/cardreader/rtsx_pcr.h int rtsx_sd_power_off_card3v3(struct rtsx_pcr *pcr); pcr 104 drivers/misc/cardreader/rtsx_pcr.h int rtsx_ms_power_off_card3v3(struct rtsx_pcr *pcr); pcr 26 drivers/mmc/host/rtsx_pci_sdmmc.c struct rtsx_pcr *pcr; pcr 57 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_write_register(host->pcr, CARD_STOP, pcr 74 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_read_register(host->pcr, start + i + j, pcr 92 drivers/mmc/host/rtsx_pci_sdmmc.c return rtsx_pci_readl(host->pcr, RTSX_BIPR) & SD_EXIST; pcr 95 drivers/mmc/host/rtsx_pci_sdmmc.c static void sd_cmd_set_sd_cmd(struct rtsx_pcr *pcr, struct mmc_command *cmd) pcr 97 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_CMD0, 0xFF, pcr 99 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_write_be32(pcr, SD_CMD1, cmd->arg); pcr 102 drivers/mmc/host/rtsx_pci_sdmmc.c static void sd_cmd_set_data_len(struct rtsx_pcr *pcr, u16 blocks, u16 blksz) pcr 104 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_BLOCK_CNT_L, 0xFF, blocks); pcr 105 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_BLOCK_CNT_H, 0xFF, blocks >> 8); pcr 106 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_BYTE_CNT_L, 0xFF, blksz); pcr 107 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_BYTE_CNT_H, 0xFF, blksz >> 8); pcr 150 drivers/mmc/host/rtsx_pci_sdmmc.c struct rtsx_pcr *pcr = host->pcr; pcr 163 drivers/mmc/host/rtsx_pci_sdmmc.c count = rtsx_pci_dma_map_sg(pcr, data->sg, data->sg_len, read); pcr 201 drivers/mmc/host/rtsx_pci_sdmmc.c struct rtsx_pcr *pcr = host->pcr; pcr 205 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_dma_unmap_sg(pcr, data->sg, data->sg_len, read); pcr 212 drivers/mmc/host/rtsx_pci_sdmmc.c struct rtsx_pcr *pcr = host->pcr; pcr 236 drivers/mmc/host/rtsx_pci_sdmmc.c err = rtsx_pci_write_register(pcr, SD_BUS_STAT, pcr 244 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_init_cmd(pcr); pcr 245 drivers/mmc/host/rtsx_pci_sdmmc.c sd_cmd_set_sd_cmd(pcr, cmd); pcr 246 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_CFG2, 0xFF, rsp_type); pcr 247 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_DATA_SOURCE, pcr 249 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_TRANSFER, pcr 251 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, CHECK_REG_CMD, SD_TRANSFER, pcr 258 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, READ_REG_CMD, (u16)i, 0, 0); pcr 262 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, READ_REG_CMD, (u16)i, 0, 0); pcr 265 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, READ_REG_CMD, SD_STAT1, 0, 0); pcr 267 drivers/mmc/host/rtsx_pci_sdmmc.c err = rtsx_pci_send_cmd(pcr, timeout); pcr 282 drivers/mmc/host/rtsx_pci_sdmmc.c ptr = rtsx_pci_get_cmd_data(pcr) + 1; pcr 323 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_write_register(pcr, SD_BUS_STAT, pcr 330 drivers/mmc/host/rtsx_pci_sdmmc.c struct rtsx_pcr *pcr = host->pcr; pcr 345 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_init_cmd(pcr); pcr 346 drivers/mmc/host/rtsx_pci_sdmmc.c sd_cmd_set_sd_cmd(pcr, cmd); pcr 347 drivers/mmc/host/rtsx_pci_sdmmc.c sd_cmd_set_data_len(pcr, 1, byte_cnt); pcr 348 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_CFG2, 0xFF, pcr 352 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, pcr 355 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_TRANSFER, pcr 357 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, CHECK_REG_CMD, SD_TRANSFER, pcr 360 drivers/mmc/host/rtsx_pci_sdmmc.c err = rtsx_pci_send_cmd(pcr, timeout); pcr 369 drivers/mmc/host/rtsx_pci_sdmmc.c err = rtsx_pci_read_ppbuf(pcr, buf, buf_len); pcr 384 drivers/mmc/host/rtsx_pci_sdmmc.c struct rtsx_pcr *pcr = host->pcr; pcr 398 drivers/mmc/host/rtsx_pci_sdmmc.c err = rtsx_pci_write_ppbuf(pcr, buf, buf_len); pcr 406 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_init_cmd(pcr); pcr 407 drivers/mmc/host/rtsx_pci_sdmmc.c sd_cmd_set_data_len(pcr, 1, byte_cnt); pcr 408 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_CFG2, 0xFF, pcr 411 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_TRANSFER, 0xFF, pcr 413 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, CHECK_REG_CMD, SD_TRANSFER, pcr 416 drivers/mmc/host/rtsx_pci_sdmmc.c err = rtsx_pci_send_cmd(pcr, timeout); pcr 430 drivers/mmc/host/rtsx_pci_sdmmc.c struct rtsx_pcr *pcr = host->pcr; pcr 451 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_init_cmd(pcr); pcr 452 drivers/mmc/host/rtsx_pci_sdmmc.c sd_cmd_set_sd_cmd(pcr, cmd); pcr 453 drivers/mmc/host/rtsx_pci_sdmmc.c sd_cmd_set_data_len(pcr, data->blocks, data->blksz); pcr 454 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, IRQSTAT0, pcr 456 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, DMATC3, pcr 458 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, DMATC2, pcr 460 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, DMATC1, pcr 462 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, DMATC0, 0xFF, (u8)data_len); pcr 463 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, DMACTL, pcr 466 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_DATA_SOURCE, pcr 468 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_CFG2, 0xFF, cfg2 | resp_type); pcr 469 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_TRANSFER, 0xFF, pcr 471 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, CHECK_REG_CMD, SD_TRANSFER, pcr 473 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_send_cmd_no_wait(pcr); pcr 475 drivers/mmc/host/rtsx_pci_sdmmc.c err = rtsx_pci_dma_transfer(pcr, data->sg, host->sg_count, 1, 10000); pcr 488 drivers/mmc/host/rtsx_pci_sdmmc.c struct rtsx_pcr *pcr = host->pcr; pcr 511 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_init_cmd(pcr); pcr 512 drivers/mmc/host/rtsx_pci_sdmmc.c sd_cmd_set_data_len(pcr, data->blocks, data->blksz); pcr 513 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, IRQSTAT0, pcr 515 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, DMATC3, pcr 517 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, DMATC2, pcr 519 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, DMATC1, pcr 521 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, DMATC0, 0xFF, (u8)data_len); pcr 522 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, DMACTL, pcr 525 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_DATA_SOURCE, pcr 527 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_CFG2, 0xFF, cfg2); pcr 528 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_TRANSFER, 0xFF, pcr 530 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, CHECK_REG_CMD, SD_TRANSFER, pcr 532 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_send_cmd_no_wait(pcr); pcr 533 drivers/mmc/host/rtsx_pci_sdmmc.c err = rtsx_pci_dma_transfer(pcr, data->sg, host->sg_count, 0, 10000); pcr 561 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_write_register(host->pcr, SD_CFG1, pcr 567 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_write_register(host->pcr, SD_CFG1, pcr 608 drivers/mmc/host/rtsx_pci_sdmmc.c struct rtsx_pcr *pcr = host->pcr; pcr 613 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_write_register(pcr, CLK_CTL, CHANGE_CLK, CHANGE_CLK); pcr 616 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_write_register(pcr, SD_VPRX_CTL, pcr 620 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_write_register(pcr, SD_VPTX_CTL, pcr 623 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_write_register(pcr, SD_VP_CTL, PHASE_NOT_RESET, 0); pcr 624 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_write_register(pcr, SD_VP_CTL, PHASE_NOT_RESET, pcr 626 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_write_register(pcr, CLK_CTL, CHANGE_CLK, 0); pcr 627 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_write_register(pcr, SD_CFG1, SD_ASYNC_FIFO_NOT_RST, 0); pcr 682 drivers/mmc/host/rtsx_pci_sdmmc.c err = rtsx_pci_read_register(host->pcr, SD_DATA_STATE, &val); pcr 695 drivers/mmc/host/rtsx_pci_sdmmc.c struct rtsx_pcr *pcr = host->pcr; pcr 699 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_write_register(pcr, SD_CFG3, SD_RSP_80CLK_TIMEOUT_EN, pcr 708 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_write_register(pcr, SD_CFG3, pcr 713 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_write_register(pcr, SD_CFG3, SD_RSP_80CLK_TIMEOUT_EN, 0); pcr 790 drivers/mmc/host/rtsx_pci_sdmmc.c struct rtsx_pcr *pcr = host->pcr; pcr 805 drivers/mmc/host/rtsx_pci_sdmmc.c err = rtsx_pci_card_exclusive_check(host->pcr, RTSX_SD_CARD); pcr 811 drivers/mmc/host/rtsx_pci_sdmmc.c mutex_lock(&pcr->pcr_mutex); pcr 813 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_start_run(pcr); pcr 815 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_switch_clock(pcr, host->clock, host->ssc_depth, pcr 817 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_write_register(pcr, CARD_SELECT, 0x07, SD_MOD_SEL); pcr 818 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_write_register(pcr, CARD_SHARE_MODE, pcr 848 drivers/mmc/host/rtsx_pci_sdmmc.c mutex_unlock(&pcr->pcr_mutex); pcr 889 drivers/mmc/host/rtsx_pci_sdmmc.c err = rtsx_pci_write_register(host->pcr, SD_CFG1, pcr 897 drivers/mmc/host/rtsx_pci_sdmmc.c struct rtsx_pcr *pcr = host->pcr; pcr 903 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_init_cmd(pcr); pcr 904 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_SELECT, 0x07, SD_MOD_SEL); pcr 905 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_SHARE_MODE, pcr 907 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_CLK_EN, pcr 909 drivers/mmc/host/rtsx_pci_sdmmc.c err = rtsx_pci_send_cmd(pcr, 100); pcr 913 drivers/mmc/host/rtsx_pci_sdmmc.c err = rtsx_pci_card_pull_ctl_enable(pcr, RTSX_SD_CARD); pcr 917 drivers/mmc/host/rtsx_pci_sdmmc.c err = rtsx_pci_card_power_on(pcr, RTSX_SD_CARD); pcr 921 drivers/mmc/host/rtsx_pci_sdmmc.c err = rtsx_pci_write_register(pcr, CARD_OE, SD_OUTPUT_EN, SD_OUTPUT_EN); pcr 931 drivers/mmc/host/rtsx_pci_sdmmc.c struct rtsx_pcr *pcr = host->pcr; pcr 936 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_init_cmd(pcr); pcr 938 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_CLK_EN, SD_CLK_EN, 0); pcr 939 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_OE, SD_OUTPUT_EN, 0); pcr 941 drivers/mmc/host/rtsx_pci_sdmmc.c err = rtsx_pci_send_cmd(pcr, 100); pcr 945 drivers/mmc/host/rtsx_pci_sdmmc.c err = rtsx_pci_card_power_off(pcr, RTSX_SD_CARD); pcr 949 drivers/mmc/host/rtsx_pci_sdmmc.c return rtsx_pci_card_pull_ctl_disable(pcr, RTSX_SD_CARD); pcr 967 drivers/mmc/host/rtsx_pci_sdmmc.c struct rtsx_pcr *pcr = host->pcr; pcr 970 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_init_cmd(pcr); pcr 975 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_CFG1, pcr 978 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CLK_CTL, pcr 980 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_CLK_SOURCE, 0xFF, pcr 982 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CLK_CTL, CLK_LOW_FREQ, 0); pcr 987 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_CFG1, pcr 990 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CLK_CTL, pcr 992 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_CLK_SOURCE, 0xFF, pcr 994 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CLK_CTL, CLK_LOW_FREQ, 0); pcr 995 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_PUSH_POINT_CTL, pcr 997 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_SAMPLE_POINT_CTL, pcr 1004 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_CFG1, pcr 1006 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CLK_CTL, pcr 1008 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_CLK_SOURCE, 0xFF, pcr 1010 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CLK_CTL, CLK_LOW_FREQ, 0); pcr 1011 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_PUSH_POINT_CTL, pcr 1013 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_SAMPLE_POINT_CTL, pcr 1018 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, pcr 1020 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CLK_CTL, pcr 1022 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_CLK_SOURCE, 0xFF, pcr 1024 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CLK_CTL, CLK_LOW_FREQ, 0); pcr 1025 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, pcr 1027 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_SAMPLE_POINT_CTL, pcr 1032 drivers/mmc/host/rtsx_pci_sdmmc.c err = rtsx_pci_send_cmd(pcr, 100); pcr 1040 drivers/mmc/host/rtsx_pci_sdmmc.c struct rtsx_pcr *pcr = host->pcr; pcr 1045 drivers/mmc/host/rtsx_pci_sdmmc.c if (rtsx_pci_card_exclusive_check(host->pcr, RTSX_SD_CARD)) pcr 1048 drivers/mmc/host/rtsx_pci_sdmmc.c mutex_lock(&pcr->pcr_mutex); pcr 1050 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_start_run(pcr); pcr 1079 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_switch_clock(pcr, ios->clock, host->ssc_depth, pcr 1082 drivers/mmc/host/rtsx_pci_sdmmc.c mutex_unlock(&pcr->pcr_mutex); pcr 1088 drivers/mmc/host/rtsx_pci_sdmmc.c struct rtsx_pcr *pcr = host->pcr; pcr 1095 drivers/mmc/host/rtsx_pci_sdmmc.c mutex_lock(&pcr->pcr_mutex); pcr 1097 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_start_run(pcr); pcr 1100 drivers/mmc/host/rtsx_pci_sdmmc.c val = rtsx_pci_readl(pcr, RTSX_BIPR); pcr 1105 drivers/mmc/host/rtsx_pci_sdmmc.c mutex_unlock(&pcr->pcr_mutex); pcr 1113 drivers/mmc/host/rtsx_pci_sdmmc.c struct rtsx_pcr *pcr = host->pcr; pcr 1120 drivers/mmc/host/rtsx_pci_sdmmc.c mutex_lock(&pcr->pcr_mutex); pcr 1122 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_start_run(pcr); pcr 1125 drivers/mmc/host/rtsx_pci_sdmmc.c val = rtsx_pci_card_exist(pcr); pcr 1130 drivers/mmc/host/rtsx_pci_sdmmc.c mutex_unlock(&pcr->pcr_mutex); pcr 1137 drivers/mmc/host/rtsx_pci_sdmmc.c struct rtsx_pcr *pcr = host->pcr; pcr 1151 drivers/mmc/host/rtsx_pci_sdmmc.c err = rtsx_pci_read_register(pcr, SD_BUS_STAT, &stat); pcr 1160 drivers/mmc/host/rtsx_pci_sdmmc.c err = rtsx_pci_write_register(pcr, SD_BUS_STAT, pcr 1170 drivers/mmc/host/rtsx_pci_sdmmc.c struct rtsx_pcr *pcr = host->pcr; pcr 1178 drivers/mmc/host/rtsx_pci_sdmmc.c err = rtsx_pci_write_register(pcr, SD_BUS_STAT, 0xFF, SD_CLK_TOGGLE_EN); pcr 1188 drivers/mmc/host/rtsx_pci_sdmmc.c err = rtsx_pci_read_register(pcr, SD_BUS_STAT, &stat); pcr 1199 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_write_register(pcr, SD_BUS_STAT, pcr 1201 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_write_register(pcr, CARD_CLK_EN, 0xFF, 0); pcr 1211 drivers/mmc/host/rtsx_pci_sdmmc.c struct rtsx_pcr *pcr = host->pcr; pcr 1221 drivers/mmc/host/rtsx_pci_sdmmc.c err = rtsx_pci_card_exclusive_check(host->pcr, RTSX_SD_CARD); pcr 1225 drivers/mmc/host/rtsx_pci_sdmmc.c mutex_lock(&pcr->pcr_mutex); pcr 1227 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_start_run(pcr); pcr 1240 drivers/mmc/host/rtsx_pci_sdmmc.c err = rtsx_pci_switch_output_voltage(pcr, voltage); pcr 1252 drivers/mmc/host/rtsx_pci_sdmmc.c err = rtsx_pci_write_register(pcr, SD_BUS_STAT, pcr 1255 drivers/mmc/host/rtsx_pci_sdmmc.c mutex_unlock(&pcr->pcr_mutex); pcr 1263 drivers/mmc/host/rtsx_pci_sdmmc.c struct rtsx_pcr *pcr = host->pcr; pcr 1269 drivers/mmc/host/rtsx_pci_sdmmc.c err = rtsx_pci_card_exclusive_check(host->pcr, RTSX_SD_CARD); pcr 1273 drivers/mmc/host/rtsx_pci_sdmmc.c mutex_lock(&pcr->pcr_mutex); pcr 1275 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_start_run(pcr); pcr 1280 drivers/mmc/host/rtsx_pci_sdmmc.c err = sd_change_phase(host, SDR104_TX_PHASE(pcr), false); pcr 1284 drivers/mmc/host/rtsx_pci_sdmmc.c err = sd_change_phase(host, SDR50_TX_PHASE(pcr), false); pcr 1288 drivers/mmc/host/rtsx_pci_sdmmc.c err = sd_change_phase(host, DDR50_TX_PHASE(pcr), false); pcr 1303 drivers/mmc/host/rtsx_pci_sdmmc.c err = sd_change_phase(host, DDR50_RX_PHASE(pcr), true); pcr 1306 drivers/mmc/host/rtsx_pci_sdmmc.c mutex_unlock(&pcr->pcr_mutex); pcr 1325 drivers/mmc/host/rtsx_pci_sdmmc.c struct rtsx_pcr *pcr = host->pcr; pcr 1327 drivers/mmc/host/rtsx_pci_sdmmc.c dev_dbg(sdmmc_dev(host), "pcr->extra_caps = 0x%x\n", pcr->extra_caps); pcr 1329 drivers/mmc/host/rtsx_pci_sdmmc.c if (pcr->extra_caps & EXTRA_CAPS_SD_SDR50) pcr 1331 drivers/mmc/host/rtsx_pci_sdmmc.c if (pcr->extra_caps & EXTRA_CAPS_SD_SDR104) pcr 1333 drivers/mmc/host/rtsx_pci_sdmmc.c if (pcr->extra_caps & EXTRA_CAPS_SD_DDR50) pcr 1335 drivers/mmc/host/rtsx_pci_sdmmc.c if (pcr->extra_caps & EXTRA_CAPS_MMC_HSDDR) pcr 1337 drivers/mmc/host/rtsx_pci_sdmmc.c if (pcr->extra_caps & EXTRA_CAPS_MMC_8BIT) pcr 1377 drivers/mmc/host/rtsx_pci_sdmmc.c struct rtsx_pcr *pcr; pcr 1383 drivers/mmc/host/rtsx_pci_sdmmc.c pcr = handle->pcr; pcr 1384 drivers/mmc/host/rtsx_pci_sdmmc.c if (!pcr) pcr 1394 drivers/mmc/host/rtsx_pci_sdmmc.c host->pcr = pcr; pcr 1401 drivers/mmc/host/rtsx_pci_sdmmc.c pcr->slots[RTSX_SD_CARD].p_dev = pdev; pcr 1402 drivers/mmc/host/rtsx_pci_sdmmc.c pcr->slots[RTSX_SD_CARD].card_event = rtsx_pci_sdmmc_card_event; pcr 1416 drivers/mmc/host/rtsx_pci_sdmmc.c struct rtsx_pcr *pcr; pcr 1422 drivers/mmc/host/rtsx_pci_sdmmc.c pcr = host->pcr; pcr 1423 drivers/mmc/host/rtsx_pci_sdmmc.c pcr->slots[RTSX_SD_CARD].p_dev = NULL; pcr 1424 drivers/mmc/host/rtsx_pci_sdmmc.c pcr->slots[RTSX_SD_CARD].card_event = NULL; pcr 1435 drivers/mmc/host/rtsx_pci_sdmmc.c rtsx_pci_complete_unfinished_transfer(pcr); pcr 290 drivers/mtd/nand/raw/stm32_fmc2_nand.c u32 pcr = readl_relaxed(fmc2->io_base + FMC2_PCR); pcr 294 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr &= ~FMC2_PCR_TCLR_MASK; pcr 295 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr |= FMC2_PCR_TCLR(timings->tclr); pcr 296 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr &= ~FMC2_PCR_TAR_MASK; pcr 297 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr |= FMC2_PCR_TAR(timings->tar); pcr 311 drivers/mtd/nand/raw/stm32_fmc2_nand.c writel_relaxed(pcr, fmc2->io_base + FMC2_PCR); pcr 320 drivers/mtd/nand/raw/stm32_fmc2_nand.c u32 pcr = readl_relaxed(fmc2->io_base + FMC2_PCR); pcr 323 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr &= ~FMC2_PCR_ECCALG; pcr 324 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr &= ~FMC2_PCR_BCHECC; pcr 326 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr |= FMC2_PCR_ECCALG; pcr 327 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr |= FMC2_PCR_BCHECC; pcr 329 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr |= FMC2_PCR_ECCALG; pcr 333 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr &= ~FMC2_PCR_PWID_MASK; pcr 335 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr |= FMC2_PCR_PWID(FMC2_PCR_PWID_BUSWIDTH_16); pcr 338 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr &= ~FMC2_PCR_ECCSS_MASK; pcr 339 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr |= FMC2_PCR_ECCSS(FMC2_PCR_ECCSS_512); pcr 341 drivers/mtd/nand/raw/stm32_fmc2_nand.c writel_relaxed(pcr, fmc2->io_base + FMC2_PCR); pcr 413 drivers/mtd/nand/raw/stm32_fmc2_nand.c u32 pcr = readl_relaxed(fmc2->io_base + FMC2_PCR); pcr 415 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr &= ~FMC2_PCR_PWID_MASK; pcr 417 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr |= FMC2_PCR_PWID(FMC2_PCR_PWID_BUSWIDTH_16); pcr 418 drivers/mtd/nand/raw/stm32_fmc2_nand.c writel_relaxed(pcr, fmc2->io_base + FMC2_PCR); pcr 424 drivers/mtd/nand/raw/stm32_fmc2_nand.c u32 pcr = readl(fmc2->io_base + FMC2_PCR); pcr 426 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr &= ~FMC2_PCR_ECCEN; pcr 428 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr |= FMC2_PCR_ECCEN; pcr 429 drivers/mtd/nand/raw/stm32_fmc2_nand.c writel(pcr, fmc2->io_base + FMC2_PCR); pcr 508 drivers/mtd/nand/raw/stm32_fmc2_nand.c u32 pcr = readl_relaxed(fmc2->io_base + FMC2_PCR); pcr 511 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr |= FMC2_PCR_WEN; pcr 513 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr &= ~FMC2_PCR_WEN; pcr 514 drivers/mtd/nand/raw/stm32_fmc2_nand.c writel_relaxed(pcr, fmc2->io_base + FMC2_PCR); pcr 800 drivers/mtd/nand/raw/stm32_fmc2_nand.c u32 pcr = readl_relaxed(fmc2->io_base + FMC2_PCR); pcr 803 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr |= FMC2_PCR_WEN; pcr 805 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr &= ~FMC2_PCR_WEN; pcr 806 drivers/mtd/nand/raw/stm32_fmc2_nand.c writel_relaxed(pcr, fmc2->io_base + FMC2_PCR); pcr 1415 drivers/mtd/nand/raw/stm32_fmc2_nand.c u32 pcr = readl_relaxed(fmc2->io_base + FMC2_PCR); pcr 1422 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr |= FMC2_PCR_PWAITEN; pcr 1423 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr |= FMC2_PCR_PBKEN; pcr 1426 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr &= ~FMC2_PCR_PWID_MASK; pcr 1429 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr &= ~FMC2_PCR_ECCEN; pcr 1432 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr &= ~FMC2_PCR_ECCALG; pcr 1433 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr &= ~FMC2_PCR_BCHECC; pcr 1434 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr &= ~FMC2_PCR_WEN; pcr 1437 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr &= ~FMC2_PCR_ECCSS_MASK; pcr 1438 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr |= FMC2_PCR_ECCSS(FMC2_PCR_ECCSS_2048); pcr 1441 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr &= ~FMC2_PCR_TCLR_MASK; pcr 1442 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr |= FMC2_PCR_TCLR(FMC2_PCR_TCLR_DEFAULT); pcr 1443 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr &= ~FMC2_PCR_TAR_MASK; pcr 1444 drivers/mtd/nand/raw/stm32_fmc2_nand.c pcr |= FMC2_PCR_TAR(FMC2_PCR_TAR_DEFAULT); pcr 1450 drivers/mtd/nand/raw/stm32_fmc2_nand.c writel_relaxed(pcr, fmc2->io_base + FMC2_PCR); pcr 338 drivers/net/wan/n2.c u8 cnt, pcr; pcr 417 drivers/net/wan/n2.c pcr = PCR_ENWIN | PCR_VPM | (USE_BUS16BITS ? PCR_BUS16 : 0); pcr 418 drivers/net/wan/n2.c outb(pcr, io + N2_PCR); pcr 442 drivers/net/wan/n2.c pcr |= PCR_RUNSCA; /* run SCA */ pcr 443 drivers/net/wan/n2.c outb(pcr, io + N2_PCR); pcr 77 drivers/pinctrl/pinctrl-coh901.c u32 pcr; pcr 242 drivers/pinctrl/pinctrl-coh901.c val = readl(U300_PIN_REG(offset, pcr)); pcr 245 drivers/pinctrl/pinctrl-coh901.c writel(val, U300_PIN_REG(offset, pcr)); pcr 259 drivers/pinctrl/pinctrl-coh901.c val = readl(U300_PIN_REG(offset, pcr)); pcr 272 drivers/pinctrl/pinctrl-coh901.c writel(val, U300_PIN_REG(offset, pcr)); pcr 293 drivers/pinctrl/pinctrl-coh901.c drmode = readl(U300_PIN_REG(offset, pcr)); pcr 358 drivers/pinctrl/pinctrl-coh901.c val = readl(U300_PIN_REG(offset, pcr)); pcr 363 drivers/pinctrl/pinctrl-coh901.c writel(val, U300_PIN_REG(offset, pcr)); pcr 366 drivers/pinctrl/pinctrl-coh901.c val = readl(U300_PIN_REG(offset, pcr)); pcr 371 drivers/pinctrl/pinctrl-coh901.c writel(val, U300_PIN_REG(offset, pcr)); pcr 374 drivers/pinctrl/pinctrl-coh901.c val = readl(U300_PIN_REG(offset, pcr)); pcr 379 drivers/pinctrl/pinctrl-coh901.c writel(val, U300_PIN_REG(offset, pcr)); pcr 656 drivers/pinctrl/pinctrl-coh901.c gpio->pcr = U300_GPIO_PXPCR; pcr 804 drivers/scsi/qla2xxx/qla_dbg.c WRT_REG_WORD(®->pcr, 0x2000); pcr 807 drivers/scsi/qla2xxx/qla_dbg.c WRT_REG_WORD(®->pcr, 0x2200); pcr 810 drivers/scsi/qla2xxx/qla_dbg.c WRT_REG_WORD(®->pcr, 0x2400); pcr 813 drivers/scsi/qla2xxx/qla_dbg.c WRT_REG_WORD(®->pcr, 0x2600); pcr 816 drivers/scsi/qla2xxx/qla_dbg.c WRT_REG_WORD(®->pcr, 0x2800); pcr 819 drivers/scsi/qla2xxx/qla_dbg.c WRT_REG_WORD(®->pcr, 0x2A00); pcr 822 drivers/scsi/qla2xxx/qla_dbg.c WRT_REG_WORD(®->pcr, 0x2C00); pcr 825 drivers/scsi/qla2xxx/qla_dbg.c WRT_REG_WORD(®->pcr, 0x2E00); pcr 965 drivers/scsi/qla2xxx/qla_dbg.c WRT_REG_WORD(®->pcr, 0x2000); pcr 968 drivers/scsi/qla2xxx/qla_dbg.c WRT_REG_WORD(®->pcr, 0x2100); pcr 971 drivers/scsi/qla2xxx/qla_dbg.c WRT_REG_WORD(®->pcr, 0x2200); pcr 974 drivers/scsi/qla2xxx/qla_dbg.c WRT_REG_WORD(®->pcr, 0x2300); pcr 977 drivers/scsi/qla2xxx/qla_dbg.c WRT_REG_WORD(®->pcr, 0x2400); pcr 980 drivers/scsi/qla2xxx/qla_dbg.c WRT_REG_WORD(®->pcr, 0x2500); pcr 983 drivers/scsi/qla2xxx/qla_dbg.c WRT_REG_WORD(®->pcr, 0x2600); pcr 986 drivers/scsi/qla2xxx/qla_dbg.c WRT_REG_WORD(®->pcr, 0x2700); pcr 763 drivers/scsi/qla2xxx/qla_def.h uint16_t pcr; /* Processor Control Register. */ pcr 142 drivers/spi/spi-au1550.c u32 pcr; pcr 147 drivers/spi/spi-au1550.c pcr = hw->regs->psc_spipcr; pcr 149 drivers/spi/spi-au1550.c } while (pcr != 0); pcr 996 drivers/tty/serial/sunsab.c writeb(~((1 << 1) | (1 << 2) | (1 << 4)), &up->regs->w.pcr); pcr 37 drivers/tty/serial/sunsab.h u8 pcr; /* Port Configuration Register */ pcr 73 drivers/tty/serial/sunsab.h u8 pcr; pcr 109 drivers/tty/serial/sunsab.h u8 pcr; pcr 163 drivers/video/fbdev/imxfb.c u_int pcr; pcr 358 drivers/video/fbdev/imxfb.c u32 pcr = 0; pcr 394 drivers/video/fbdev/imxfb.c pcr = (unsigned int)tmp; pcr 396 drivers/video/fbdev/imxfb.c if (--pcr > 0x3F) { pcr 397 drivers/video/fbdev/imxfb.c pcr = 0x3F; pcr 399 drivers/video/fbdev/imxfb.c lcd_clk / pcr); pcr 404 drivers/video/fbdev/imxfb.c pcr |= PCR_BPIX_18; pcr 410 drivers/video/fbdev/imxfb.c pcr |= PCR_BPIX_12; pcr 412 drivers/video/fbdev/imxfb.c pcr |= PCR_BPIX_16; pcr 414 drivers/video/fbdev/imxfb.c if (imxfb_mode->pcr & PCR_TFT) pcr 420 drivers/video/fbdev/imxfb.c pcr |= PCR_BPIX_8; pcr 426 drivers/video/fbdev/imxfb.c pcr |= imxfb_mode->pcr & ~(0x3f | (7 << 25)); pcr 428 drivers/video/fbdev/imxfb.c fbi->pcr = pcr; pcr 641 drivers/video/fbdev/imxfb.c writel(fbi->pcr, fbi->regs + LCDC_PCR); pcr 721 drivers/video/fbdev/imxfb.c u32 pcr; pcr 734 drivers/video/fbdev/imxfb.c ret |= of_property_read_u32(np, "fsl,pcr", &pcr); pcr 747 drivers/video/fbdev/imxfb.c imxfb_mode->pcr = pcr; pcr 53 include/linux/platform_data/video-imxfb.h u32 pcr; pcr 89 include/linux/rtsx_pci.h #define rtsx_pci_writel(pcr, reg, value) \ pcr 90 include/linux/rtsx_pci.h iowrite32(value, (pcr)->remap_addr + reg) pcr 91 include/linux/rtsx_pci.h #define rtsx_pci_readl(pcr, reg) \ pcr 92 include/linux/rtsx_pci.h ioread32((pcr)->remap_addr + reg) pcr 93 include/linux/rtsx_pci.h #define rtsx_pci_writew(pcr, reg, value) \ pcr 94 include/linux/rtsx_pci.h iowrite16(value, (pcr)->remap_addr + reg) pcr 95 include/linux/rtsx_pci.h #define rtsx_pci_readw(pcr, reg) \ pcr 96 include/linux/rtsx_pci.h ioread16((pcr)->remap_addr + reg) pcr 97 include/linux/rtsx_pci.h #define rtsx_pci_writeb(pcr, reg, value) \ pcr 98 include/linux/rtsx_pci.h iowrite8(value, (pcr)->remap_addr + reg) pcr 99 include/linux/rtsx_pci.h #define rtsx_pci_readb(pcr, reg) \ pcr 100 include/linux/rtsx_pci.h ioread8((pcr)->remap_addr + reg) pcr 102 include/linux/rtsx_pci.h #define rtsx_pci_read_config_byte(pcr, where, val) \ pcr 103 include/linux/rtsx_pci.h pci_read_config_byte((pcr)->pci, where, val) pcr 105 include/linux/rtsx_pci.h #define rtsx_pci_write_config_byte(pcr, where, val) \ pcr 106 include/linux/rtsx_pci.h pci_write_config_byte((pcr)->pci, where, val) pcr 108 include/linux/rtsx_pci.h #define rtsx_pci_read_config_dword(pcr, where, val) \ pcr 109 include/linux/rtsx_pci.h pci_read_config_dword((pcr)->pci, where, val) pcr 111 include/linux/rtsx_pci.h #define rtsx_pci_write_config_dword(pcr, where, val) \ pcr 112 include/linux/rtsx_pci.h pci_write_config_dword((pcr)->pci, where, val) pcr 1052 include/linux/rtsx_pci.h #define rtsx_pci_init_cmd(pcr) ((pcr)->ci = 0) pcr 1060 include/linux/rtsx_pci.h struct rtsx_pcr *pcr; pcr 1064 include/linux/rtsx_pci.h int (*write_phy)(struct rtsx_pcr *pcr, u8 addr, u16 val); pcr 1065 include/linux/rtsx_pci.h int (*read_phy)(struct rtsx_pcr *pcr, u8 addr, u16 *val); pcr 1066 include/linux/rtsx_pci.h int (*extra_init_hw)(struct rtsx_pcr *pcr); pcr 1067 include/linux/rtsx_pci.h int (*optimize_phy)(struct rtsx_pcr *pcr); pcr 1068 include/linux/rtsx_pci.h int (*turn_on_led)(struct rtsx_pcr *pcr); pcr 1069 include/linux/rtsx_pci.h int (*turn_off_led)(struct rtsx_pcr *pcr); pcr 1070 include/linux/rtsx_pci.h int (*enable_auto_blink)(struct rtsx_pcr *pcr); pcr 1071 include/linux/rtsx_pci.h int (*disable_auto_blink)(struct rtsx_pcr *pcr); pcr 1072 include/linux/rtsx_pci.h int (*card_power_on)(struct rtsx_pcr *pcr, int card); pcr 1073 include/linux/rtsx_pci.h int (*card_power_off)(struct rtsx_pcr *pcr, int card); pcr 1074 include/linux/rtsx_pci.h int (*switch_output_voltage)(struct rtsx_pcr *pcr, pcr 1076 include/linux/rtsx_pci.h unsigned int (*cd_deglitch)(struct rtsx_pcr *pcr); pcr 1078 include/linux/rtsx_pci.h void (*fetch_vendor_settings)(struct rtsx_pcr *pcr); pcr 1079 include/linux/rtsx_pci.h void (*force_power_down)(struct rtsx_pcr *pcr, u8 pm_state); pcr 1080 include/linux/rtsx_pci.h void (*stop_cmd)(struct rtsx_pcr *pcr); pcr 1082 include/linux/rtsx_pci.h void (*set_aspm)(struct rtsx_pcr *pcr, bool enable); pcr 1083 include/linux/rtsx_pci.h int (*set_ltr_latency)(struct rtsx_pcr *pcr, u32 latency); pcr 1084 include/linux/rtsx_pci.h int (*set_l1off_sub)(struct rtsx_pcr *pcr, u8 val); pcr 1085 include/linux/rtsx_pci.h void (*set_l1off_cfg_sub_d0)(struct rtsx_pcr *pcr, int active); pcr 1086 include/linux/rtsx_pci.h void (*full_on)(struct rtsx_pcr *pcr); pcr 1087 include/linux/rtsx_pci.h void (*power_saving)(struct rtsx_pcr *pcr); pcr 1088 include/linux/rtsx_pci.h void (*enable_ocp)(struct rtsx_pcr *pcr); pcr 1089 include/linux/rtsx_pci.h void (*disable_ocp)(struct rtsx_pcr *pcr); pcr 1090 include/linux/rtsx_pci.h void (*init_ocp)(struct rtsx_pcr *pcr); pcr 1091 include/linux/rtsx_pci.h void (*process_ocp)(struct rtsx_pcr *pcr); pcr 1092 include/linux/rtsx_pci.h int (*get_ocpstat)(struct rtsx_pcr *pcr, u8 *val); pcr 1093 include/linux/rtsx_pci.h void (*clear_ocpstat)(struct rtsx_pcr *pcr); pcr 1266 include/linux/rtsx_pci.h #define CHK_PCI_PID(pcr, pid) ((pcr)->pci->device == (pid)) pcr 1267 include/linux/rtsx_pci.h #define PCI_VID(pcr) ((pcr)->pci->vendor) pcr 1268 include/linux/rtsx_pci.h #define PCI_PID(pcr) ((pcr)->pci->device) pcr 1269 include/linux/rtsx_pci.h #define is_version(pcr, pid, ver) \ pcr 1270 include/linux/rtsx_pci.h (CHK_PCI_PID(pcr, pid) && (pcr)->ic_version == (ver)) pcr 1271 include/linux/rtsx_pci.h #define pcr_dbg(pcr, fmt, arg...) \ pcr 1272 include/linux/rtsx_pci.h dev_dbg(&(pcr)->pci->dev, fmt, ##arg) pcr 1277 include/linux/rtsx_pci.h #define SDR104_TX_PHASE(pcr) SDR104_PHASE((pcr)->tx_initial_phase) pcr 1278 include/linux/rtsx_pci.h #define SDR50_TX_PHASE(pcr) SDR50_PHASE((pcr)->tx_initial_phase) pcr 1279 include/linux/rtsx_pci.h #define DDR50_TX_PHASE(pcr) DDR50_PHASE((pcr)->tx_initial_phase) pcr 1280 include/linux/rtsx_pci.h #define SDR104_RX_PHASE(pcr) SDR104_PHASE((pcr)->rx_initial_phase) pcr 1281 include/linux/rtsx_pci.h #define SDR50_RX_PHASE(pcr) SDR50_PHASE((pcr)->rx_initial_phase) pcr 1282 include/linux/rtsx_pci.h #define DDR50_RX_PHASE(pcr) DDR50_PHASE((pcr)->rx_initial_phase) pcr 1286 include/linux/rtsx_pci.h void rtsx_pci_start_run(struct rtsx_pcr *pcr); pcr 1287 include/linux/rtsx_pci.h int rtsx_pci_write_register(struct rtsx_pcr *pcr, u16 addr, u8 mask, u8 data); pcr 1288 include/linux/rtsx_pci.h int rtsx_pci_read_register(struct rtsx_pcr *pcr, u16 addr, u8 *data); pcr 1289 include/linux/rtsx_pci.h int rtsx_pci_write_phy_register(struct rtsx_pcr *pcr, u8 addr, u16 val); pcr 1290 include/linux/rtsx_pci.h int rtsx_pci_read_phy_register(struct rtsx_pcr *pcr, u8 addr, u16 *val); pcr 1291 include/linux/rtsx_pci.h void rtsx_pci_stop_cmd(struct rtsx_pcr *pcr); pcr 1292 include/linux/rtsx_pci.h void rtsx_pci_add_cmd(struct rtsx_pcr *pcr, pcr 1294 include/linux/rtsx_pci.h void rtsx_pci_send_cmd_no_wait(struct rtsx_pcr *pcr); pcr 1295 include/linux/rtsx_pci.h int rtsx_pci_send_cmd(struct rtsx_pcr *pcr, int timeout); pcr 1296 include/linux/rtsx_pci.h int rtsx_pci_transfer_data(struct rtsx_pcr *pcr, struct scatterlist *sglist, pcr 1298 include/linux/rtsx_pci.h int rtsx_pci_dma_map_sg(struct rtsx_pcr *pcr, struct scatterlist *sglist, pcr 1300 include/linux/rtsx_pci.h void rtsx_pci_dma_unmap_sg(struct rtsx_pcr *pcr, struct scatterlist *sglist, pcr 1302 include/linux/rtsx_pci.h int rtsx_pci_dma_transfer(struct rtsx_pcr *pcr, struct scatterlist *sglist, pcr 1304 include/linux/rtsx_pci.h int rtsx_pci_read_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len); pcr 1305 include/linux/rtsx_pci.h int rtsx_pci_write_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len); pcr 1306 include/linux/rtsx_pci.h int rtsx_pci_card_pull_ctl_enable(struct rtsx_pcr *pcr, int card); pcr 1307 include/linux/rtsx_pci.h int rtsx_pci_card_pull_ctl_disable(struct rtsx_pcr *pcr, int card); pcr 1308 include/linux/rtsx_pci.h int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock, pcr 1310 include/linux/rtsx_pci.h int rtsx_pci_card_power_on(struct rtsx_pcr *pcr, int card); pcr 1311 include/linux/rtsx_pci.h int rtsx_pci_card_power_off(struct rtsx_pcr *pcr, int card); pcr 1312 include/linux/rtsx_pci.h int rtsx_pci_card_exclusive_check(struct rtsx_pcr *pcr, int card); pcr 1313 include/linux/rtsx_pci.h int rtsx_pci_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage); pcr 1314 include/linux/rtsx_pci.h unsigned int rtsx_pci_card_exist(struct rtsx_pcr *pcr); pcr 1315 include/linux/rtsx_pci.h void rtsx_pci_complete_unfinished_transfer(struct rtsx_pcr *pcr); pcr 1317 include/linux/rtsx_pci.h static inline u8 *rtsx_pci_get_cmd_data(struct rtsx_pcr *pcr) pcr 1319 include/linux/rtsx_pci.h return (u8 *)(pcr->host_cmds_ptr); pcr 1322 include/linux/rtsx_pci.h static inline int rtsx_pci_update_cfg_byte(struct rtsx_pcr *pcr, int addr, pcr 1328 include/linux/rtsx_pci.h err = pci_read_config_byte(pcr->pci, addr, &val); pcr 1331 include/linux/rtsx_pci.h return pci_write_config_byte(pcr->pci, addr, (val & mask) | append); pcr 1334 include/linux/rtsx_pci.h static inline void rtsx_pci_write_be32(struct rtsx_pcr *pcr, u16 reg, u32 val) pcr 1336 include/linux/rtsx_pci.h rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg, 0xFF, val >> 24); pcr 1337 include/linux/rtsx_pci.h rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 1, 0xFF, val >> 16); pcr 1338 include/linux/rtsx_pci.h rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 2, 0xFF, val >> 8); pcr 1339 include/linux/rtsx_pci.h rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 3, 0xFF, val); pcr 1342 include/linux/rtsx_pci.h static inline int rtsx_pci_update_phy(struct rtsx_pcr *pcr, u8 addr, pcr 1348 include/linux/rtsx_pci.h err = rtsx_pci_read_phy_register(pcr, addr, &val); pcr 1352 include/linux/rtsx_pci.h return rtsx_pci_write_phy_register(pcr, addr, (val & mask) | append); pcr 139 include/uapi/linux/atm.h int pcr; /* desired PCR in cells per second */ pcr 52 include/uapi/linux/atmsvc.h #define SELECT_TOP_PCR(tp) ((tp).pcr ? (tp).pcr : \ pcr 78 net/atm/atm_misc.c if (tp->pcr && tp->pcr != ATM_MAX_PCR) pcr 79 net/atm/atm_misc.c return -tp->pcr; pcr 80 net/atm/atm_misc.c if (tp->min_pcr && !tp->pcr) pcr 715 net/atm/common.c if (tp->traffic_class != ATM_UBR && !tp->min_pcr && !tp->pcr && pcr 257 net/atm/mpc.c qos->qos.txtp.pcr, pcr 262 net/atm/mpc.c qos->qos.rxtp.pcr, pcr 269 net/atm/svc.c vcc->qos.txtp.pcr = 0; pcr 94 security/integrity/ima/ima.h int pcr; pcr 209 security/integrity/ima/ima.h int mask, enum ima_hooks func, int *pcr, pcr 218 security/integrity/ima/ima.h int xattr_len, const struct modsig *modsig, int pcr, pcr 227 security/integrity/ima/ima.h const unsigned char *filename, int pcr); pcr 233 security/integrity/ima/ima.h enum ima_hooks func, int mask, int flags, int *pcr, pcr 93 security/integrity/ima/ima_api.c const unsigned char *filename, int pcr) pcr 120 security/integrity/ima/ima_api.c entry->pcr = pcr; pcr 185 security/integrity/ima/ima_api.c int mask, enum ima_hooks func, int *pcr, pcr 192 security/integrity/ima/ima_api.c return ima_match_policy(inode, cred, secid, func, mask, flags, pcr, pcr 296 security/integrity/ima/ima_api.c int xattr_len, const struct modsig *modsig, int pcr, pcr 318 security/integrity/ima/ima_api.c if (iint->measured_pcrs & (0x1 << pcr) && !modsig) pcr 328 security/integrity/ima/ima_api.c result = ima_store_template(entry, violation, inode, filename, pcr); pcr 331 security/integrity/ima/ima_api.c iint->measured_pcrs |= (0x1 << pcr); pcr 134 security/integrity/ima/ima_fs.c u32 pcr, namelen, template_data_len; /* temporary fields */ pcr 151 security/integrity/ima/ima_fs.c pcr = !ima_canonical_fmt ? e->pcr : cpu_to_le32(e->pcr); pcr 152 security/integrity/ima/ima_fs.c ima_putc(m, &pcr, sizeof(e->pcr)); pcr 235 security/integrity/ima/ima_fs.c seq_printf(m, "%2d ", e->pcr); pcr 203 security/integrity/ima/ima_main.c int pcr = CONFIG_IMA_MEASURE_PCR_IDX; pcr 217 security/integrity/ima/ima_main.c action = ima_get_action(inode, cred, secid, mask, func, &pcr, pcr 279 security/integrity/ima/ima_main.c if ((action & IMA_MEASURE) && (iint->measured_pcrs & (0x1 << pcr))) pcr 335 security/integrity/ima/ima_main.c xattr_value, xattr_len, modsig, pcr, pcr 651 security/integrity/ima/ima_main.c int pcr = CONFIG_IMA_MEASURE_PCR_IDX; pcr 654 security/integrity/ima/ima_main.c action = ima_get_action(NULL, cred, secid, 0, KEXEC_CMDLINE, &pcr, pcr 671 security/integrity/ima/ima_main.c ret = ima_store_template(entry, violation, NULL, buf, pcr); pcr 75 security/integrity/ima/ima_policy.c int pcr; pcr 493 security/integrity/ima/ima_policy.c enum ima_hooks func, int mask, int flags, int *pcr, pcr 527 security/integrity/ima/ima_policy.c if ((pcr) && (entry->flags & IMA_PCR)) pcr 528 security/integrity/ima/ima_policy.c *pcr = entry->pcr; pcr 1193 security/integrity/ima/ima_policy.c result = kstrtoint(args[0].from, 10, &entry->pcr); pcr 1194 security/integrity/ima/ima_policy.c if (result || INVALID_PCR(entry->pcr)) pcr 1430 security/integrity/ima/ima_policy.c snprintf(tbuf, sizeof(tbuf), "%d", entry->pcr); pcr 51 security/integrity/ima/ima_queue.c int pcr) pcr 61 security/integrity/ima/ima_queue.c if ((rc == 0) && (qe->entry->pcr == pcr)) { pcr 139 security/integrity/ima/ima_queue.c static int ima_pcr_extend(const u8 *hash, int pcr) pcr 150 security/integrity/ima/ima_queue.c result = tpm_pcr_extend(ima_tpm_chip, pcr, digests); pcr 177 security/integrity/ima/ima_queue.c if (ima_lookup_digest_entry(digest, entry->pcr)) { pcr 194 security/integrity/ima/ima_queue.c tpmresult = ima_pcr_extend(digest, entry->pcr); pcr 452 security/integrity/ima/ima_template.c entry->pcr = !ima_canonical_fmt ? *(hdr[HDR_PCR].data) : pcr 75 sound/firewire/cmp.c int (*check)(struct cmp_connection *c, __be32 pcr), pcr 162 sound/firewire/cmp.c __be32 pcr; pcr 167 sound/firewire/cmp.c pcr_address(c), &pcr, 4, 0); pcr 169 sound/firewire/cmp.c *used = !!(pcr & cpu_to_be32(PCR_BCAST_CONN | pcr 278 sound/firewire/cmp.c static int pcr_set_check(struct cmp_connection *c, __be32 pcr) pcr 280 sound/firewire/cmp.c if (pcr & cpu_to_be32(PCR_BCAST_CONN | pcr 285 sound/firewire/cmp.c if (!(pcr & cpu_to_be32(PCR_ONLINE))) { pcr 384 sound/firewire/cmp.c static __be32 pcr_break_modify(struct cmp_connection *c, __be32 pcr) pcr 386 sound/firewire/cmp.c return pcr & ~cpu_to_be32(PCR_BCAST_CONN | PCR_P2P_CONN_MASK); pcr 197 sound/soc/fsl/imx-audmux.c int imx_audmux_v1_configure_port(unsigned int port, unsigned int pcr) pcr 208 sound/soc/fsl/imx-audmux.c writel(pcr, audmux_base + port_mapping[port]); pcr 250 sound/soc/fsl/imx-audmux.c unsigned int pcr = 0; pcr 276 sound/soc/fsl/imx-audmux.c pcr |= val; pcr 294 sound/soc/fsl/imx-audmux.c imx_audmux_v1_configure_port(port, pcr); pcr 7 sound/soc/fsl/imx-audmux.h int imx_audmux_v1_configure_port(unsigned int port, unsigned int pcr); pcr 136 sound/soc/ti/davinci-i2s.c u32 pcr; pcr 183 sound/soc/ti/davinci-i2s.c davinci_mcbsp_write_reg(dev, DAVINCI_MCBSP_PCR_REG, dev->pcr ^ m); pcr 184 sound/soc/ti/davinci-i2s.c davinci_mcbsp_write_reg(dev, DAVINCI_MCBSP_PCR_REG, dev->pcr); pcr 198 sound/soc/ti/davinci-i2s.c if (dev->pcr & (DAVINCI_MCBSP_PCR_FSXM | DAVINCI_MCBSP_PCR_FSRM)) { pcr 223 sound/soc/ti/davinci-i2s.c unsigned int pcr; pcr 236 sound/soc/ti/davinci-i2s.c pcr = DAVINCI_MCBSP_PCR_FSXM | pcr 242 sound/soc/ti/davinci-i2s.c pcr = DAVINCI_MCBSP_PCR_FSRM | DAVINCI_MCBSP_PCR_FSXM; pcr 251 sound/soc/ti/davinci-i2s.c pcr |= DAVINCI_MCBSP_PCR_CLKXM | pcr 255 sound/soc/ti/davinci-i2s.c pcr |= DAVINCI_MCBSP_PCR_SCLKME; pcr 265 sound/soc/ti/davinci-i2s.c pcr = 0; pcr 315 sound/soc/ti/davinci-i2s.c pcr |= (DAVINCI_MCBSP_PCR_CLKXP | DAVINCI_MCBSP_PCR_CLKRP); pcr 327 sound/soc/ti/davinci-i2s.c pcr |= (DAVINCI_MCBSP_PCR_FSXP | DAVINCI_MCBSP_PCR_FSRP); pcr 339 sound/soc/ti/davinci-i2s.c pcr |= (DAVINCI_MCBSP_PCR_CLKXP | DAVINCI_MCBSP_PCR_CLKRP | pcr 357 sound/soc/ti/davinci-i2s.c pcr ^= (DAVINCI_MCBSP_PCR_FSXP | DAVINCI_MCBSP_PCR_FSRP); pcr 359 sound/soc/ti/davinci-i2s.c dev->pcr = pcr; pcr 360 sound/soc/ti/davinci-i2s.c davinci_mcbsp_write_reg(dev, DAVINCI_MCBSP_PCR_REG, pcr); pcr 542 sound/soc/ti/davinci-i2s.c if (dev->pcr & (DAVINCI_MCBSP_PCR_FSXM | DAVINCI_MCBSP_PCR_FSRM |