Skip to contentSkip to conversation

memory: omap-gpmc: Fix compile test on SPARC

PATCH Applied Krzysztof Kozlowski 2 participants 6 messages Sep 11, 2020 – Sep 16, 2020 Memory controller drivers

lore
Share & tools
lore

Krzysztof Kozlowski

author maintainer
#0 lore raw

PATCH 1/1 memory: omap-gpmc: Fix compile test on SPARC

SPARC comes without CONFIG_OF_ADDRESS thus compile testing fails on linking:

/usr/bin/sparc64-linux-gnu-ld: drivers/memory/omap-gpmc.o: in function `gpmc_probe_generic_child':
omap-gpmc.c:(.text.unlikely+0x14ec): undefined reference to `of_platform_device_create'

Fixes ea0c0ad6b6eb ("memory: Enable compile testing for most of the drivers")
---
 drivers/memory/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/memory/Kconfig +1 -0
index 8072204bc21a..00e013b14703 100644
@@ -104,6 +104,7 @@ config TI_EMIF
 
 config OMAP_GPMC
 	bool "Texas Instruments OMAP SoC GPMC driver" if COMPILE_TEST
+	depends on OF_ADDRESS
 	select GPIOLIB
 	help
 	  This driver is for the General Purpose Memory Controller (GPMC)
Signature · 1 line
2.17.1
#1 lore raw

Hi Krzysztof,

Quoted 17 lines · Krzysztof Kozlowski

SPARC comes without CONFIG_OF_ADDRESS thus compile testing fails on linking:

/usr/bin/sparc64-linux-gnu-ld: drivers/memory/omap-gpmc.o: in function `gpmc_probe_generic_child':

   omap-gpmc.c:(.text.unlikely+0x14ec): undefined reference to `of_platform_device_create'
Fixes ea0c0ad6b6eb ("memory: Enable compile testing for most of the drivers")
---
  drivers/memory/Kconfig | 1 +
  1 file changed, 1 insertion(+)
drivers/memory/Kconfig +0 -0
index 8072204bc21a..00e013b14703 100644

drivers/memory/Kconfig config TI_EMIF · line 107

Quoted 4 lines
drivers/memory/Kconfig +1 -0
@@ -104,6 +104,7 @@ config TI_EMIF
 
  config OMAP_GPMC
  	bool "Texas Instruments OMAP SoC GPMC driver" if COMPILE_TEST
+	depends on OF_ADDRESS

but of_platform_device_create() is defined in platform.c which gets built irrespective of OF_ADDRESS.

Maybe we need to just depend on CONFIG_OF ?

drivers/memory/Kconfig config TI_EMIF · line 110

Quoted 4 lines
drivers/memory/Kconfig +0 -0
  	select GPIOLIB
  	help
  	  This driver is for the General Purpose Memory Controller (GPMC)

cheers,
-roger

Signature · 2 lines
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
author maintainer
#2 lore raw
Quoted 22 lines · Roger Quadros

Hi Krzysztof,

Quoted 18 lines · Krzysztof Kozlowski

SPARC comes without CONFIG_OF_ADDRESS thus compile testing fails on linking:

/usr/bin/sparc64-linux-gnu-ld: drivers/memory/omap-gpmc.o: in function `gpmc_probe_generic_child':

   omap-gpmc.c:(.text.unlikely+0x14ec): undefined reference to `of_platform_device_create'
Fixes ea0c0ad6b6eb ("memory: Enable compile testing for most of the drivers")
---
  drivers/memory/Kconfig | 1 +
  1 file changed, 1 insertion(+)
drivers/memory/Kconfig +0 -0
index 8072204bc21a..00e013b14703 100644
@@ -104,6 +104,7 @@ config TI_EMIF
 
Quoted 8 lines

drivers/memory/Kconfig config TI_EMIF · line 107

Quoted 3 lines
drivers/memory/Kconfig +1 -0
  config OMAP_GPMC
      bool "Texas Instruments OMAP SoC GPMC driver" if COMPILE_TEST
