#include <palmas.h>
#endif
#include <asm/cache.h>
+#include <asm/global_data.h>
#include <asm/io.h>
#include <asm/arch/mmc_host_def.h>
#ifdef CONFIG_OMAP54XX
/* simplify defines to OMAP_HSMMC_USE_GPIO */
#if (defined(CONFIG_OMAP_GPIO) && !defined(CONFIG_SPL_BUILD)) || \
- (defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_GPIO_SUPPORT))
+ (defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_GPIO))
#define OMAP_HSMMC_USE_GPIO
#else
#undef OMAP_HSMMC_USE_GPIO
static inline struct mmc_config *omap_hsmmc_get_cfg(struct mmc *mmc)
{
#if CONFIG_IS_ENABLED(DM_MMC)
- struct omap_hsmmc_plat *plat = dev_get_platdata(mmc->dev);
+ struct omap_hsmmc_plat *plat = dev_get_plat(mmc->dev);
return &plat->cfg;
#else
return &((struct omap_hsmmc_data *)mmc->priv)->cfg;
}
#endif
-static int omap_hsmmc_ofdata_to_platdata(struct udevice *dev)
+static int omap_hsmmc_of_to_plat(struct udevice *dev)
{
- struct omap_hsmmc_plat *plat = dev_get_platdata(dev);
+ struct omap_hsmmc_plat *plat = dev_get_plat(dev);
struct omap_mmc_of_data *of_data = (void *)dev_get_driver_data(dev);
struct mmc_config *cfg = &plat->cfg;
int node = dev_of_offset(dev);
int ret;
- plat->base_addr = map_physmem(devfdt_get_addr(dev),
+ plat->base_addr = map_physmem(dev_read_addr(dev),
sizeof(struct hsmmc *),
MAP_NOCACHE);
plat->controller_flags |= of_data->controller_flags;
#ifdef CONFIG_OMAP54XX
- fixups = platform_fixups_mmc(devfdt_get_addr(dev));
+ fixups = platform_fixups_mmc(dev_read_addr(dev));
if (fixups) {
plat->hw_rev = fixups->hw_rev;
cfg->host_caps &= ~fixups->unsupported_caps;
static int omap_hsmmc_bind(struct udevice *dev)
{
- struct omap_hsmmc_plat *plat = dev_get_platdata(dev);
+ struct omap_hsmmc_plat *plat = dev_get_plat(dev);
plat->mmc = calloc(1, sizeof(struct mmc));
return mmc_bind(dev, plat->mmc, &plat->cfg);
}
#endif
static int omap_hsmmc_probe(struct udevice *dev)
{
- struct omap_hsmmc_plat *plat = dev_get_platdata(dev);
+ struct omap_hsmmc_plat *plat = dev_get_plat(dev);
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
struct omap_hsmmc_data *priv = dev_get_priv(dev);
struct mmc_config *cfg = &plat->cfg;
.id = UCLASS_MMC,
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
.of_match = omap_hsmmc_ids,
- .ofdata_to_platdata = omap_hsmmc_ofdata_to_platdata,
- .platdata_auto_alloc_size = sizeof(struct omap_hsmmc_plat),
+ .of_to_plat = omap_hsmmc_of_to_plat,
+ .plat_auto = sizeof(struct omap_hsmmc_plat),
#endif
#ifdef CONFIG_BLK
.bind = omap_hsmmc_bind,
#endif
.ops = &omap_hsmmc_ops,
.probe = omap_hsmmc_probe,
- .priv_auto_alloc_size = sizeof(struct omap_hsmmc_data),
+ .priv_auto = sizeof(struct omap_hsmmc_data),
#if !CONFIG_IS_ENABLED(OF_CONTROL)
.flags = DM_FLAG_PRE_RELOC,
#endif