Adam Ford reports that this change breaks booting on da850-evm and
Bartosz Golaszewski agrees that with the impending release we should
revert the change for now. With that noted:
This reverts commit
21a4d80a710c79053ac1deaa65ff9b69e6c031d4.
Cc: Bartosz Golaszewski <brgl@bgdev.pl>
Tested-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
uint input_clk; /* Input clock to MMC controller */
struct gpio_desc cd_gpio; /* Card Detect GPIO */
struct gpio_desc wp_gpio; /* Write Protect GPIO */
uint input_clk; /* Input clock to MMC controller */
struct gpio_desc cd_gpio; /* Card Detect GPIO */
struct gpio_desc wp_gpio; /* Write Protect GPIO */
+};
+
+struct davinci_mmc_plat
+{
struct mmc_config cfg;
struct mmc mmc;
};
struct mmc_config cfg;
struct mmc mmc;
};
static int davinci_mmc_probe(struct udevice *dev)
{
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
static int davinci_mmc_probe(struct udevice *dev)
{
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
+ struct davinci_mmc_plat *plat = dev_get_platdata(dev);
struct davinci_mmc_priv *priv = dev_get_priv(dev);
struct davinci_mmc_priv *priv = dev_get_priv(dev);
- struct mmc_config *cfg = &priv->cfg;
+ struct mmc_config *cfg = &plat->cfg;
#ifdef CONFIG_SPL_BUILD
int ret;
#endif
#ifdef CONFIG_SPL_BUILD
int ret;
#endif
gpio_request_by_name(dev, "wp-gpios", 0, &priv->wp_gpio, GPIOD_IS_IN);
#endif
gpio_request_by_name(dev, "wp-gpios", 0, &priv->wp_gpio, GPIOD_IS_IN);
#endif
- upriv->mmc = &priv->mmc;
+ upriv->mmc = &plat->mmc;
#ifdef CONFIG_SPL_BUILD
/*
#ifdef CONFIG_SPL_BUILD
/*
* support in SPL, hence the hard-coded base register address.
*/
priv->reg_base = (struct davinci_mmc_regs *)DAVINCI_MMC_SD0_BASE;
* support in SPL, hence the hard-coded base register address.
*/
priv->reg_base = (struct davinci_mmc_regs *)DAVINCI_MMC_SD0_BASE;
- ret = mmc_bind(dev, &priv->mmc, &priv->cfg);
+ ret = mmc_bind(dev, &plat->mmc, &plat->cfg);
if (ret)
return ret;
#endif
if (ret)
return ret;
#endif
static int davinci_mmc_bind(struct udevice *dev)
{
static int davinci_mmc_bind(struct udevice *dev)
{
- struct davinci_mmc_priv *priv = dev_get_priv(dev);
+ struct davinci_mmc_plat *plat = dev_get_platdata(dev);
- return mmc_bind(dev, &priv->mmc, &priv->cfg);
+ return mmc_bind(dev, &plat->mmc, &plat->cfg);
}
static const struct udevice_id davinci_mmc_ids[] = {
}
static const struct udevice_id davinci_mmc_ids[] = {
#endif
.probe = davinci_mmc_probe,
.ops = &davinci_mmc_ops,
#endif
.probe = davinci_mmc_probe,
.ops = &davinci_mmc_ops,
+ .platdata_auto_alloc_size = sizeof(struct davinci_mmc_plat),
.priv_auto_alloc_size = sizeof(struct davinci_mmc_priv),
};
#endif
.priv_auto_alloc_size = sizeof(struct davinci_mmc_priv),
};
#endif