Lines Matching refs:dev
154 static int tegra_mmc_send_cmd_bounced(struct udevice *dev, struct mmc_cmd *cmd, in tegra_mmc_send_cmd_bounced() argument
158 struct tegra_mmc_priv *priv = dev_get_priv(dev); in tegra_mmc_send_cmd_bounced()
327 static int tegra_mmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, in tegra_mmc_send_cmd() argument
349 ret = tegra_mmc_send_cmd_bounced(dev, cmd, data, &bbstate); in tegra_mmc_send_cmd()
411 static int tegra_mmc_set_ios(struct udevice *dev) in tegra_mmc_set_ios() argument
413 struct tegra_mmc_priv *priv = dev_get_priv(dev); in tegra_mmc_set_ios()
414 struct mmc *mmc = mmc_get_mmc_dev(dev); in tegra_mmc_set_ios()
509 static int tegra_mmc_init(struct udevice *dev) in tegra_mmc_init() argument
511 struct tegra_mmc_priv *priv = dev_get_priv(dev); in tegra_mmc_init()
512 struct mmc *mmc = mmc_get_mmc_dev(dev); in tegra_mmc_init()
571 static int tegra_mmc_getcd(struct udevice *dev) in tegra_mmc_getcd() argument
573 struct tegra_mmc_priv *priv = dev_get_priv(dev); in tegra_mmc_getcd()
589 static int tegra_mmc_probe(struct udevice *dev) in tegra_mmc_probe() argument
591 struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev); in tegra_mmc_probe()
592 struct tegra_mmc_plat *plat = dev_get_platdata(dev); in tegra_mmc_probe()
593 struct tegra_mmc_priv *priv = dev_get_priv(dev); in tegra_mmc_probe()
597 cfg->name = dev->name; in tegra_mmc_probe()
599 bus_width = dev_read_u32_default(dev, "bus-width", 1); in tegra_mmc_probe()
620 priv->reg = (void *)dev_read_addr(dev); in tegra_mmc_probe()
622 ret = reset_get_by_name(dev, "sdhci", &priv->reset_ctl); in tegra_mmc_probe()
627 ret = clk_get_by_index(dev, 0, &priv->clk); in tegra_mmc_probe()
647 gpio_request_by_name(dev, "cd-gpios", 0, &priv->cd_gpio, GPIOD_IS_IN); in tegra_mmc_probe()
648 gpio_request_by_name(dev, "wp-gpios", 0, &priv->wp_gpio, GPIOD_IS_IN); in tegra_mmc_probe()
649 gpio_request_by_name(dev, "power-gpios", 0, &priv->pwr_gpio, in tegra_mmc_probe()
656 return tegra_mmc_init(dev); in tegra_mmc_probe()
659 static int tegra_mmc_bind(struct udevice *dev) in tegra_mmc_bind() argument
661 struct tegra_mmc_plat *plat = dev_get_platdata(dev); in tegra_mmc_bind()
663 return mmc_bind(dev, &plat->mmc, &plat->cfg); in tegra_mmc_bind()