Lines Matching defs:cfg
21 const union ufs_crypto_cfg_entry *cfg, int slot)
24 u32 slot_offset = hba->crypto_cfg_register + slot * sizeof(*cfg);
30 err = hba->vops->program_key(hba, cfg, slot);
35 ufshcd_writel(hba, 0, slot_offset + 16 * sizeof(cfg->reg_val[0]));
37 ufshcd_writel(hba, le32_to_cpu(cfg->reg_val[i]),
38 slot_offset + i * sizeof(cfg->reg_val[0]));
41 ufshcd_writel(hba, le32_to_cpu(cfg->reg_val[17]),
42 slot_offset + 17 * sizeof(cfg->reg_val[0]));
44 ufshcd_writel(hba, le32_to_cpu(cfg->reg_val[16]),
45 slot_offset + 16 * sizeof(cfg->reg_val[0]));
62 union ufs_crypto_cfg_entry cfg = {};
78 cfg.data_unit_size = data_unit_mask;
79 cfg.crypto_cap_idx = cap_idx;
80 cfg.config_enable = UFS_CRYPTO_CONFIGURATION_ENABLE;
84 memcpy(cfg.crypto_key, key->raw, key->size/2);
85 memcpy(cfg.crypto_key + UFS_CRYPTO_KEY_MAX_SIZE/2,
88 memcpy(cfg.crypto_key, key->raw, key->size);
91 err = ufshcd_program_key(hba, &cfg, slot);
93 memzero_explicit(&cfg, sizeof(cfg));
100 * Clear the crypto cfg on the device. Clearing CFGE
101 * might not be sufficient, so just clear the entire cfg.
103 union ufs_crypto_cfg_entry cfg = {};
105 return ufshcd_program_key(hba, &cfg, slot);