Linux kernel source tree
Go to file
Matthias Schiffer a920d2b2cf UPSTREAM: mmc: core: Allow setting slot index via device tree alias
As with GPIO, UART and others, allow specifying the device index via the
aliases node in the device tree.

On embedded devices, there is often a combination of removable (e.g.
SD card) and non-removable MMC devices (e.g. eMMC).
Therefore the index might change depending on

* host of removable device
* removable card present or not

This makes it difficult to hardcode the root device, if it is on the
non-removable device. E.g. if SD card is present eMMC will be mmcblk1,
if SD card is not present at boot, eMMC will be mmcblk0.

Alternative solutions like PARTUUIDs do not cover the case where multiple
mmcblk devices contain the same image. This is a common issue on devices
that can boot both from eMMC (for regular boot) and SD cards (as a
temporary boot medium for development). When a firmware image is
installed to eMMC after a test boot via SD card, there will be no
reliable way to refer to a specific device using (PART)UUIDs oder
LABELs.

The demand for this feature has led to multiple attempts to implement
it, dating back at least to 2012 (see
https://www.spinics.net/lists/linux-mmc/msg26586.html for a previous
discussion from 2014).

All indices defined in the aliases node will be reserved for use by the
respective MMC device, moving the indices of devices that don't have an
alias up into the non-reserved range. If the aliases node is not found,
the driver will act as before.

This is a rebased and cleaned up version of
https://www.spinics.net/lists/linux-mmc/msg26588.html .

Based-on-patch-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://lkml.org/lkml/2020/8/5/194
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Link: https://lore.kernel.org/r/20200901085004.2512-2-matthias.schiffer@ew.tq-group.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

 Conflicts:
	drivers/mmc/core/host.c

Change-Id: I86a98bab7767d630172a552e0dc72d90aaebc2a3
(cherry picked from commit fa2d0aa969)
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2020-12-01 08:58:42 +08:00
android ANDROID: GKI: update the ABI xml 2020-10-30 12:21:53 +08:00
arch arm64: dts: rockchip: rk3566-evb3: fix clk for i2s3 2020-11-30 18:24:35 +08:00
block UPSTREAM: Revert "block: ratelimit handle_bad_sector() message" 2020-11-03 19:54:04 +08:00
certs rk: revert to v4.4 2019-02-10 00:33:21 +08:00
crypto Merge tag 'ASB-2020-11-05_4.19-stable' of https://android.googlesource.com/kernel/common 2020-11-03 18:36:42 +08:00
Documentation MALI: rockchip: upgrade bifrost DDK to g2p0-01eac0, from r25p1-01bet0 2020-11-30 18:04:43 +08:00
drivers UPSTREAM: mmc: core: Allow setting slot index via device tree alias 2020-12-01 08:58:42 +08:00
firmware Fix built-in early-load Intel microcode alignment 2020-01-23 08:21:29 +01:00
fs Merge tag 'ASB-2020-11-05_4.19-stable' of https://android.googlesource.com/kernel/common 2020-11-03 18:36:42 +08:00
include clk: rockchip: rv1126: Add CLK_32K_IOE support 2020-11-30 17:37:45 +08:00
init init: Introduce config ROCKCHIP_ONE_INITRD 2020-09-27 17:18:41 +08:00
ipc Revert "Revert "ANDROID: vfs: Add permission2 for filesystems with per mount permissions"" 2020-09-25 09:32:04 +08:00
kernel Merge tag 'ASB-2020-11-05_4.19-stable' of https://android.googlesource.com/kernel/common 2020-11-03 18:36:42 +08:00
lib Merge tag 'ASB-2020-11-05_4.19-stable' of https://android.googlesource.com/kernel/common 2020-11-03 18:36:42 +08:00
LICENSES LICENSES: Remove CC-BY-SA-4.0 license text 2018-10-18 11:28:50 +02:00
mm Merge tag 'ASB-2020-11-05_4.19-stable' of https://android.googlesource.com/kernel/common 2020-11-03 18:36:42 +08:00
net Merge tag 'ASB-2020-11-05_4.19-stable' of https://android.googlesource.com/kernel/common 2020-11-03 18:36:42 +08:00
samples This is the 4.19.154 stable release 2020-10-30 11:43:26 +01:00
scripts Merge tag 'ASB-2020-10-05_4.19-stable' of https://android.googlesource.com/kernel/common 2020-10-10 18:38:14 +08:00
security Merge tag 'ASB-2020-11-05_4.19-stable' of https://android.googlesource.com/kernel/common 2020-11-03 18:36:42 +08:00
sound ASoC: rockchip: i2s-tdm: Fix i2s3 mclk for rk3568 2020-11-23 17:35:50 +08:00
tools UPSTREAM: perf arm64: Fix mksyscalltbl when system kernel headers are ahead of the kernel 2020-11-10 19:33:08 +08:00
usr initramfs: restore default compression behavior 2020-04-13 10:44:59 +02:00
virt KVM: arm64: Assume write fault on S1PTW permission fault on instruction fetch 2020-10-01 13:14:54 +02:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore rk: .gitignore: ignore boot.img/kernel.img/resource.img/zboot.mg 2019-02-15 18:31:05 +08:00
.mailmap rk: revert to v4.4 2019-02-10 00:33:21 +08:00
.scmversion
build.config.aarch64 ANDROID: Publish uncompressed Image on aarch64 2020-11-01 15:13:43 +00:00
build.config.allmodconfig ANDROID: build.config.allmodconfig: Re-enable XFS_FS 2020-04-17 08:41:31 +00:00
build.config.allmodconfig.aarch64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.allmodconfig.arm ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.allmodconfig.x86_64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.arm ANDROID: move builds to use gas prebuilts 2020-10-19 21:13:08 +00:00
build.config.common ANDROID: clang: update to 11.0.5 2020-10-27 11:18:23 -07:00
build.config.gki ANDROID: gki: Removed cf modules from gki_defconfig 2020-01-31 16:23:38 -08:00
build.config.gki_kasan ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki_kasan.aarch64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki_kasan.x86_64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki-debug.aarch64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki-debug.x86_64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki.aarch64 ANDROID: GKI: prevent removal of monitored symbols 2020-09-29 11:48:43 +01:00
build.config.gki.x86_64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.x86_64 ANDROID: move builds to use gas prebuilts 2020-10-19 21:13:08 +00:00
COPYING
CREDITS 9p: remove Ron Minnich from MAINTAINERS 2018-08-17 16:20:26 -07:00
Kbuild rk: revert to v4.4 2019-02-10 00:33:21 +08:00
Kconfig kconfig: move the "Executable file formats" menu to fs/Kconfig.binfmt 2018-08-02 08:06:55 +09:00
logo_kernel.bmp rk: logo: update logo file 2019-08-29 19:45:37 +08:00
logo.bmp rk: logo: update logo file 2019-08-29 19:45:37 +08:00
MAINTAINERS Merge tag 'ASB-2020-11-05_4.19-stable' of https://android.googlesource.com/kernel/common 2020-11-03 18:36:42 +08:00
Makefile Merge tag 'ASB-2020-11-05_4.19-stable' of https://android.googlesource.com/kernel/common 2020-11-03 18:36:42 +08:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.