summaryrefslogtreecommitdiff
path: root/drivers/mmc/octeontx_hsmmc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/octeontx_hsmmc.c')
-rw-r--r--drivers/mmc/octeontx_hsmmc.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/mmc/octeontx_hsmmc.c b/drivers/mmc/octeontx_hsmmc.c
index 5552342f8d..57d107aac3 100644
--- a/drivers/mmc/octeontx_hsmmc.c
+++ b/drivers/mmc/octeontx_hsmmc.c
@@ -30,6 +30,7 @@
#include <asm/arch/clock.h>
#include <asm/arch/csrs/csrs-mio_emm.h>
#include <asm/io.h>
+#include <dm/device-internal.h>
#include <power/regulator.h>
@@ -3841,7 +3842,7 @@ static int octeontx_mmc_host_child_pre_probe(struct udevice *dev)
}
slot = &host->slots[bus_id];
- dev->priv = slot;
+ dev_set_priv(dev, slot);
slot->host = host;
slot->bus_id = bus_id;
slot->dev = dev;
@@ -3852,16 +3853,21 @@ static int octeontx_mmc_host_child_pre_probe(struct udevice *dev)
snprintf(name, sizeof(name), "octeontx-mmc%d", bus_id);
err = device_set_name(dev, name);
- if (!dev->uclass_priv) {
+ /* FIXME: This code should not be needed */
+ if (!dev_get_uclass_priv(dev)) {
debug("%s(%s): Allocating uclass priv\n", __func__,
dev->name);
upriv = calloc(1, sizeof(struct mmc_uclass_priv));
if (!upriv)
return -ENOMEM;
- dev->uclass_priv = upriv;
- dev->uclass->priv = upriv;
+
+ /*
+ * FIXME: This is not allowed
+ * dev_set_uclass_priv(dev, upriv);
+ * uclass_set_priv(dev->uclass, upriv);
+ */
} else {
- upriv = dev->uclass_priv;
+ upriv = dev_get_uclass_priv(dev);
}
upriv->mmc = &slot->mmc;
@@ -3878,6 +3884,7 @@ static const struct udevice_id octeontx_hsmmc_host_ids[] = {
U_BOOT_DRIVER(octeontx_hsmmc_host) = {
.name = "octeontx_hsmmc_host",
+ /* FIXME: Why is this not UCLASS_MMC? */
.id = UCLASS_MISC,
.of_match = of_match_ptr(octeontx_hsmmc_host_ids),
.probe = octeontx_mmc_host_probe,