| /linux/drivers/misc/cardreader/ | 
| H A D | rtsx_pcr.c | 64 static int rtsx_comm_set_ltr_latency(struct rtsx_pcr *pcr, u32 latency)  in rtsx_comm_set_ltr_latency()  argument66 	rtsx_pci_write_register(pcr, MSGTXDATA0,  in rtsx_comm_set_ltr_latency()
 68 	rtsx_pci_write_register(pcr, MSGTXDATA1,  in rtsx_comm_set_ltr_latency()
 70 	rtsx_pci_write_register(pcr, MSGTXDATA2,  in rtsx_comm_set_ltr_latency()
 72 	rtsx_pci_write_register(pcr, MSGTXDATA3,  in rtsx_comm_set_ltr_latency()
 74 	rtsx_pci_write_register(pcr, LTR_CTL, LTR_TX_EN_MASK |  in rtsx_comm_set_ltr_latency()
 80 int rtsx_set_ltr_latency(struct rtsx_pcr *pcr, u32 latency)  in rtsx_set_ltr_latency()  argument
 82 	return rtsx_comm_set_ltr_latency(pcr, latency);  in rtsx_set_ltr_latency()
 85 static void rtsx_comm_set_aspm(struct rtsx_pcr *pcr, bool enable)  in rtsx_comm_set_aspm()  argument
 87 	if (pcr->aspm_enabled == enable)  in rtsx_comm_set_aspm()
 [all …]
 
 | 
| H A D | rts5260.c | 19 static u8 rts5260_get_ic_version(struct rtsx_pcr *pcr)  in rts5260_get_ic_version()  argument23 	rtsx_pci_read_register(pcr, DUMMY_REG_RESET_0, &val);  in rts5260_get_ic_version()
 27 static void rts5260_fill_driving(struct rtsx_pcr *pcr, u8 voltage)  in rts5260_fill_driving()  argument
 45 		drive_sel = pcr->sd30_drive_sel_3v3;  in rts5260_fill_driving()
 48 		drive_sel = pcr->sd30_drive_sel_1v8;  in rts5260_fill_driving()
 51 	rtsx_pci_write_register(pcr, SD30_CLK_DRIVE_SEL,  in rts5260_fill_driving()
 54 	rtsx_pci_write_register(pcr, SD30_CMD_DRIVE_SEL,  in rts5260_fill_driving()
 57 	rtsx_pci_write_register(pcr, SD30_DAT_DRIVE_SEL,  in rts5260_fill_driving()
 61 static void rtsx_base_fetch_vendor_settings(struct rtsx_pcr *pcr)  in rtsx_base_fetch_vendor_settings()  argument
 63 	struct pci_dev *pdev = pcr->pci;  in rtsx_base_fetch_vendor_settings()
 [all …]
 
 | 
| H A D | rts5261.c | 18 static u8 rts5261_get_ic_version(struct rtsx_pcr *pcr)  in rts5261_get_ic_version()  argument22 	rtsx_pci_read_register(pcr, DUMMY_REG_RESET_0, &val);  in rts5261_get_ic_version()
 26 static void rts5261_fill_driving(struct rtsx_pcr *pcr, u8 voltage)  in rts5261_fill_driving()  argument
 44 		drive_sel = pcr->sd30_drive_sel_3v3;  in rts5261_fill_driving()
 47 		drive_sel = pcr->sd30_drive_sel_1v8;  in rts5261_fill_driving()
 50 	rtsx_pci_write_register(pcr, SD30_CLK_DRIVE_SEL,  in rts5261_fill_driving()
 53 	rtsx_pci_write_register(pcr, SD30_CMD_DRIVE_SEL,  in rts5261_fill_driving()
 56 	rtsx_pci_write_register(pcr, SD30_DAT_DRIVE_SEL,  in rts5261_fill_driving()
 60 static void rts5261_force_power_down(struct rtsx_pcr *pcr, u8 pm_state, bool runtime)  in rts5261_force_power_down()  argument
 63 	rtsx_pci_write_register(pcr, AUTOLOAD_CFG_BASE + 1, MASK_8_BIT_DEF, 0);  in rts5261_force_power_down()
 [all …]
 
 | 
| H A D | rts5229.c | 16 static u8 rts5229_get_ic_version(struct rtsx_pcr *pcr)  in rts5229_get_ic_version()  argument20 	rtsx_pci_read_register(pcr, DUMMY_REG_RESET_0, &val);  in rts5229_get_ic_version()
 24 static void rts5229_fetch_vendor_settings(struct rtsx_pcr *pcr)  in rts5229_fetch_vendor_settings()  argument
 26 	struct pci_dev *pdev = pcr->pci;  in rts5229_fetch_vendor_settings()
 30 	pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg);  in rts5229_fetch_vendor_settings()
 35 	pcr->aspm_en = rtsx_reg_to_aspm(reg);  in rts5229_fetch_vendor_settings()
 36 	pcr->sd30_drive_sel_1v8 =  in rts5229_fetch_vendor_settings()
 38 	pcr->card_drive_sel &= 0x3F;  in rts5229_fetch_vendor_settings()
 39 	pcr->card_drive_sel |= rtsx_reg_to_card_drive_sel(reg);  in rts5229_fetch_vendor_settings()
 42 	pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG2, reg);  in rts5229_fetch_vendor_settings()
 [all …]
 
 | 
| H A D | rts5209.c | 16 static u8 rts5209_get_ic_version(struct rtsx_pcr *pcr)  in rts5209_get_ic_version()  argument20 	val = rtsx_pci_readb(pcr, 0x1C);  in rts5209_get_ic_version()
 24 static void rts5209_fetch_vendor_settings(struct rtsx_pcr *pcr)  in rts5209_fetch_vendor_settings()  argument
 26 	struct pci_dev *pdev = pcr->pci;  in rts5209_fetch_vendor_settings()
 30 	pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg);  in rts5209_fetch_vendor_settings()
 34 			pcr->flags |= PCR_MS_PMOS;  in rts5209_fetch_vendor_settings()
 35 		pcr->aspm_en = rts5209_reg_to_aspm(reg);  in rts5209_fetch_vendor_settings()
 39 	pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG2, reg);  in rts5209_fetch_vendor_settings()
 42 		pcr->sd30_drive_sel_1v8 =  in rts5209_fetch_vendor_settings()
 44 		pcr->sd30_drive_sel_3v3 =  in rts5209_fetch_vendor_settings()
 [all …]
 
 | 
| H A D | rtl8411.c | 18 static u8 rtl8411_get_ic_version(struct rtsx_pcr *pcr)  in rtl8411_get_ic_version()  argument22 	rtsx_pci_read_register(pcr, SYS_VER, &val);  in rtl8411_get_ic_version()
 26 static int rtl8411b_is_qfn48(struct rtsx_pcr *pcr)  in rtl8411b_is_qfn48()  argument
 30 	rtsx_pci_read_register(pcr, RTL8411B_PACKAGE_MODE, &val);  in rtl8411b_is_qfn48()
 38 static void rtl8411_fetch_vendor_settings(struct rtsx_pcr *pcr)  in rtl8411_fetch_vendor_settings()  argument
 40 	struct pci_dev *pdev = pcr->pci;  in rtl8411_fetch_vendor_settings()
 45 	pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg1);  in rtl8411_fetch_vendor_settings()
 50 	pcr->aspm_en = rtsx_reg_to_aspm(reg1);  in rtl8411_fetch_vendor_settings()
 51 	pcr->sd30_drive_sel_1v8 =  in rtl8411_fetch_vendor_settings()
 53 	pcr->card_drive_sel &= 0x3F;  in rtl8411_fetch_vendor_settings()
 [all …]
 
 | 
| /linux/drivers/mmc/host/ | 
| H A D | rtsx_pci_sdmmc.c | 28 	struct rtsx_pcr		*pcr;  member58 	rtsx_pci_write_register(host->pcr, CARD_STOP,  in sd_clear_error()
 75 			rtsx_pci_read_register(host->pcr, start + i + j,  in dump_reg_range()
 93 	return rtsx_pci_readl(host->pcr, RTSX_BIPR) & SD_EXIST;  in sd_get_cd_int()
 96 static void sd_cmd_set_sd_cmd(struct rtsx_pcr *pcr, struct mmc_command *cmd)  in sd_cmd_set_sd_cmd()  argument
 98 	rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_CMD0, 0xFF,  in sd_cmd_set_sd_cmd()
 100 	rtsx_pci_write_be32(pcr, SD_CMD1, cmd->arg);  in sd_cmd_set_sd_cmd()
 103 static void sd_cmd_set_data_len(struct rtsx_pcr *pcr, u16 blocks, u16 blksz)  in sd_cmd_set_data_len()  argument
 105 	rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_BLOCK_CNT_L, 0xFF, blocks);  in sd_cmd_set_data_len()
 106 	rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_BLOCK_CNT_H, 0xFF, blocks >> 8);  in sd_cmd_set_data_len()
 [all …]
 
 | 
| /linux/drivers/tty/serial/8250/ | 
| H A D | 8250_ni.c | 49 /* PCR - Port Control Register */83 	u8 pcr;  in ni16550_enable_transceivers()  local
 85 	pcr = port->serial_in(port, NI16550_PCR_OFFSET);  in ni16550_enable_transceivers()
 86 	pcr |= NI16550_PCR_TXVR_ENABLE_BIT;  in ni16550_enable_transceivers()
 87 	dev_dbg(port->dev, "enable transceivers: write pcr: 0x%02x\n", pcr);  in ni16550_enable_transceivers()
 88 	port->serial_out(port, NI16550_PCR_OFFSET, pcr);  in ni16550_enable_transceivers()
 95 	u8 pcr;  in ni16550_disable_transceivers()  local
 97 	pcr = serial_port_in(port, NI16550_PCR_OFFSET);  in ni16550_disable_transceivers()
 98 	pcr &= ~NI16550_PCR_TXVR_ENABLE_BIT;  in ni16550_disable_transceivers()
 99 	dev_dbg(port->dev, "disable transceivers: write pcr: 0x%02x\n", pcr);  in ni16550_disable_transceivers()
 [all …]
 
 | 
| /linux/net/atm/ | 
| H A D | atm_misc.c | 50  * atm_pcr_goal returns the positive PCR if it should be rounded up, the51  * negative PCR if it should be rounded down, and zero if the maximum available
 57  *	min max pcr	result		min max pcr	result
 70  *   if pcr == z then z-
 71  *   else if min == x && pcr == - then x+
 78 	if (tp->pcr && tp->pcr != ATM_MAX_PCR)  in atm_pcr_goal()
 79 		return -tp->pcr;  in atm_pcr_goal()
 80 	if (tp->min_pcr && !tp->pcr)  in atm_pcr_goal()
 
 | 
| /linux/drivers/media/test-drivers/vidtv/ | 
| H A D | vidtv_ts.c | 20 static u32 vidtv_ts_write_pcr_bits(u8 *to, u32 to_offset, u64 pcr)  in vidtv_ts_write_pcr_bits()  argument22 	/* Exact same from ffmpeg. PCR is a counter driven by a 27Mhz clock */  in vidtv_ts_write_pcr_bits()
 29 	div = div64_u64_rem(pcr, 300, &rem);  in vidtv_ts_write_pcr_bits()
 31 	pcr_low = rem; /* pcr_low = pcr % 300 */  in vidtv_ts_write_pcr_bits()
 32 	pcr_high = div; /* pcr_high = pcr / 300 */  in vidtv_ts_write_pcr_bits()
 102 	ts_adap.PCR    = 1;  in vidtv_ts_pcr_write_into()
 118 	/* write the PCR optional */  in vidtv_ts_pcr_write_into()
 121 					  args.pcr);  in vidtv_ts_pcr_write_into()
 
 | 
| H A D | vidtv_pes.c | 183 static u32 vidtv_pes_write_pcr_bits(u8 *to, u32 to_offset, u64 pcr)  in vidtv_pes_write_pcr_bits()  argument185 	/* Exact same from ffmpeg. PCR is a counter driven by a 27Mhz clock */  in vidtv_pes_write_pcr_bits()
 192 	div = div64_u64_rem(pcr, 300, &rem);  in vidtv_pes_write_pcr_bits()
 194 	pcr_low = rem; /* pcr_low = pcr % 300 */  in vidtv_pes_write_pcr_bits()
 195 	pcr_high = div; /* pcr_high = pcr / 300 */  in vidtv_pes_write_pcr_bits()
 222 		ts_adap.PCR = 1;  in vidtv_pes_write_stuffing()
 243 	/* write the optional PCR */  in vidtv_pes_write_stuffing()
 247 						   args->pcr);  in vidtv_pes_write_stuffing()
 249 		*last_pcr = args->pcr;  in vidtv_pes_write_stuffing()
 311 		.pcr			= args->pcr,  in vidtv_pes_write_into()
 [all …]
 
 | 
| H A D | vidtv_ts.h | 30 		u8 PCR:1;  member53  * @pid: The TS PID for the PCR packets.
 56  * @pcr: A sample from the system clock.
 64 	u64 pcr;  member
 96  * vidtv_ts_pcr_write_into - Write a PCR  packet into a buffer.
 99  * This function will write a PCR packet into a buffer. This is used to
 
 | 
| H A D | vidtv_mux.h | 29  * This is used to decide when PCR or PSI packets should be sent. This will also30  * provide storage for the clock, which is used to compute the value for the PCR.
 35  * @clk: A 27Mhz clock from which we will drive the PCR. Updated proportionally
 37  * @pcr_period_usecs: How often we should send PCR packets.
 102  * @num_streamed_pcr: Number of PCR packets streamed.
 107  * same PCR.
 150  * @pcr_period_usecs: How often we should send PCR packets.
 153  * same PCR.
 
 | 
| /linux/Documentation/security/tpm/ | 
| H A D | tpm_event_log.rst | 14 time something gets hashed by it to any of the PCR registers. The events15 are segregated by their type and contain the value of the hashed PCR
 24 to a challenger. However, PCR contents are difficult to interpret;
 25 therefore, attestation is typically more useful when the PCR contents
 27 the measurement log contains a richer set of information than do the PCR
 28 contents. The PCR contents are used to provide the validation of the
 
 | 
| /linux/Documentation/ABI/stable/ | 
| H A D | sysfs-class-tpm | 97 		  PCR-00: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 7598 		  PCR-01: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75
 99 		  PCR-02: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75
 100 		  PCR-03: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75
 101 		  PCR-04: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75
 104 		The number of PCRs and hex bytes needed to represent a PCR
 198 What:		/sys/class/tpm/tpmX/pcr-<H>/<N>
 202 Description:	produces output in compact hex representation for PCR
 204 		the PCR number and H is the crypto string
 209 		  cat /sys/class/tpm/tpm0/pcr-sha256/7
 
 | 
| /linux/drivers/video/fbdev/ | 
| H A D | imxfb.c | 44 	u32 pcr;  member181 	u_int			pcr;  member
 377 	u32 pcr = 0;  in imxfb_check_var()  local
 413 	pcr = (unsigned int)tmp;  in imxfb_check_var()
 415 	if (--pcr > PCR_PCD_MASK) {  in imxfb_check_var()
 416 		pcr = PCR_PCD_MASK;  in imxfb_check_var()
 418 			 lcd_clk / pcr);  in imxfb_check_var()
 423 		pcr |= FIELD_PREP(PCR_BPIX_MASK, PCR_BPIX_18);  in imxfb_check_var()
 429 			pcr |= FIELD_PREP(PCR_BPIX_MASK, PCR_BPIX_12);  in imxfb_check_var()
 431 			pcr |= FIELD_PREP(PCR_BPIX_MASK, PCR_BPIX_16);  in imxfb_check_var()
 [all …]
 
 | 
| /linux/arch/sparc/include/uapi/asm/ | 
| H A D | perfctr.h | 28 	 * the initial PCR register value to use.32 	/* Disable UltraSparc performance counters.  The PCR is written
 34 	 * working PCR register value are forgotten.
 46 	/* Begin using a new PCR value, the pointer to which is passed
 47 	 * in ARG0.  The PIC is also cleared after the new PCR value is
 52 	/* Store in pointer given in ARG0 the current PCR register value
 
 | 
| /linux/drivers/char/tpm/ | 
| H A D | tpm-interface.c | 34  * recently changed pcr on suspend, so force the flush35  * with an extend to the selected _unused_ non-volatile pcr.
 40 		 "PCR to use for dummy writes to facilitate flush on suspend.");
 329  * tpm_pcr_read - read a PCR value from SHA1 bank
 331  * @pcr_idx:	the PCR to be retrieved
 332  * @digest:	the PCR bank and buffer current PCR value is written to
 356  * tpm_pcr_extend - extend a PCR value in SHA1 bank.
 358  * @pcr_idx:	the PCR to be retrieved
 361  * Note: callers must pass a digest for every allocated PCR bank, in the same
 389 			     "attempting extend a PCR value");  in tpm_pcr_extend()
 
 | 
| H A D | tpm-sysfs.c | 107 		str += sprintf(str, "PCR-%02d: ", i);  in pcrs_show()360 	int pcr;  member
 386 	rc = tpm_pcr_read(chip, ha->pcr, &digest);  in pcr_value_show()
 399  * The only slight problem with this approach is that every PCR is
 400  * hard coded to be present, so you don't know if an PCR is missing
 439 		.pcr = _pcr,					   \
 464 		.name = "pcr-" __stringify(_hash),	    \
 474  * PCR value files for each supported hash algorithm
 485  * pcr-<hash>, so it must not clash with any other names already
 
 | 
| H A D | tpm2-cmd.c | 94  * tpm2_pcr_read() - read a PCR value96  * @pcr_idx:	index of the PCR to read.
 97  * @digest:	PCR bank and buffer current PCR value is written to.
 139 	rc = tpm_transmit_cmd(chip, &buf, 0, "attempting to read a pcr value");  in tpm2_pcr_read()
 161  * tpm2_pcr_extend() - extend a PCR value
 164  * @pcr_idx:	index of the PCR.
 165  * @digests:	list of pcr banks and corresponding digest values to extend.
 207 	rc = tpm_transmit_cmd(chip, &buf, 0, "attempting extend a PCR value");  in tpm2_pcr_extend()
 487 	 * Avoid unnecessary PCR read operations to reduce overhead  in tpm2_init_bank_info()
 535 	rc = tpm_transmit_cmd(chip, &buf, 9, "get tpm pcr allocation");  in tpm2_get_pcr_allocation()
 
 | 
| /linux/security/integrity/ima/ | 
| H A D | ima_fs.c | 120  *       32bit-le=pcr#133 	u32 pcr, namelen, template_data_len; /* temporary fields */  in ima_measurements_show()  local
 156 	 * PCR used defaults to the same (config option) in  in ima_measurements_show()
 159 	pcr = !ima_canonical_fmt ? e->pcr : (__force u32)cpu_to_le32(e->pcr);  in ima_measurements_show()
 160 	ima_putc(m, &pcr, sizeof(e->pcr));  in ima_measurements_show()
 251 	/* 1st: PCR used (config option) */  in ima_ascii_measurements_show()
 252 	seq_printf(m, "%2d ", e->pcr);  in ima_ascii_measurements_show()
 
 | 
| H A D | ima_main.c | 130  * Only invalidate the PCR for measured files: in ima_rdwr_violation_check() 248 	int pcr = CONFIG_IMA_MEASURE_PCR_IDX; in process_measurement()
 264 				mask, func, &pcr, &template_desc, NULL, in process_measurement()
 355 	/* If target pcr is already measured, unset IMA_MEASURE action */ in process_measurement()
 356 	if ((action & IMA_MEASURE) && (iint->measured_pcrs & (0x1 << pcr))) in process_measurement()
 414 				      xattr_value, xattr_len, modsig, pcr, in process_measurement()
 417 		rc = ima_check_blacklist(iint, modsig, pcr); in process_measurement()
 527 	int pcr; in ima_file_mprotect()
 538 				&pcr, &template, NULL, NULL); in ima_file_mprotect()
 541 				 MMAP_CHECK_REQPROT, &pcr,
 228 int pcr = CONFIG_IMA_MEASURE_PCR_IDX; process_measurement()  local
 507 int pcr; ima_file_mprotect()  local
 992 process_buffer_measurement(struct mnt_idmap * idmap,struct inode * inode,const void * buf,int size,const char * eventname,enum ima_hooks func,int pcr,const char * func_data,bool buf_hash,u8 * digest,size_t digest_len) process_buffer_measurement()  argument
 [all...]
 | 
| H A D | ima.h | 107 	int pcr;  member 384 		   enum ima_hooks func, int *pcr,
 394 			   int xattr_len, const struct modsig *modsig, int pcr,
 399 			       int pcr, const char *func_data,
 408 		       const unsigned char *filename, int pcr);
 415 		     enum ima_hooks func, int mask, int flags, int *pcr,
 440 			const struct modsig *modsig, int pcr);
 458 				      const struct modsig *modsig, int pcr) in ima_appraise_measurement()
 452 ima_check_blacklist(struct ima_iint_cache * iint,const struct modsig * modsig,int pcr) ima_check_blacklist()  argument
 
 | 
