public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/2] fixed order for mmc devices/mmc block devices
@ 2014-04-01 20:35 stefan
  2014-04-01 20:35 ` [RFC 1/2] mmc: read mmc alias from device tree stefan
  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 @ 2014-04-01 20:35 UTC (permalink / raw)
  To: chris, linux-mmc; +Cc: linux-tegra, linux, linux-kernel, stefan

From: Stefan Agner <stefan@agner.ch>

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:09 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
2014-04-01 20:35 ` [RFC 1/2] mmc: read mmc alias from device tree stefan
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
2014-04-01 21:46     ` Stefan Agner
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