summaryrefslogtreecommitdiff
path: root/drivers/rtc
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-04-24 02:02:07 (GMT)
committerSimon Glass <sjg@chromium.org>2017-06-01 13:03:05 (GMT)
commite48eeb9ea3aed67e4bda94c65a7f13e8672a3501 (patch)
tree13a6fb91509ee655c8536577e8ec5101c67ac5dd /drivers/rtc
parente8abbb531f506dc0cac973b86fb5fa01f0bf88c4 (diff)
downloadu-boot-fsl-qoriq-e48eeb9ea3aed67e4bda94c65a7f13e8672a3501.tar.xz
dm: blk: Improve block device claiming
The intention with block devices is that the device number (devnum field in its descriptor) matches the alias of its parent device. For example, with: aliases { mmc0 = "/sdhci@700b0600"; mmc1 = "/sdhci@700b0400"; } we expect that the block devices for mmc0 and mmc1 would have device numbers of 0 and 1 respectively. Unfortunately this does not currently always happen. If there is another MMC device earlier in the driver model data structures its block device will be created first. It will therefore get device number 0 and mmc0 will therefore miss out. In this case the MMC device will have sequence number 0 but its block device will not. To avoid this, allow a device to request a device number and bump any existing device number that is using it. This all happens during the binding phase so it is safe to change these numbers around. This allows device numbers to match the aliases in all circumstances. Add a test to verify the behaviour. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/rtc')
0 files changed, 0 insertions, 0 deletions