+     depends on OF_ADDRESS

but of_platform_device_create() is defined in platform.c which gets built irrespective of OF_ADDRESS.

Maybe we need to just depend on CONFIG_OF ?

No, the of_platform_device_create() is defined there within #ifdef CONFIG_OF_ADDRESS

The CONFIG_OF was already selected and was not enough.

Other solution is "depends on !SPARC"...

Best regards,
Krzysztof

#3 lore raw
Quoted 30 lines · Krzysztof Kozlowski
Quoted 29 lines · Roger Quadros

Hi Krzysztof,

Quoted 17 lines · Krzysztof Kozlowski

SPARC comes without CONFIG_OF_ADDRESS thus compile testing fails on linking:

/usr/bin/sparc64-linux-gnu-ld: drivers/memory/omap-gpmc.o: in function `gpmc_probe_generic_child':
omap-gpmc.c:(.text.unlikely+0x14ec): undefined reference to `of_platform_device_create'

Fixes ea0c0ad6b6eb ("memory: Enable compile testing for most of the drivers")
---
   drivers/memory/Kconfig | 1 +
   1 file changed, 1 insertion(+)
drivers/memory/Kconfig +0 -0
index 8072204bc21a..00e013b14703 100644

drivers/memory/Kconfig config TI_EMIF · line 107

Quoted 4 lines
drivers/memory/Kconfig +1 -0
@@ -104,6 +104,7 @@ config TI_EMIF
 
   config OMAP_GPMC
       bool "Texas Instruments OMAP SoC GPMC driver" if COMPILE_TEST
+     depends on OF_ADDRESS

but of_platform_device_create() is defined in platform.c which gets built irrespective of OF_ADDRESS.

Quoted 9 lines
Quoted 1 line

Maybe we need to just depend on CONFIG_OF ?

No, the of_platform_device_create() is defined there within #ifdef CONFIG_OF_ADDRESS

The CONFIG_OF was already selected and was not enough.

Other solution is "depends on !SPARC"...

OK. In that case this patch is better.

cheers,
-roger

Signature · 2 lines
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Acked-by on v1 1/1
#4 lore raw
In reply to Krzysztof Kozlowski
Quoted 8 lines · Krzysztof Kozlowski

SPARC comes without CONFIG_OF_ADDRESS thus compile testing fails on linking:

/usr/bin/sparc64-linux-gnu-ld: drivers/memory/omap-gpmc.o: in function `gpmc_probe_generic_child':

   omap-gpmc.c:(.text.unlikely+0x14ec): undefined reference to `of_platform_device_create'
Fixes ea0c0ad6b6eb ("memory: Enable compile testing for most of the drivers")
Quoted 17 lines
---
  drivers/memory/Kconfig | 1 +
  1 file changed, 1 insertion(+)
drivers/memory/Kconfig +1 -0
index 8072204bc21a..00e013b14703 100644
@@ -104,6 +104,7 @@ config TI_EMIF
 
  config OMAP_GPMC
  	bool "Texas Instruments OMAP SoC GPMC driver" if COMPILE_TEST
+	depends on OF_ADDRESS
  	select GPIOLIB
  	help
  	  This driver is for the General Purpose Memory Controller (GPMC)
Signature · 2 lines
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
author maintainer Applied
#5 lore raw
In reply to Krzysztof Kozlowski
Quoted 11 lines · Krzysztof Kozlowski

SPARC comes without CONFIG_OF_ADDRESS thus compile testing fails on linking:

/usr/bin/sparc64-linux-gnu-ld: drivers/memory/omap-gpmc.o: in function `gpmc_probe_generic_child':
omap-gpmc.c:(.text.unlikely+0x14ec): undefined reference to `of_platform_device_create'

Fixes ea0c0ad6b6eb ("memory: Enable compile testing for most of the drivers")
---
 drivers/memory/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Applied.

Best regards,
Krzysztof