[U-Boot] [PATCH 1/2] dm: Protect device_unbind() with CONFIG_DM_DEVICE_REMOVE
Marek Vasut
marex at denx.de
Thu Feb 19 19:19:46 CET 2015
On Thursday, February 19, 2015 at 04:24:02 PM, Simon Glass wrote:
> Hi Marek,
Hi Simon,
> On 19 February 2015 at 07:34, Marek Vasut <marex at denx.de> wrote:
> > On Thursday, February 19, 2015 at 03:29:52 PM, Simon Glass wrote:
> >> Hi Marek,
> >
> > Hi Simon,
> >
> >> On 19 February 2015 at 01:50, Marek Vasut <marex at denx.de> wrote:
> >> > On Thursday, February 19, 2015 at 02:06:38 AM, Simon Glass wrote:
> >> >> On 18 February 2015 at 14:36, Marek Vasut <marex at denx.de> wrote:
> >> >> > Since device_unbind() is also defined in device-remove.c,
> >> >> > which is compiled in only in case CONFIG_DM_DEVICE_REMOVE
> >> >> > is defined, protect the device_unbind() prototype with the
> >> >> > same CONFIG_DM_DEVICE_REMOVE check.
> >> >> >
> >> >> > Signed-off-by: Marek Vasut <marex at denx.de>
> >> >> > Cc: Simon Glass <sjg at chromium.org>
> >> >> > Cc: Stefan Roese <sr at denx.de>
> >> >> > Cc: Tom Rini <trini at ti.com>
> >> >> > ---
> >> >> >
> >> >> > include/dm/device-internal.h | 4 ++++
> >> >> > 1 file changed, 4 insertions(+)
> >> >>
> >> >> Acked-by: Simon Glass <sjg at chromium.org>
> >> >
> >> > Tom, can you please pick this one, I need it to repair the socfpga,
> >> > so I'd like to have it in before I submit new PR for that.
> >>
> >> I'll bring it into u-boot-dm in any case.
> >>
> >> I didn't see a build error though? What is broken at present?
> >
> > Try building u-boot-socfpga/master . The patches there enable DT
> > (CONFIG_OF_CONTROL) on SoCFPGA always. And in case this is enabled,
> > the Cadence SPI and DW SPI drivers are compiled in. But those two
> > drivers require CONFIG_DM and CONFIG_DM_SPI ... and spi-uclass.c
> > contains calls to device_unbind() .
>
> Ah OK, so this a problem you have seen in new patches, not in mainline.
It's only triggered by the new code, it is not introduced by this new code.
In case you enable either of those drivers as well as CONFIG_OF_CONTROL,
you will trigger this bug.
In case I base those patches on v2015.04-rc1 , I don't see this error, but
in case I base those patches on top of v2015.04-rc2, I do see it. Do you
have any hint which changes between these two points can cause this breakage
please ?
Also, about the Kconfig, shall I introduce the entries for those two drivers
or what is the plan here ? I would like to get these patches into the current
release.
Best regards,
Marek Vasut
More information about the U-Boot
mailing list