Thread (1 message) 1 message, 1 author, 2013-09-23

Re: [PATCH] mmc: sdhci-esdhc-imx: Allow the usage of mmc aliases

From: Stephen Warren <hidden>
Date: 2013-09-23 21:27:12
Also in: linux-mmc

On 09/22/2013 08:38 PM, Fabio Estevam wrote:
From: Fabio Estevam <redacted>

On embedded devices, there is often a combination of removable mmc
devices (e.g. MMC/SD cards) and hard wired ones (e.g. eMMC).
Depending on the hardware configuration, the 'mmcblkN' node might
change if the removable device is available or not at boot time.

E.g. if the removable device is attached at boot time, it might
become mmxblk0. And the hard wired one mmcblk1. But if the removable
device isn't there at boot time, the hard wired one will become
mmcblk0. This makes it somehow difficult to hard code the root device
to the non-removable device and boot fast.

Allow the sdhci-esdhc-imx driver to retrieve the mmc aliases, so that we can 
map via the device tree which mmcblk corresponds to the rootfs.
quoted hunk
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
-	devidx = find_first_zero_bit(dev_use, max_devices);
+	devidx = find_next_zero_bit(dev_use, max_devices, card->host->devidx);
I'm not sure if this works; what if the SD card gets detected/removed
without recycling the device name/ID a few times before the fixed eMMC
is detected?

So, in the perfect case this will achieve what you want, but not in some
unusual cases. So I don't think it's a good idea to rely on this.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help