#include <asm/arch/clk.h>
#include <errno.h>
#include <asm/arch/pinmux.h>
+#include <asm/arch/power.h>
#ifdef CONFIG_DM_MMC
struct s5p_sdhci_plat {
{
struct s5p_sdhci_plat *plat = dev_get_platdata(dev);
int ret;
+#ifdef CONFIG_TARGET_TIZEN
+ struct blk_desc *bdesc;
+ struct udevice *bdev;
+ int devnum = -1;
+ ret = dev_read_alias_seq(dev, &devnum);
+ if (get_boot_mode() == BOOT_MODE_SD)
+ devnum = 0;
+
+ ret = blk_create_devicef(dev, "mmc_blk", "blk", IF_TYPE_MMC,
+ devnum, 512, 0, &bdev);
+ if (ret) {
+ debug("Cannot create block device\n");
+ return ret;
+ }
+ bdesc = dev_get_uclass_platdata(bdev);
+ plat->mmc.cfg = &plat->cfg;
+ plat->mmc.priv = dev;
+
+ /* the following chunk was from mmc_register() */
+
+ /* Setup dsr related values */
+ plat->mmc.dsr_imp = 0;
+ plat->mmc.dsr = 0xffffffff;
+ /* Setup the universal parts of the block interface just once */
+ bdesc->removable = 1;
+
+ /* setup initial part type */
+ bdesc->part_type = plat->cfg.part_type;
+ plat->mmc.dev = dev;
+#else
ret = sdhci_bind(dev, &plat->mmc, &plat->cfg);
if (ret)
return ret;
-
+#endif
return 0;
}