2020-01-16 06:25:01

by Peng Fan

[permalink] [raw]
Subject: [PATCH 0/4] soc: imx: increase build coverage for imx8 soc driver

From: Peng Fan <[email protected]>

Rename soc-imx8.c to soc-imx8m.c which is for i.MX8M family
Add SOC_IMX8M for build gate soc-imx8m.c
Increase build coverage for i.MX SoC driver

Peng Fan (4):
soc: imx: Kconfig: add SOC_IMX8M entry
arm64: defconfig: Enable CONFIG_SOC_IMX8M by default
soc: Makefile: increase build coverage for i.MX
soc: imx: Use CONFIG_SOC_IMX8M as build gate

arch/arm64/configs/defconfig | 1 +
drivers/soc/Makefile | 2 +-
drivers/soc/imx/Kconfig | 8 ++++++++
drivers/soc/imx/Makefile | 2 +-
drivers/soc/imx/{soc-imx8.c => soc-imx8m.c} | 0
5 files changed, 11 insertions(+), 2 deletions(-)
rename drivers/soc/imx/{soc-imx8.c => soc-imx8m.c} (100%)

--
2.16.4


2020-01-20 12:46:44

by Leonard Crestez

[permalink] [raw]
Subject: Re: [PATCH 0/4] soc: imx: increase build coverage for imx8 soc driver

On 16.01.2020 05:48, Peng Fan wrote:
> From: Peng Fan <[email protected]>
>
> Rename soc-imx8.c to soc-imx8m.c which is for i.MX8M family
> Add SOC_IMX8M for build gate soc-imx8m.c
> Increase build coverage for i.MX SoC driver
>
> Peng Fan (4):
> soc: imx: Kconfig: add SOC_IMX8M entry
> arm64: defconfig: Enable CONFIG_SOC_IMX8M by default
> soc: Makefile: increase build coverage for i.MX
> soc: imx: Use CONFIG_SOC_IMX8M as build gate
>
> arch/arm64/configs/defconfig | 1 +
> drivers/soc/Makefile | 2 +-
> drivers/soc/imx/Kconfig | 8 ++++++++
> drivers/soc/imx/Makefile | 2 +-
> drivers/soc/imx/{soc-imx8.c => soc-imx8m.c} | 0
> 5 files changed, 11 insertions(+), 2 deletions(-)
> rename drivers/soc/imx/{soc-imx8.c => soc-imx8m.c} (100%)

I applied your patches and compiletest failed for me on x86:

../drivers/soc/imx/gpcv2.c: In function ?imx_gpcv2_probe?:
../drivers/soc/imx/gpcv2.c:561:21: error: ?SZ_4K? undeclared (first use
in this function)
.max_register = SZ_4K,
^~~~~
../drivers/soc/imx/gpcv2.c:561:21: note: each undeclared identifier is
reported only once for each function it appears in

It seems that on x86 <linux/sizes.h> needs to be included explicitly
while on arm it is already included indirectly through arch headers. Fix
is very simple:

diff --git drivers/soc/imx/gpcv2.c drivers/soc/imx/gpcv2.c
index b0dffb06c05d..6cf8a7a412bd 100644
--- drivers/soc/imx/gpcv2.c
+++ drivers/soc/imx/gpcv2.c
@@ -14,6 +14,7 @@
#include <linux/pm_domain.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
+#include <linux/sizes.h>
#include <dt-bindings/power/imx7-power.h>
#include <dt-bindings/power/imx8mq-power.h>

---

My test looks like this:

make O=build_compiletest defconfig
make O=build_compiletest allmodconfig
echo CONFIG_COMPILE_TEST=y >> build_compiletest/.config
make O=build_compiletest "$@"

Other than this:

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