public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2] imx: mx7dsabresd: include BLK for MMC/eMMC support of driver model
Date: Thu, 12 Oct 2017 12:33:27 -0400	[thread overview]
Message-ID: <20171012163327.GT12015@bill-the-cat> (raw)
In-Reply-To: <20171011221712.GS12015@bill-the-cat>

On Wed, Oct 11, 2017 at 06:17:12PM -0400, Tom Rini wrote:
> 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@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!

OK, disregard what I had been saying.  At this point, it's a matter of
correcting and testing boards to have either DM_MMC (and DM_USB and BLK)
on, or having DM_MMC off (because they want USB gadget support).

-- 
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/20171012/ccff4eb2/attachment.sig>

  parent reply	other threads:[~2017-10-12 16:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-11 14:23 [U-Boot] [PATCH] mx7dsabresd: Remove CONFIG_DM_MMC to avoid regression Fabio Estevam
2017-10-11 14:27 ` Otavio Salvador
2017-10-11 15:38   ` Fabio Estevam
2017-10-11 20:29     ` [U-Boot] [PATCH] imx: mx7dsabresd: include BLK for MMC/eMMC support of driver model Eric Nelson
2017-10-11 20:41       ` Jagan Teki
2017-10-11 20:50       ` Fabio Estevam
2017-10-11 20:51         ` Tom Rini
2017-10-11 21:40           ` Eric Nelson
2017-10-11 21:14         ` Eric Nelson
2017-10-11 21:45       ` [U-Boot] [PATCH V2] " Eric Nelson
2017-10-11 21:49         ` Tom Rini
2017-10-11 21:53           ` Fabio Estevam
2017-10-11 21:55             ` Tom Rini
2017-10-11 22:07               ` Fabio Estevam
2017-10-11 22:17                 ` Tom Rini
2017-10-11 22:28                   ` Fabio Estevam
2017-10-12 16:33                   ` Tom Rini [this message]
2017-10-12 18:35                     ` Fabio Estevam
2017-10-12 18:38                       ` Tom Rini
2017-10-12 18:39                         ` Fabio Estevam
2017-10-12 18:49                           ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171012163327.GT12015@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox