aboutsummaryrefslogtreecommitdiff
path: root/drivers/tpm
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tpm')
-rw-r--r--drivers/tpm/cr50_i2c.c8
-rw-r--r--drivers/tpm/tpm-uclass.c2
-rw-r--r--drivers/tpm/tpm2_ftpm_tee.c2
-rw-r--r--drivers/tpm/tpm2_tis_sandbox.c2
-rw-r--r--drivers/tpm/tpm2_tis_spi.c2
-rw-r--r--drivers/tpm/tpm_tis_infineon.c2
-rw-r--r--drivers/tpm/tpm_tis_lpc.c2
-rw-r--r--drivers/tpm/tpm_tis_sandbox.c2
-rw-r--r--drivers/tpm/tpm_tis_st33zp24_i2c.c2
-rw-r--r--drivers/tpm/tpm_tis_st33zp24_spi.c12
10 files changed, 18 insertions, 18 deletions
diff --git a/drivers/tpm/cr50_i2c.c b/drivers/tpm/cr50_i2c.c
index a761e3d52f..ce61b72d22 100644
--- a/drivers/tpm/cr50_i2c.c
+++ b/drivers/tpm/cr50_i2c.c
@@ -547,7 +547,7 @@ static int claim_locality(struct udevice *dev, int loc)
static int cr50_i2c_get_desc(struct udevice *dev, char *buf, int size)
{
- struct dm_i2c_chip *chip = dev_get_parent_platdata(dev);
+ struct dm_i2c_chip *chip = dev_get_parent_plat(dev);
struct cr50_priv *priv = dev_get_priv(dev);
return snprintf(buf, size, "cr50 TPM 2.0 (i2c %02x id %x) irq=%d",
@@ -637,7 +637,7 @@ enum {
LONG_TIMEOUT_MS = 2000,
};
-static int cr50_i2c_ofdata_to_platdata(struct udevice *dev)
+static int cr50_i2c_of_to_plat(struct udevice *dev)
{
struct tpm_chip_priv *upriv = dev_get_uclass_priv(dev);
struct cr50_priv *priv = dev_get_priv(dev);
@@ -725,10 +725,10 @@ U_BOOT_DRIVER(cr50_i2c) = {
.id = UCLASS_TPM,
.of_match = cr50_i2c_ids,
.ops = &cr50_i2c_ops,
- .ofdata_to_platdata = cr50_i2c_ofdata_to_platdata,
+ .of_to_plat = cr50_i2c_of_to_plat,
.probe = cr50_i2c_probe,
.remove = cr50_i2c_cleanup,
- .priv_auto_alloc_size = sizeof(struct cr50_priv),
+ .priv_auto = sizeof(struct cr50_priv),
ACPI_OPS_PTR(&cr50_acpi_ops)
.flags = DM_FLAG_OS_PREPARE,
};
diff --git a/drivers/tpm/tpm-uclass.c b/drivers/tpm/tpm-uclass.c
index 6ea795bc0c..beb0fa3f93 100644
--- a/drivers/tpm/tpm-uclass.c
+++ b/drivers/tpm/tpm-uclass.c
@@ -141,5 +141,5 @@ UCLASS_DRIVER(tpm) = {
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
.post_bind = dm_scan_fdt_dev,
#endif
- .per_device_auto_alloc_size = sizeof(struct tpm_chip_priv),
+ .per_device_auto = sizeof(struct tpm_chip_priv),
};
diff --git a/drivers/tpm/tpm2_ftpm_tee.c b/drivers/tpm/tpm2_ftpm_tee.c
index 3197e0ebcd..53e59f42b4 100644
--- a/drivers/tpm/tpm2_ftpm_tee.c
+++ b/drivers/tpm/tpm2_ftpm_tee.c
@@ -247,5 +247,5 @@ U_BOOT_DRIVER(ftpm_tee) = {
.probe = ftpm_tee_probe,
.remove = ftpm_tee_remove,
.flags = DM_FLAG_OS_PREPARE,
- .priv_auto_alloc_size = sizeof(struct ftpm_tee_private),
+ .priv_auto = sizeof(struct ftpm_tee_private),
};
diff --git a/drivers/tpm/tpm2_tis_sandbox.c b/drivers/tpm/tpm2_tis_sandbox.c
index 41a15bd49f..c74bacfd71 100644
--- a/drivers/tpm/tpm2_tis_sandbox.c
+++ b/drivers/tpm/tpm2_tis_sandbox.c
@@ -625,5 +625,5 @@ U_BOOT_DRIVER(sandbox_tpm2) = {
.of_match = sandbox_tpm2_ids,
.ops = &sandbox_tpm2_ops,
.probe = sandbox_tpm2_probe,
- .priv_auto_alloc_size = sizeof(struct sandbox_tpm2),
+ .priv_auto = sizeof(struct sandbox_tpm2),
};
diff --git a/drivers/tpm/tpm2_tis_spi.c b/drivers/tpm/tpm2_tis_spi.c
index 0045bedf0c..4b33ac8fd3 100644
--- a/drivers/tpm/tpm2_tis_spi.c
+++ b/drivers/tpm/tpm2_tis_spi.c
@@ -686,5 +686,5 @@ U_BOOT_DRIVER(tpm_tis_spi) = {
.ops = &tpm_tis_spi_ops,
.probe = tpm_tis_spi_probe,
.remove = tpm_tis_spi_remove,
- .priv_auto_alloc_size = sizeof(struct tpm_chip),
+ .priv_auto = sizeof(struct tpm_chip),
};
diff --git a/drivers/tpm/tpm_tis_infineon.c b/drivers/tpm/tpm_tis_infineon.c
index f47813e76d..f414e5657d 100644
--- a/drivers/tpm/tpm_tis_infineon.c
+++ b/drivers/tpm/tpm_tis_infineon.c
@@ -633,5 +633,5 @@ U_BOOT_DRIVER(tpm_tis_i2c) = {
.of_match = tpm_tis_i2c_ids,
.ops = &tpm_tis_i2c_ops,
.probe = tpm_tis_i2c_probe,
- .priv_auto_alloc_size = sizeof(struct tpm_chip),
+ .priv_auto = sizeof(struct tpm_chip),
};
diff --git a/drivers/tpm/tpm_tis_lpc.c b/drivers/tpm/tpm_tis_lpc.c
index 2dd374cf77..003c0d8816 100644
--- a/drivers/tpm/tpm_tis_lpc.c
+++ b/drivers/tpm/tpm_tis_lpc.c
@@ -475,5 +475,5 @@ U_BOOT_DRIVER(tpm_tis_lpc) = {
.of_match = tpm_tis_lpc_ids,
.ops = &tpm_tis_lpc_ops,
.probe = tpm_tis_lpc_probe,
- .priv_auto_alloc_size = sizeof(struct tpm_tis_lpc_priv),
+ .priv_auto = sizeof(struct tpm_tis_lpc_priv),
};
diff --git a/drivers/tpm/tpm_tis_sandbox.c b/drivers/tpm/tpm_tis_sandbox.c
index e167d0a2fe..67139cea3b 100644
--- a/drivers/tpm/tpm_tis_sandbox.c
+++ b/drivers/tpm/tpm_tis_sandbox.c
@@ -361,5 +361,5 @@ U_BOOT_DRIVER(google_sandbox_tpm) = {
.of_match = sandbox_tpm_ids,
.ops = &sandbox_tpm_ops,
.probe = sandbox_tpm_probe,
- .priv_auto_alloc_size = sizeof(struct tpm_state),
+ .priv_auto = sizeof(struct tpm_state),
};
diff --git a/drivers/tpm/tpm_tis_st33zp24_i2c.c b/drivers/tpm/tpm_tis_st33zp24_i2c.c
index a253ee1502..e0eeabb933 100644
--- a/drivers/tpm/tpm_tis_st33zp24_i2c.c
+++ b/drivers/tpm/tpm_tis_st33zp24_i2c.c
@@ -542,5 +542,5 @@ U_BOOT_DRIVER(st33zp24_i2c) = {
.probe = st33zp24_i2c_probe,
.remove = st33zp24_i2c_remove,
.ops = &st33zp24_i2c_tpm_ops,
- .priv_auto_alloc_size = sizeof(struct tpm_chip),
+ .priv_auto = sizeof(struct tpm_chip),
};
diff --git a/drivers/tpm/tpm_tis_st33zp24_spi.c b/drivers/tpm/tpm_tis_st33zp24_spi.c
index ef54e3b7b2..f0de8a65b0 100644
--- a/drivers/tpm/tpm_tis_st33zp24_spi.c
+++ b/drivers/tpm/tpm_tis_st33zp24_spi.c
@@ -116,7 +116,7 @@ static int st33zp24_spi_write(struct udevice *dev, u8 tpm_register,
{
int total_length = 0, ret;
struct spi_slave *slave = dev_get_parent_priv(dev);
- struct st33zp24_spi_phy *phy = dev_get_platdata(dev);
+ struct st33zp24_spi_phy *phy = dev_get_plat(dev);
u8 *tx_buf = (u8 *)phy->tx_buf;
u8 *rx_buf = phy->rx_buf;
@@ -167,7 +167,7 @@ static u8 st33zp24_spi_read8_reg(struct udevice *dev, u8 tpm_register,
{
int total_length = 0, ret;
struct spi_slave *slave = dev_get_parent_priv(dev);
- struct st33zp24_spi_phy *phy = dev_get_platdata(dev);
+ struct st33zp24_spi_phy *phy = dev_get_plat(dev);
u8 *tx_buf = (u8 *)phy->tx_buf;
u8 *rx_buf = phy->rx_buf;
@@ -223,7 +223,7 @@ static int st33zp24_spi_evaluate_latency(struct udevice *dev)
{
int latency = 1, status = 0;
u8 data = 0;
- struct st33zp24_spi_phy *phy = dev_get_platdata(dev);
+ struct st33zp24_spi_phy *phy = dev_get_plat(dev);
while (!status && latency < MAX_SPI_LATENCY) {
phy->latency = latency;
@@ -562,7 +562,7 @@ static int st33zp24_spi_cleanup(struct udevice *dev)
static int st33zp24_spi_init(struct udevice *dev)
{
struct tpm_chip *chip = dev_get_priv(dev);
- struct st33zp24_spi_phy *phy = dev_get_platdata(dev);
+ struct st33zp24_spi_phy *phy = dev_get_plat(dev);
chip->is_open = 1;
@@ -670,6 +670,6 @@ U_BOOT_DRIVER(st33zp24_spi_spi) = {
.probe = st33zp24_spi_probe,
.remove = st33zp24_spi_remove,
.ops = &st33zp24_spi_tpm_ops,
- .priv_auto_alloc_size = sizeof(struct tpm_chip),
- .platdata_auto_alloc_size = sizeof(struct st33zp24_spi_phy),
+ .priv_auto = sizeof(struct tpm_chip),
+ .plat_auto = sizeof(struct st33zp24_spi_phy),
};