summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongjin Kim <tobetter@gmail.com>2021-12-30 12:35:36 +0300
committerDongjin Kim <tobetter@gmail.com>2021-12-30 12:54:45 +0300
commitca5c344a875ac0d3106947a55b0cfde46578e3ae (patch)
tree3fde1914daa9ea59d3eadbe2d3429b9e9335734f
parent68e0027a9fbfc764639182125a4ca26d17601c54 (diff)
downloadu-boot-ca5c344a875ac0d3106947a55b0cfde46578e3ae.tar.xz
ODROID-COMMON: Revert "driver: core: reject all mmc device from kernel"
This reverts commit 33273e09fd8c70f30afe5da51578283c35910fd7. This patch is to use MMC device from kernel device tree rather than U-Boot. After device tree for kernel is loaded, the phandle of the pin controls for MMC refers to U-Boot one and failed to initiated them when booting from SPI flash memory. Change-Id: I3fb82ac64bd8942da6da12f90c7d83f82bfc9644
-rw-r--r--drivers/core/device.c10
-rw-r--r--drivers/core/of_access.c4
2 files changed, 0 insertions, 14 deletions
diff --git a/drivers/core/device.c b/drivers/core/device.c
index c3c775784e..8ffd1aea34 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -56,16 +56,6 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv,
if (drv->id == UCLASS_MMC || drv->id == UCLASS_RKNAND ||
drv->id == UCLASS_SPI_FLASH || drv->id == UCLASS_MTD ||
drv->id == UCLASS_PCI || drv->id == UCLASS_AHCI) {
- /*
- * Reject all mmc device from kernel.
- *
- * - we always follow the rule: use mmc device from U-Boot
- * - avoid alias id on defferent device between U-Boot and kernel
- */
- if ((gd->flags & GD_FLG_KDTB_READY) &&
- (drv->id == UCLASS_MMC))
- return 0;
-
list_for_each_entry(dev, &uc->dev_head, uclass_node) {
if (!strcmp(name, dev->name)) {
debug("%s do not bind dev already in list %s\n",
diff --git a/drivers/core/of_access.c b/drivers/core/of_access.c
index 3729487387..db2f64bd56 100644
--- a/drivers/core/of_access.c
+++ b/drivers/core/of_access.c
@@ -731,10 +731,6 @@ static void of_alias_add(struct alias_prop *ap, struct device_node *np,
mutex_lock(&of_mutex);
list_for_each_entry(oldap, &aliases_lookup, link) {
if (stem && !strcmp(stem, oldap->alias) && (id == oldap->id)) {
- /* Always use from U-Boot aliase */
- if (strcmp(stem, "mmc"))
- continue;
-
list_del(&oldap->link);
break;
}