[U-Boot] [PATCH V2] imx: mx7dsabresd: include BLK for MMC/eMMC support of driver model
Tom Rini
trini at konsulko.com
Wed Oct 11 22:17:12 UTC 2017
On Wed, Oct 11, 2017 at 07:07:04PM -0300, Fabio Estevam wrote:
> On Wed, Oct 11, 2017 at 6:55 PM, Tom Rini <trini at 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?
Hmmm. So, if you have DM and DM_MMC, you need BLK. If you have DM and
BLK and USB, you also need DM_USB (and vice-versa, if you have DM and DM_USB and
not DM_MMC, things will break too, on another platform I bet). So,
DM_USB should also select BLK I think. The case like mx6slkevk where
you have DM_USB supported by not enabled are a bug of sorts where it
needs to also be enabling DM_USB. I think I'll need to do a world build
to see what fails in this case, unless you want to do it? Thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171011/1521f14b/attachment.sig>
More information about the U-Boot
mailing list