mmc: add func mmc_gpio_init_direct in spl
Sometimes we need to reconfigure the eMMC gpio state in spl without pinctrl driver. So add func mmc_gpio_init_direct to initialize the eMMC gpio in different platform. Change-Id: I22500f8865a9e29e59be6ff224001bad899cec48 Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
This commit is contained in:
parent
e3460df72d
commit
ace0ade619
|
|
@ -37,6 +37,10 @@ struct rockchip_dwmmc_priv {
|
||||||
u32 minmax[2];
|
u32 minmax[2];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef CONFIG_SPL_BUILD
|
||||||
|
__weak void mmc_gpio_init_direct(void) {}
|
||||||
|
#endif
|
||||||
|
|
||||||
static uint rockchip_dwmmc_get_mmc_clk(struct dwmci_host *host, uint freq)
|
static uint rockchip_dwmmc_get_mmc_clk(struct dwmci_host *host, uint freq)
|
||||||
{
|
{
|
||||||
struct udevice *dev = host->priv;
|
struct udevice *dev = host->priv;
|
||||||
|
|
@ -158,6 +162,9 @@ static int rockchip_dwmmc_probe(struct udevice *dev)
|
||||||
struct udevice *pwr_dev __maybe_unused;
|
struct udevice *pwr_dev __maybe_unused;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
#ifdef CONFIG_SPL_BUILD
|
||||||
|
mmc_gpio_init_direct();
|
||||||
|
#endif
|
||||||
#if CONFIG_IS_ENABLED(OF_PLATDATA)
|
#if CONFIG_IS_ENABLED(OF_PLATDATA)
|
||||||
struct dtd_rockchip_rk3288_dw_mshc *dtplat = &plat->dtplat;
|
struct dtd_rockchip_rk3288_dw_mshc *dtplat = &plat->dtplat;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -766,5 +766,12 @@ int mmc_get_env_dev(void);
|
||||||
*/
|
*/
|
||||||
struct blk_desc *mmc_get_blk_desc(struct mmc *mmc);
|
struct blk_desc *mmc_get_blk_desc(struct mmc *mmc);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mmc_gpio_init_direct()
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void mmc_gpio_init_direct(void);
|
||||||
|
|
||||||
#endif /* _MMC_H_ */
|
#endif /* _MMC_H_ */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue