linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: linux-mmc@vger.kernel.org
Cc: Dirk Behme <dirk.behme@de.bosch.com>,
	Fabio Estevam <festevam@gmail.com>,
	ptx@pengutronix.de, Stephen Warren <swarren@wwwdotorg.org>
Subject: adding aliases to mmc ... again
Date: Thu, 22 May 2014 17:30:21 +0200	[thread overview]
Message-ID: <1400772623-8390-1-git-send-email-s.hauer@pengutronix.de> (raw)

Hi all,

The wish to have persistent MMC block device names for passing a suitable
root=/dev/mmcblkX option came up several times already and has been discussed
at least in these threads:

http://lists.infradead.org/pipermail/linux-arm-kernel/2012-July/109984.html
https://www.mail-archive.com/linux-mmc@vger.kernel.org/msg22104.html
http://comments.gmane.org/gmane.linux.kernel.mmc/21519

Several patches have been proposed to nail the slot index to a known number.
Arguments against these patches were:

- Use an initrd and locate the correct root device there
  even Thomas who suggested this admitted this would be painful to do
- use root=UUID= or root=PARTUUID=
  This generally works but has an important downside. With the UUID
  approach devices which should boot from the internal eMMC may start
  booting from an external SD slot when somebody deliberately inserts
  a SD card with the same UUID.

The following patches should have the technical issues fixed. It works
by counting the mmc aliases in the devicetree during initialization of
the mmc framework. Those slot numbers will never be assigned to other
hosts.

Sascha

----------------------------------------------------------------
Sascha Hauer (2):
      of: Add helper for getting the maximum alias index for a stem
      mmc: Allow setting slot index via devicetree alias

 drivers/mmc/card/block.c | 11 ++++++++++-
 drivers/mmc/core/core.c  | 37 +++++++++++++++++++++++++++++++++++++
 drivers/mmc/core/host.c  | 17 +++++++++++++++--
 drivers/of/base.c        | 29 +++++++++++++++++++++++++++++
 include/linux/mmc/core.h |  3 +++
 include/linux/of.h       |  6 ++++++
 6 files changed, 100 insertions(+), 3 deletions(-)

             reply	other threads:[~2014-05-22 15:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-22 15:30 Sascha Hauer [this message]
2014-05-22 15:30 ` [PATCH 1/2] of: Add helper for getting the maximum alias index for a stem Sascha Hauer
2014-05-22 15:30 ` [PATCH 2/2] mmc: Allow setting slot index via devicetree alias Sascha Hauer
2014-05-22 16:16 ` adding aliases to mmc ... again Stephen Warren
2014-05-22 18:21   ` Sascha Hauer
2014-05-22 19:23     ` Stephen Warren
2014-05-23  8:29       ` Michael Olbrich
2014-05-23 16:02         ` Stephen Warren
2014-05-23  9:23       ` Sascha Hauer
2014-05-23 16:01         ` Stephen Warren
2014-05-24  5:10           ` Sascha Hauer

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=1400772623-8390-1-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=dirk.behme@de.bosch.com \
    --cc=festevam@gmail.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ptx@pengutronix.de \
    --cc=swarren@wwwdotorg.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).