linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: dw: fix build error by selecting MULTIPLEXER
@ 2020-11-16  4:07 Randy Dunlap
  2020-11-16 19:52 ` Serge Semin
  2020-11-27 14:46 ` [PATCH v2] spi: dw-bt1: Fix undefined devm_mux_control_get symbol Serge Semin
  0 siblings, 2 replies; 4+ messages in thread
From: Randy Dunlap @ 2020-11-16  4:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, kernel test robot, Serge Semin, Ramil Zaripov,
	Mark Brown, linux-spi

Fix build error for spi-dw-bt1.o by selecting MULTIPLEXER.

hppa-linux-ld: drivers/spi/spi-dw-bt1.o: in function `dw_spi_bt1_sys_init':
(.text+0x1ac): undefined reference to `devm_mux_control_get'

Fixes: abf00907538e ("spi: dw: Add Baikal-T1 SPI Controller glue driver")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Cc: Ramil Zaripov <Ramil.Zaripov@baikalelectronics.ru>
Cc: Mark Brown <broonie@kernel.org>
Cc: linux-spi@vger.kernel.org
---
 drivers/spi/Kconfig |    1 +
 1 file changed, 1 insertion(+)

--- linux-next-20201113.orig/drivers/spi/Kconfig
+++ linux-next-20201113/drivers/spi/Kconfig
@@ -255,6 +255,7 @@ config SPI_DW_MMIO
 config SPI_DW_BT1
 	tristate "Baikal-T1 SPI driver for DW SPI core"
 	depends on MIPS_BAIKAL_T1 || COMPILE_TEST
+	select MULTIPLEXER
 	help
 	  Baikal-T1 SoC is equipped with three DW APB SSI-based MMIO SPI
 	  controllers. Two of them are pretty much normal: with IRQ, DMA,

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] spi: dw: fix build error by selecting MULTIPLEXER
  2020-11-16  4:07 [PATCH] spi: dw: fix build error by selecting MULTIPLEXER Randy Dunlap
@ 2020-11-16 19:52 ` Serge Semin
  2020-11-27 14:46 ` [PATCH v2] spi: dw-bt1: Fix undefined devm_mux_control_get symbol Serge Semin
  1 sibling, 0 replies; 4+ messages in thread
From: Serge Semin @ 2020-11-16 19:52 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Serge Semin, linux-kernel, kernel test robot, Ramil Zaripov,
	Mark Brown, linux-spi

Hello Randy

On Sun, Nov 15, 2020 at 08:07:21PM -0800, Randy Dunlap wrote:
> Fix build error for spi-dw-bt1.o by selecting MULTIPLEXER.
> 
> hppa-linux-ld: drivers/spi/spi-dw-bt1.o: in function `dw_spi_bt1_sys_init':
> (.text+0x1ac): undefined reference to `devm_mux_control_get'

Thank you very much.
Acked-by: Serge Semin <fancer.lancer@gmail.com>

-Sergey

