[U-Boot] [PATCH 1/4] configs: opos6uldev: undef CONFIG_POWER_DOMAIN when SPL_BUILD

Peng Fan peng.fan at nxp.com
Wed Jul 25 02:57:21 UTC 2018


Hi Simon,

> -----Original Message-----
> From: sjg at google.com [mailto:sjg at google.com] On Behalf Of Simon Glass
> Sent: 2018年7月25日 10:46
> To: Peng Fan <peng.fan at nxp.com>
> Cc: U-Boot Mailing List <u-boot at lists.denx.de>; dl-linux-imx
> <linux-imx at nxp.com>; Sébastien Szymanski
> <sebastien.szymanski at armadeus.com>; Stefano Babic <sbabic at denx.de>
> Subject: Re: [PATCH 1/4] configs: opos6uldev: undef CONFIG_POWER_DOMAIN
> when SPL_BUILD
> 
> Hi Peng,
> 
> On 24 July 2018 at 01:45, Peng Fan <peng.fan at nxp.com> wrote:
> > Because CONFIG_POWER_DOMAIN is enabled in defconfig, however
> > driver/power/domain is not built for SPL, there is build failure when
> > power_domain_on added to device_probe.
> > Because power domain is not needed in SPL, let's undef it.
> >
> > Signed-off-by: Peng Fan <peng.fan at nxp.com>
> > Cc: "Sébastien Szymanski" <sebastien.szymanski at armadeus.com>
> > Cc: Stefano Babic <sbabic at denx.de>
> > ---
> >
> > Need to find a way to avoid SPL build failure in future patch, but in
> > this patchset let's undef CONFIG_POWER_DOMAIN first, because it is not
> > needed.
> >
> >  include/configs/opos6uldev.h | 1 +
> >  1 file changed, 1 insertion(+)
> 
> This should be handled by adding an SPL_POWER_DOMAIN option and
> converting existing uses to CONFIG_IS_ENABLED(POWER_DOMAIN)

The opos6uldev_defconfig has "CONFIG_POWER_DOMAIN=y", so when building
SPL, this macro is still effective.
Opos6uldev compiles driver/core/device.c which includes power-domain.h in my later patch.
Because driver/power/domain is not built for SPL, so build failure for SPL.

The simple method for now is to undef CONFIG_POWER_DOMAIN for SPL build.
If use CONFIG_IS_ENABLED, the undef CONFIG_POWER_DOMAIN will not be detected in Kconfig.

Simply introduce SPL_POWER_DOMAIN could not fix this issue. Need to let SPL choose CONFIG_SPL_POWER_DOMAIN,
but not CONFIG_POWER_DOMAIN, I do not have a clear idea on how.

Thanks,
Peng.

> 
> Regards,
> Simon


More information about the U-Boot mailing list