[U-Boot] Are non-default configurations expected to work? Re: usb: dwc2: does not compile in 2016-rc3 when updating from -rc1.

Tom Rini trini at konsulko.com
Sun Jan 10 20:16:55 CET 2016


On Sun, Jan 10, 2016 at 08:06:59PM +0100, Marek Vasut wrote:
> On Sunday, January 10, 2016 at 08:04:06 PM, Tom Rini wrote:
> > On Sun, Jan 10, 2016 at 07:39:29PM +0100, Pavel Machek wrote:
> > > > > > Pristine u-boot 2016.01-rc4 compiles fine for CV SoCDK. Can you
> > > > > > please test mainline _before_ reporting issues ?
> > > > > 
> > > > > Can you please test mainline before complaining?
> > > > 
> > > > Yes I _did_ test mainline AND booted it on the actual board. The USB
> > > > does work (if you disable dcache, which is unrelated bug). It would be
> > > > very nice if you did the same thing before you start yelling on the
> > > > list that there is a bug.
> > > > 
> > > > The config you use and the one produced by make
> > > > socfpga_cyclone5_defconfig differ. Use the mainline one, otherwise you
> > > > will observe possible problems.
> > > 
> > > Of course they differ. That's why they are called configuration
> > > _options_.
> > 
> > True.
> > 
> > > > > With d77a092dd3619ca747fb8290ae8f255e9799aaa6 and attached .config, I
> > > > > get the failure. No, CONFIG_DM_USB is not set in the config, which is
> > > > > probably the problem.
> > > > 
> > > > Again, the problem does not happen if you use mainline config. If you
> > > > enable random options, you might run into random problems.
> > > > 
> > > > > Maybe socfpga should select DM_USB or depend on it?
> > > > 
> > > > u-boot$ git grep DM_USB configs/socfpga_*
> > > > configs/socfpga_arria5_defconfig:CONFIG_DM_USB=y
> > > > configs/socfpga_cyclone5_defconfig:CONFIG_DM_USB=y
> > > > configs/socfpga_de0_nano_soc_defconfig:CONFIG_DM_USB=y
> > > > configs/socfpga_mcvevk_defconfig:CONFIG_DM_USB=y
> > > > configs/socfpga_sockit_defconfig:CONFIG_DM_USB=y
> > > > configs/socfpga_socrates_defconfig:CONFIG_DM_USB=y
> > > > 
> > > > So your config is broken or outdated, please update your config.
> > > 
> > > No. Mainline is broken. Yes, it happens to work with defconfig. But it
> > > should work with any configuration user can select.
> > 
> > So, here's the problem.  Disabling CONFIG_DM_USB is not a long term
> > solution.
> 
> CONFIG_DM_USB is enabled though.
> 
> > If there's a problem when CONFIG_DM_USB is not set, it should
> > be diagnosed and fixed, especially since we might have a mirror of the
> > issue inside the DM code, or it might be a more core problem and we
> > simply luck out in the DM case.
> 
> The problem is if you have CONFIG_USB enabled, but _without_ CONFIG_DM_USB.
> In that case, the DWC2 driver expects you to define a macro which specifies
> the base address of the USB controller. Otherwise the driver picks this info 
> from the OF.
> 
> I believe there is no problem with this, the driver covers both DM and non-DM
> operation this way.

That's it?  Yes, we should have the missing define added and a lack of
it is a bug we should fix.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160110/3294e40a/attachment.sig>


More information about the U-Boot mailing list