> 
> Fixes: abf00907538e ("spi: dw: Add Baikal-T1 SPI Controller glue driver")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> Cc: Ramil Zaripov <Ramil.Zaripov@baikalelectronics.ru>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: linux-spi@vger.kernel.org
> ---
>  drivers/spi/Kconfig |    1 +
>  1 file changed, 1 insertion(+)
> 
> --- linux-next-20201113.orig/drivers/spi/Kconfig
> +++ linux-next-20201113/drivers/spi/Kconfig
> @@ -255,6 +255,7 @@ config SPI_DW_MMIO
>  config SPI_DW_BT1
>  	tristate "Baikal-T1 SPI driver for DW SPI core"
>  	depends on MIPS_BAIKAL_T1 || COMPILE_TEST
> +	select MULTIPLEXER
>  	help
>  	  Baikal-T1 SoC is equipped with three DW APB SSI-based MMIO SPI
>  	  controllers. Two of them are pretty much normal: with IRQ, DMA,

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] spi: dw-bt1: Fix undefined devm_mux_control_get symbol
  2020-11-16  4:07 [PATCH] spi: dw: fix build error by selecting MULTIPLEXER Randy Dunlap
  2020-11-16 19:52 ` Serge Semin
@ 2020-11-27 14:46 ` Serge Semin
  2020-11-27 16:20   ` Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Serge Semin @ 2020-11-27 14:46 UTC (permalink / raw)
  To: Mark Brown, Ramil Zaripov
  Cc: Serge Semin, Serge Semin, kernel test robot, Randy Dunlap,
	linux-spi, linux-kernel

I mistakenly added the select attributes to the SPI_DW_BT1_DIRMAP config
instead of having them defined in SPI_DW_BT1. If the kernel doesn't have
the MULTIPLEXER and MUX_MMIO configs manually enabled and the
SPI_DW_BT1_DIRMAP config hasn't been selected, Baikal-T1 SPI device will
always fail to be probed by the driver. Fix that and the error reported by
the test robot:

>> ld.lld: error: undefined symbol: devm_mux_control_get
   >>> referenced by spi-dw-bt1.c
   >>> spi/spi-dw-bt1.o:(dw_spi_bt1_sys_init) in archive drivers/built-in.a

by moving the MULTIPLEXER/MUX_MMIO configs selection to the SPI_DW_BT1
config.

Link: https://lore.kernel.org/lkml/202011161745.uYRlekse-lkp@intel.com/
Link: https://lore.kernel.org/linux-spi/20201116040721.8001-1-rdunlap@infradead.org/
Fixes: abf00907538e ("spi: dw: Add Baikal-T1 SPI Controller glue driver")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Ramil Zaripov <Ramil.Zaripov@baikalelectronics.ru>

---

Mark, I see you haven't applied the previous version of the patch yet. So
please replace it with this one.

Randy, sorry for resending the patch. I've just realized that your
solution doesn't completely fix the problem. Yeah, the kernel build won't
fail to be linked after your patch being merged, but the driver still will
fail to probe the device if the MULTIPLEXER and MUX_MMIO haven't been
selected for the kernel. So the select attributes need to be moved from
SPI_DW_BT1_DIRMAP to the SPI_DW_BT1 config.
---
 drivers/spi/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index 415d57b2057f..0707068ffe47 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -255,6 +255,8 @@ config SPI_DW_MMIO
 config SPI_DW_BT1
 	tristate "Baikal-T1 SPI driver for DW SPI core"
 	depends on MIPS_BAIKAL_T1 || COMPILE_TEST
+	select MULTIPLEXER
+	select MUX_MMIO
 	help
 	  Baikal-T1 SoC is equipped with three DW APB SSI-based MMIO SPI
 	  controllers. Two of them are pretty much normal: with IRQ, DMA,
@@ -268,8 +270,6 @@ config SPI_DW_BT1
 config SPI_DW_BT1_DIRMAP
 	bool "Directly mapped Baikal-T1 Boot SPI flash support"
 	depends on SPI_DW_BT1
-	select MULTIPLEXER
-	select MUX_MMIO
 	help
 	  Directly mapped SPI flash memory is an interface specific to the
 	  Baikal-T1 System Boot Controller. It is a 16MB MMIO region, which
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] spi: dw-bt1: Fix undefined devm_mux_control_get symbol
  2020-11-27 14:46 ` [PATCH v2] spi: dw-bt1: Fix undefined devm_mux_control_get symbol Serge Semin
@ 2020-11-27 16:20   ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2020-11-27 16:20 UTC (permalink / raw)
  To: Serge Semin, Ramil Zaripov
  Cc: linux-spi, Randy Dunlap, kernel test robot, Serge Semin, linux-kernel

On Fri, 27 Nov 2020 17:46:11 +0300, Serge Semin wrote:
> I mistakenly added the select attributes to the SPI_DW_BT1_DIRMAP config
> instead of having them defined in SPI_DW_BT1. If the kernel doesn't have
> the MULTIPLEXER and MUX_MMIO configs manually enabled and the
> SPI_DW_BT1_DIRMAP config hasn't been selected, Baikal-T1 SPI device will
> always fail to be probed by the driver. Fix that and the error reported by
> the test robot:
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: dw-bt1: Fix undefined devm_mux_control_get symbol
      commit: 7218838109fef61cdec988ff728e902d434c9cc5

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-27 16:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-16  4:07 [PATCH] spi: dw: fix build error by selecting MULTIPLEXER Randy Dunlap
2020-11-16 19:52 ` Serge Semin
2020-11-27 14:46 ` [PATCH v2] spi: dw-bt1: Fix undefined devm_mux_control_get symbol Serge Semin
2020-11-27 16:20   ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).