2019-04-24 08:08:53

by Yue Haibing

[permalink] [raw]
Subject: [PATCH] soc: imx: Fix build error without CONFIG_SOC_BUS

From: YueHaibing <[email protected]>

During randconfig builds, I occasionally run into an invalid configuration

drivers/soc/imx/soc-imx8.o: In function `imx8_soc_init':
soc-imx8.c:(.init.text+0x144): undefined reference to `soc_device_register'

while CONFIG_SOC_BUS is not set, the building failed like this. This patch
selects SOC_BUS to fix it.

Reported-by: Hulk Robot <[email protected]>
Fixes: a7e26f356ca1 ("soc: imx: Add generic i.MX8 SoC driver")
Signed-off-by: YueHaibing <[email protected]>
---
drivers/soc/imx/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/soc/imx/Kconfig b/drivers/soc/imx/Kconfig
index d80f899..2fb4e47 100644
--- a/drivers/soc/imx/Kconfig
+++ b/drivers/soc/imx/Kconfig
@@ -5,6 +5,7 @@ config IMX_GPCV2_PM_DOMAINS
depends on ARCH_MXC || (COMPILE_TEST && OF)
depends on PM
select PM_GENERIC_DOMAINS
+ select SOC_BUS
default y if SOC_IMX7D

endmenu
--
2.7.4



2019-04-24 08:50:05

by Yue Haibing

[permalink] [raw]
Subject: Re: [PATCH] soc: imx: Fix build error without CONFIG_SOC_BUS

On 2019/4/24 16:11, Leonard Crestez wrote:
> On 4/24/2019 11:00 AM, Yue Haibing wrote:
>> From: YueHaibing <[email protected]>
>>
>> During randconfig builds, I occasionally run into an invalid configuration
>>
>> drivers/soc/imx/soc-imx8.o: In function `imx8_soc_init':
>> soc-imx8.c:(.init.text+0x144): undefined reference to `soc_device_register'
>>
>> while CONFIG_SOC_BUS is not set, the building failed like this. This patch
>> selects SOC_BUS to fix it.
>>
>> diff --git a/drivers/soc/imx/Kconfig b/drivers/soc/imx/Kconfig
>> @@ -5,6 +5,7 @@ config IMX_GPCV2_PM_DOMAINS
>> depends on ARCH_MXC || (COMPILE_TEST && OF)
>> depends on PM
>> select PM_GENERIC_DOMAINS
>> + select SOC_BUS
>> default y if SOC_IMX7D
>
> You should "select SOC_BUS" from "config ARCH_MXC" in arm64
> Kconfig.platforms, not from a power domain implementation.
>
> Your patch works because arm64 ARCH_MXC currently does "select
> IMX_GPCV2_PM_DOMAINS" but it's silly to use this intermediary.

Yes, you are right, thanks!

>
> --
> Regards,
> Leonard
>
>

2019-04-24 09:17:43

by Yue Haibing

[permalink] [raw]
Subject: [PATCH v2] soc: imx: Fix build error without CONFIG_SOC_BUS

From: YueHaibing <[email protected]>

During randconfig builds, I occasionally run into an invalid configuration

drivers/soc/imx/soc-imx8.o: In function `imx8_soc_init':
soc-imx8.c:(.init.text+0x144): undefined reference to `soc_device_register'

while CONFIG_SOC_BUS is not set, the building failed like this. This patch
selects SOC_BUS to fix it.

Reported-by: Hulk Robot <[email protected]>
Fixes: a7e26f356ca1 ("soc: imx: Add generic i.MX8 SoC driver")
Suggested-by: Leonard Crestez <[email protected]>
Signed-off-by: YueHaibing <[email protected]>
---
v2: select SOC_BUS from CONFIG_ARCH_MXC directly
---
arch/arm64/Kconfig.platforms | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index b5ca9c5..ae7f008 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -157,6 +157,7 @@ config ARCH_MXC
select IMX_GPCV2_PM_DOMAINS
select PM
select PM_GENERIC_DOMAINS
+ select SOC_BUS
help
This enables support for the ARMv8 based SoCs in the
NXP i.MX family.
--
2.7.4


2019-04-24 10:02:55

by Leonard Crestez

[permalink] [raw]
Subject: Re: [PATCH v2] soc: imx: Fix build error without CONFIG_SOC_BUS

On 24.04.2019 12:16, Yue Haibing wrote:
> From: YueHaibing <[email protected]>
>
> During randconfig builds, I occasionally run into an invalid configuration
>
> drivers/soc/imx/soc-imx8.o: In function `imx8_soc_init':
> soc-imx8.c:(.init.text+0x144): undefined reference to `soc_device_register'
>
> while CONFIG_SOC_BUS is not set, the building failed like this. This patch
> selects SOC_BUS to fix it.
>
> Reported-by: Hulk Robot <[email protected]>
> Fixes: a7e26f356ca1 ("soc: imx: Add generic i.MX8 SoC driver")
> Suggested-by: Leonard Crestez <[email protected]>
> Signed-off-by: YueHaibing <[email protected]>

Reviewed-by: Leonard Crestez <[email protected]>

2019-04-24 11:01:09

by Leonard Crestez

[permalink] [raw]
Subject: Re: [PATCH] soc: imx: Fix build error without CONFIG_SOC_BUS

On 4/24/2019 11:00 AM, Yue Haibing wrote:
> From: YueHaibing <[email protected]>
>
> During randconfig builds, I occasionally run into an invalid configuration
>
> drivers/soc/imx/soc-imx8.o: In function `imx8_soc_init':
> soc-imx8.c:(.init.text+0x144): undefined reference to `soc_device_register'
>
> while CONFIG_SOC_BUS is not set, the building failed like this. This patch
> selects SOC_BUS to fix it.
>
> diff --git a/drivers/soc/imx/Kconfig b/drivers/soc/imx/Kconfig
> @@ -5,6 +5,7 @@ config IMX_GPCV2_PM_DOMAINS
> depends on ARCH_MXC || (COMPILE_TEST && OF)
> depends on PM
> select PM_GENERIC_DOMAINS
> + select SOC_BUS
> default y if SOC_IMX7D

You should "select SOC_BUS" from "config ARCH_MXC" in arm64
Kconfig.platforms, not from a power domain implementation.

Your patch works because arm64 ARCH_MXC currently does "select
IMX_GPCV2_PM_DOMAINS" but it's silly to use this intermediary.

--
Regards,
Leonard

2019-05-12 01:26:12

by Shawn Guo

[permalink] [raw]
Subject: Re: [PATCH v2] soc: imx: Fix build error without CONFIG_SOC_BUS

On Wed, Apr 24, 2019 at 05:15:17PM +0800, Yue Haibing wrote:
> From: YueHaibing <[email protected]>
>
> During randconfig builds, I occasionally run into an invalid configuration
>
> drivers/soc/imx/soc-imx8.o: In function `imx8_soc_init':
> soc-imx8.c:(.init.text+0x144): undefined reference to `soc_device_register'
>
> while CONFIG_SOC_BUS is not set, the building failed like this. This patch
> selects SOC_BUS to fix it.
>
> Reported-by: Hulk Robot <[email protected]>
> Fixes: a7e26f356ca1 ("soc: imx: Add generic i.MX8 SoC driver")
> Suggested-by: Leonard Crestez <[email protected]>
> Signed-off-by: YueHaibing <[email protected]>
> ---
> v2: select SOC_BUS from CONFIG_ARCH_MXC directly
> ---

So this becomes a 'arm64: imx: ' change. I updated the subject prefix
and applied the patch.

Shawn