linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: stefan-XLVq0VzYD2Y@public.gmane.org
To: chris-OsFVWbfNK3isTnJN9+BGXg@public.gmane.org,
	linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	stefan-XLVq0VzYD2Y@public.gmane.org
Subject: [RFC 0/2] fixed order for mmc devices/mmc block devices
Date: Tue,  1 Apr 2014 22:35:50 +0200	[thread overview]
Message-ID: <cover.1396384101.git.stefan@agner.ch> (raw)

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

             reply	other threads:[~2014-04-01 20:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-01 20:35 stefan-XLVq0VzYD2Y [this message]
     [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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1396384101.git.stefan@agner.ch \
    --to=stefan-xlvq0vzyd2y@public.gmane.org \
    --cc=chris-OsFVWbfNK3isTnJN9+BGXg@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
    --cc=linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).