linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/2] fixed order for mmc devices/mmc block devices
@ 2014-04-01 20:35 stefan-XLVq0VzYD2Y
       [not found] ` <cover.1396384101.git.stefan-XLVq0VzYD2Y@public.gmane.org>
  2014-04-01 20:35 ` [RFC 2/2] mmc: use SD/MMC host ID for block device name ID stefan
  0 siblings, 2 replies; 8+ messages in thread
From: stefan-XLVq0VzYD2Y @ 2014-04-01 20:35 UTC (permalink / raw)
  To: chris-OsFVWbfNK3isTnJN9+BGXg, linux-mmc-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, linux-lFZ/pmaqli7XmaaqVzeoHQ,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, stefan-XLVq0VzYD2Y

From: Stefan Agner <stefan-XLVq0VzYD2Y@public.gmane.org>

Nowadays SoCs usually have multiple SD/MMC host adapters. Often
the first is connected to an internal eMMC, however sometimes it
is the second controller that is connected to the eMMC.

If the second controller is connected to the eMMC, the number
assigned to the eMMC block device varies depending on whether the
external SD-Card is present or not.
The boot device could be specified using partition UUIDs, but
those can change when recreating the partition table. Especially
for embedded devices it would be preferable to have a reliable
assigned block device number.

The first patch aims to give a way to specify the logical SD/MMC
host order. This is achieved by extending the device tree using
aliases:

aliases {
        mmc0 = "/sdhci@78000600";
        mmc1 = "/sdhci@78000200";
};

The second patch then uses the SD/MMC host index as preferred id
for the block device.

In theory, one SD/MMC host could control multiple cards. For this
case, this patch is somewhat ugly. It would only assign the first
host/card combination with a predictable block number. However,
for the case at hand this would be sufficient. 

Stefan Agner (2):
  mmc: read mmc alias from device tree
  mmc: use SD/MMC host ID for block device name ID

 drivers/mmc/card/block.c |  3 ++-
 drivers/mmc/core/host.c  | 24 +++++++++++++++++++-----
 2 files changed, 21 insertions(+), 6 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-03-13 20:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-01 20:35 [RFC 0/2] fixed order for mmc devices/mmc block devices stefan-XLVq0VzYD2Y
     [not found] ` <cover.1396384101.git.stefan-XLVq0VzYD2Y@public.gmane.org>
2014-04-01 20:35   ` [RFC 1/2] mmc: read mmc alias from device tree stefan-XLVq0VzYD2Y
     [not found]     ` <5570bdf5ebb3aaae5a376634ecfbac9c2fd7b9f4.1396384101.git.stefan-XLVq0VzYD2Y@public.gmane.org>
2014-08-06 19:43       ` Doug Anderson
2015-03-13 20:08       ` Doug Anderson
2014-04-01 20:35 ` [RFC 2/2] mmc: use SD/MMC host ID for block device name ID stefan
2014-04-01 20:47   ` Stephen Warren
     [not found]     ` <533B25E8.8040201-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2014-04-01 21:46       ` Stefan Agner
     [not found]   ` <2f6ac51155f9d34791b274b5102d15a997ff8b99.1396384101.git.stefan-XLVq0VzYD2Y@public.gmane.org>
2014-08-06 19:50     ` Doug Anderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).