mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
tpm: Allow tpm_tis drivers to set hwrng quality.
Adds plumbing required for drivers based on tpm_tis to set hwrng quality. Signed-off-by: Louis Collard <louiscollard@chromium.org> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
This commit is contained in:
parent
36a11029b0
commit
7a64c5597a
2 changed files with 3 additions and 0 deletions
|
@ -875,6 +875,8 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
|
||||||
chip->acpi_dev_handle = acpi_dev_handle;
|
chip->acpi_dev_handle = acpi_dev_handle;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
chip->hwrng.quality = priv->rng_quality;
|
||||||
|
|
||||||
/* Maximum timeouts */
|
/* Maximum timeouts */
|
||||||
chip->timeout_a = msecs_to_jiffies(TIS_TIMEOUT_A_MAX);
|
chip->timeout_a = msecs_to_jiffies(TIS_TIMEOUT_A_MAX);
|
||||||
chip->timeout_b = msecs_to_jiffies(TIS_TIMEOUT_B_MAX);
|
chip->timeout_b = msecs_to_jiffies(TIS_TIMEOUT_B_MAX);
|
||||||
|
|
|
@ -99,6 +99,7 @@ struct tpm_tis_data {
|
||||||
wait_queue_head_t int_queue;
|
wait_queue_head_t int_queue;
|
||||||
wait_queue_head_t read_queue;
|
wait_queue_head_t read_queue;
|
||||||
const struct tpm_tis_phy_ops *phy_ops;
|
const struct tpm_tis_phy_ops *phy_ops;
|
||||||
|
unsigned short rng_quality;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct tpm_tis_phy_ops {
|
struct tpm_tis_phy_ops {
|
||||||
|
|
Loading…
Add table
Reference in a new issue