Message ID | 20180724074507.26949-1-peng.fan@nxp.com |
---|---|
State | Superseded |
Delegated to: | Jaehoon Chung |
Headers | show |
Series | [U-Boot,1/4] configs: opos6uldev: undef CONFIG_POWER_DOMAIN when SPL_BUILD | expand |
Hi Peng, On 24 July 2018 at 01:45, Peng Fan <peng.fan@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@nxp.com> > Cc: "Sébastien Szymanski" <sebastien.szymanski@armadeus.com> > Cc: Stefano Babic <sbabic@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) Regards, Simon
Hi Simon, > -----Original Message----- > From: sjg@google.com [mailto:sjg@google.com] On Behalf Of Simon Glass > Sent: 2018年7月25日 10:46 > To: Peng Fan <peng.fan@nxp.com> > Cc: U-Boot Mailing List <u-boot@lists.denx.de>; dl-linux-imx > <linux-imx@nxp.com>; Sébastien Szymanski > <sebastien.szymanski@armadeus.com>; Stefano Babic <sbabic@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@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@nxp.com> > > Cc: "Sébastien Szymanski" <sebastien.szymanski@armadeus.com> > > Cc: Stefano Babic <sbabic@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
Hi Peng, On 24 July 2018 at 20:57, Peng Fan <peng.fan@nxp.com> wrote: > Hi Simon, > >> -----Original Message----- >> From: sjg@google.com [mailto:sjg@google.com] On Behalf Of Simon Glass >> Sent: 2018年7月25日 10:46 >> To: Peng Fan <peng.fan@nxp.com> >> Cc: U-Boot Mailing List <u-boot@lists.denx.de>; dl-linux-imx >> <linux-imx@nxp.com>; Sébastien Szymanski >> <sebastien.szymanski@armadeus.com>; Stefano Babic <sbabic@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@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@nxp.com> >> > Cc: "Sébastien Szymanski" <sebastien.szymanski@armadeus.com> >> > Cc: Stefano Babic <sbabic@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. Here's how it works: 1. Have two separate Kconfig options: CONFIG_POWER_DOMAIN and CONFIG_SPL_POWER_DOMAIN 2. Enable CONFIG_POWER_DOMAIN in the board config, but not CONFIG_SPL_POWER_DOMAIN 3. Use CONFIG_IS_ENABLED(POWER_DOMAIN) everywhere (with if() or #if) 4. Now, U-Boot proper will support POWER_DOMAIN, but SPL will not The #undef mechanism is the old way of doing it, before we had CONFIG_IS_ENABLED Regards, Simon
Hi Simon, > >> > 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. > > Here's how it works: > > 1. Have two separate Kconfig options: CONFIG_POWER_DOMAIN and > CONFIG_SPL_POWER_DOMAIN 2. Enable CONFIG_POWER_DOMAIN in the > board config, but not CONFIG_SPL_POWER_DOMAIN 3. Use > CONFIG_IS_ENABLED(POWER_DOMAIN) everywhere (with if() or #if) 4. Now, > U-Boot proper will support POWER_DOMAIN, but SPL will not > > The #undef mechanism is the old way of doing it, before we had > CONFIG_IS_ENABLED > Just posted out V2 following your suggestion. Thanks, Peng. > Regards, > Simon
diff --git a/include/configs/opos6uldev.h b/include/configs/opos6uldev.h index b634d9eb03..75fefec0ac 100644 --- a/include/configs/opos6uldev.h +++ b/include/configs/opos6uldev.h @@ -15,6 +15,7 @@ #ifdef CONFIG_SPL_BUILD #undef CONFIG_DM_REGULATOR +#undef CONFIG_POWER_DOMAIN #endif #endif
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@nxp.com> Cc: "Sébastien Szymanski" <sebastien.szymanski@armadeus.com> Cc: Stefano Babic <sbabic@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(+)