dm: mmc: Allow disabling driver model in SPL

At present if U-Boot proper uses driver model for MMC, then SPL has to
also. While this is desirable, it places a significant barrier to moving
to driver model in some cases. For example, with a space-constrained SPL
it may be necessary to enable CONFIG_SPL_OF_PLATDATA which involves
adjusting some drivers.

Add new SPL versions of the options for DM_MMC, DM_MMC_OPS and BLK. By
default these follow their non-SPL versions, but this can be changed by
boards which need it.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2017-07-04 13:31:19 -06:00
committed by Jaehoon Chung
parent 745a94f352
commit c4d660d4d0
13 changed files with 79 additions and 46 deletions

View File

@@ -10,6 +10,18 @@ config BLK
be partitioned into several areas, called 'partitions' in U-Boot.
A filesystem can be placed in each partition.
config SPL_BLK
bool "Support block devices in SPL"
depends on SPL_DM && BLK
default y
help
Enable support for block devices, such as SCSI, MMC and USB
flash sticks. These provide a block-level interface which permits
reading, writing and (in some cases) erasing blocks. Block
devices often have a partition table which allows the device to
be partitioned into several areas, called 'partitions' in U-Boot.
A filesystem can be placed in each partition.
config BLOCK_CACHE
bool "Use block device cache"
default n

View File

@@ -5,9 +5,9 @@
# SPDX-License-Identifier: GPL-2.0+
#
obj-$(CONFIG_BLK) += blk-uclass.o
obj-$(CONFIG_$(SPL_)BLK) += blk-uclass.o
ifndef CONFIG_BLK
ifndef CONFIG_$(SPL_)BLK
obj-y += blk_legacy.o
endif