[U-Boot] [PATCH V2] imx: mx7dsabresd: include BLK for MMC/eMMC support of driver model

Fabio Estevam
2017-10-11T22:07:04Z

On Wed, Oct 11, 2017 at 6:55 PM, Tom Rini <trini@konsulko.com> wrote:

> Yes, I think that's it, along with removing the default y if DM_MMC from
> the BLK entry. Thanks!

Ok, if I do as suggested:

--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -1,7 +1,6 @@
config BLK
bool "Support block devices"
depends on DM
- default y if DM_MMC
help
Enable support for block devices, such as SCSI, MMC and USB
flash sticks. These provide a block-level interface which permits
diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
index 94050836..f4c953c 100644
--- a/drivers/mmc/Kconfig
+++ b/drivers/mmc/Kconfig
@@ -13,6 +13,7 @@ config MMC
config DM_MMC
bool "Enable MMC controllers using Driver Model"
depends on DM
+ select BLK
help
This enables the MultiMediaCard (MMC) uclass which supports MMC and
Secure Digital I/O (SDIO) cards. Both removable (SD, micro-SD, etc.)

Then mx7dsabresd_defconfig build and boots fine.

However, mx6slevk_defconfig fails to build like this:

CC common/usb_storage.o
common/usb_storage.c: In function ‘usb_stor_probe_device’:
common/usb_storage.c:208:30: error: ‘struct usb_device’ has no member
named ‘dev’
data = dev_get_platdata(udev->dev);
^
common/usb_storage.c:218:32: error: ‘struct usb_device’ has no member
named ‘dev’
ret = blk_create_devicef(udev->dev, "usb_storage_blk", str,
^
I can fix it by doing:

--- a/configs/mx6slevk_defconfig
+++ b/configs/mx6slevk_defconfig
@@ -44,6 +44,7 @@ CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_DM_THERMAL=y
CONFIG_USB=y
+CONFIG_DM_USB=y
CONFIG_USB_STORAGE=y
CONFIG_USB_HOST_ETHER=y
CONFIG_USB_ETHER_ASIX=y

Is there a better fix for this breakage?