| /linux/include/uapi/linux/ | 
| H A D | atmsvc.h | 47  * what PCR is used to request bandwidth from the device driver. net/atm/svc.c52 #define SELECT_TOP_PCR(tp) ((tp).pcr ? (tp).pcr : \
 
 | 
| /linux/drivers/mtd/nand/raw/ | 
| H A D | stm32_fmc2_nand.c | 324 	u32 pcr = 0, pcr_mask;  in stm32_fmc2_nfc_setup()  local330 		pcr |= FMC2_PCR_ECCALG;  in stm32_fmc2_nfc_setup()
 331 		pcr |= FMC2_PCR_BCHECC;  in stm32_fmc2_nfc_setup()
 333 		pcr |= FMC2_PCR_ECCALG;  in stm32_fmc2_nfc_setup()
 339 		pcr |= FIELD_PREP(FMC2_PCR_PWID, FMC2_PCR_PWID_BUSWIDTH_16);  in stm32_fmc2_nfc_setup()
 343 	pcr |= FIELD_PREP(FMC2_PCR_ECCSS, FMC2_PCR_ECCSS_512);  in stm32_fmc2_nfc_setup()
 345 	regmap_update_bits(nfc->regmap, FMC2_PCR, pcr_mask, pcr);  in stm32_fmc2_nfc_setup()
 417 	u32 pcr;  in stm32_fmc2_nfc_set_buswidth_16()  local
 419 	pcr = set ? FIELD_PREP(FMC2_PCR_PWID, FMC2_PCR_PWID_BUSWIDTH_16) :  in stm32_fmc2_nfc_set_buswidth_16()
 422 	regmap_update_bits(nfc->regmap, FMC2_PCR, FMC2_PCR_PWID, pcr);  in stm32_fmc2_nfc_set_buswidth_16()
 [all …]
 
 |