From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Are non-default configurations expected to work? Re: usb: dwc2: does not compile in 2016-rc3 when updating from -rc1.
Date: Sun, 10 Jan 2016 15:11:46 -0500 [thread overview]
Message-ID: <20160110201146.GJ3359@bill-the-cat> (raw)
In-Reply-To: <201601102040.06217.marex@denx.de>
On Sun, Jan 10, 2016 at 08:40:06PM +0100, Marek Vasut wrote:
> On Sunday, January 10, 2016 at 08:28:24 PM, Tom Rini wrote:
> > On Sun, Jan 10, 2016 at 08:18:39PM +0100, Marek Vasut wrote:
> > > On Sunday, January 10, 2016 at 08:16:55 PM, Tom Rini wrote:
> > > > 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.
> > >
> > > Wrong, the macro was intently removed from all the socfpga config files
> > > because: a) do not want to hardcode any addresses on socfpga, they
> > > should come from DT b) we do want to support multiple controllers and
> > > that is not possible without
> > >
> > > CONFIG_DM_USB
> > >
> > > CONFIG_DM_USB is a hard requirement on SoCFPGA.
> >
> > Then with your SoCFPGA hat on, you need to fix the Kconfig so invalid
> > combinations can't happen.
>
> Invalid configurations do not happen in mainline, everything is compile tested.
> In case someone wants to bulletproof the config, patches are welcome. I am not
> certain what should select CONFIG_DM_USB, Simon might help here.
No. That's not how it works. And Kconfig isn't some esoteric thing no
one has heard of outside of U-Boot. One of the big points about
switching to Kconfig is that finally, really, people can customize their
build without editing header files and getting bit by poorly or not at
all documented interdependencies.
--
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/7cac247f/attachment.sig>
next prev parent reply other threads:[~2016-01-10 20:11 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-05 5:00 [U-Boot] [PATCH] usb: dwc2: Enhance interrupt handling for CONTROL transaction Chin Liang See
2016-01-05 14:36 ` Marek Vasut
2016-01-05 15:51 ` Chin Liang See
2016-01-05 16:16 ` Marek Vasut
2016-01-13 2:58 ` Marek Vasut
2016-01-13 15:18 ` Chin Liang See
2016-01-13 15:22 ` Marek Vasut
2016-01-14 14:50 ` Chin Liang See
2016-01-14 15:20 ` Marek Vasut
2016-02-04 11:42 ` Marek Vasut
2016-02-19 9:11 ` Chin Liang See
2016-02-19 15:16 ` Marek Vasut
2016-01-10 11:56 ` [U-Boot] usb: dwc2: does not compile in 2016-rc3 when updating from -rc1 Pavel Machek
2016-01-10 12:04 ` Pavel Machek
2016-01-10 13:45 ` Marek Vasut
2016-01-10 17:50 ` Pavel Machek
2016-01-10 18:13 ` Marek Vasut
2016-01-10 18:39 ` [U-Boot] Are non-default configurations expected to work? " Pavel Machek
2016-01-10 18:42 ` Marek Vasut
2016-01-10 19:04 ` Tom Rini
2016-01-10 19:06 ` Marek Vasut
2016-01-10 19:16 ` Tom Rini
2016-01-10 19:18 ` Marek Vasut
2016-01-10 19:28 ` Tom Rini
2016-01-10 19:40 ` Marek Vasut
2016-01-10 20:11 ` Tom Rini [this message]
2016-01-10 20:18 ` Marek Vasut
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=20160110201146.GJ3359@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