Skip to contentSkip to conversation

ARM: spear: Fix build error with CONFIG_ARCH_SPEAR3XX

PATCH In review Chen Lifu 2 participants 3 messages Apr 9, 2021

Subsystems (4)
lore
Share & tools
lore

Chen Lifu

author
#0 lore raw

PATCH 1/1 ARM: spear: Fix build error with CONFIG_ARCH_SPEAR3XX

commit 77f983a9df42 ("spi: pl022: Use GPIOs looked up by the core")
deleted 'struct pl022_ssp_controller' member 'num_chipselect'.
We get build error when CONFIG_ARCH_SPEAR3XX is set:
arch/arm/mach-spear/spear3xx.c:42:3: error: 'struct pl022_ssp_controller' has no member named 'num_chipselect'
42 | .num_chipselect = 2,

      |   ^~~~~~~~~~~~~~

arch/arm/mach-spear/spear3xx.c:42:20: warning: initialization of 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
42 | .num_chipselect = 2,
| ^

Fix the issue by deleting the initialization of 'num_chipselect' in spear3xx.c.

Fixes 77f983a9df42 ("spi: pl022: Use GPIOs looked up by the core")
---
 arch/arm/mach-spear/spear3xx.c | 10 ----------
 1 file changed, 10 deletions(-)
arch/arm/mach-spear/spear3xx.c +0 -10
index 8537fcffe5a8..f83321d5e353 100644
@@ -30,16 +30,6 @@ struct pl022_ssp_controller pl022_plat_data = {
 	.dma_filter = pl08x_filter_id,
 	.dma_tx_param = "ssp0_tx",
 	.dma_rx_param = "ssp0_rx",
-	/*
-	 * This is number of spi devices that can be connected to spi. There are
-	 * two type of chipselects on which slave devices can work. One is chip
-	 * select provided by spi masters other is controlled through external
-	 * gpio's. We can't use chipselect provided from spi master (because as
-	 * soon as FIFO becomes empty, CS is disabled and transfer ends). So
-	 * this number now depends on number of gpios available for spi. each
-	 * slave on each master requires a separate gpio pin.
-	 */
-	.num_chipselect = 2,
 };
 
 /* dmac device registration */
#1 lore raw
Quoted 29 lines · Chen Lifu

commit 77f983a9df42 ("spi: pl022: Use GPIOs looked up by the core")
deleted 'struct pl022_ssp_controller' member 'num_chipselect'.
We get build error when CONFIG_ARCH_SPEAR3XX is set:
arch/arm/mach-spear/spear3xx.c:42:3: error: 'struct pl022_ssp_controller' has no member named 'num_chipselect'
42 | .num_chipselect = 2,

      |   ^~~~~~~~~~~~~~

arch/arm/mach-spear/spear3xx.c:42:20: warning: initialization of 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
42 | .num_chipselect = 2,
| ^

Fix the issue by deleting the initialization of 'num_chipselect' in spear3xx.c.

Fixes 77f983a9df42 ("spi: pl022: Use GPIOs looked up by the core")
---
 arch/arm/mach-spear/spear3xx.c | 10 ----------
 1 file changed, 10 deletions(-)
arch/arm/mach-spear/spear3xx.c +0 -1
index 8537fcffe5a8..f83321d5e353 100644
@@ -30,16 +30,6 @@ struct pl022_ssp_controller pl022_plat_data = {
 	.dma_filter = pl08x_filter_id,
 	.dma_tx_param = "ssp0_tx",
 	.dma_rx_param = "ssp0_rx",
-	/*

arch/arm/mach-spear/spear3xx.c struct pl022_ssp_controller pl022_plat_data = { · line 33

Quoted 10 lines
arch/arm/mach-spear/spear3xx.c +0 -9
-	 * This is number of spi devices that can be connected to spi. There are
-	 * two type of chipselects on which slave devices can work. One is chip
-	 * select provided by spi masters other is controlled through external
-	 * gpio's. We can't use chipselect provided from spi master (because as
-	 * soon as FIFO becomes empty, CS is disabled and transfer ends). So
-	 * this number now depends on number of gpios available for spi. each
-	 * slave on each master requires a separate gpio pin.
-	 */
-	.num_chipselect = 2,
 };

A patch is already applied by Mark to fix this issue.

Signature · 1 line
viresh
author
#2 lore raw
Quoted 34 lines · Viresh Kumar
Quoted 33 lines · Chen Lifu

commit 77f983a9df42 ("spi: pl022: Use GPIOs looked up by the core")
deleted 'struct pl022_ssp_controller' member 'num_chipselect'.
We get build error when CONFIG_ARCH_SPEAR3XX is set:
arch/arm/mach-spear/spear3xx.c:42:3: error: 'struct pl022_ssp_controller' has no member named 'num_chipselect'

    42 |  .num_chipselect = 2,
       |   ^~~~~~~~~~~~~~
arch/arm/mach-spear/spear3xx.c:42:20: warning: initialization of 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    42 |  .num_chipselect = 2,
       |                    ^

Fix the issue by deleting the initialization of 'num_chipselect' in spear3xx.c.

Fixes 77f983a9df42 ("spi: pl022: Use GPIOs looked up by the core")
---
  arch/arm/mach-spear/spear3xx.c | 10 ----------
  1 file changed, 10 deletions(-)
arch/arm/mach-spear/spear3xx.c +0 -5
index 8537fcffe5a8..f83321d5e353 100644
@@ -30,16 +30,6 @@ struct pl022_ssp_controller pl022_plat_data = {
  	.dma_filter = pl08x_filter_id,
  	.dma_tx_param = "ssp0_tx",
  	.dma_rx_param = "ssp0_rx",
-	/*
-	 * This is number of spi devices that can be connected to spi. There are
-	 * two type of chipselects on which slave devices can work. One is chip
-	 * select provided by spi masters other is controlled through external
-	 * gpio's. We can't use chipselect provided from spi master (because as
Quoted 9 lines

arch/arm/mach-spear/spear3xx.c struct pl022_ssp_controller pl022_plat_data = { · line 33

Quoted 6 lines
arch/arm/mach-spear/spear3xx.c +0 -5
-	 * soon as FIFO becomes empty, CS is disabled and transfer ends). So
-	 * this number now depends on number of gpios available for spi. each
-	 * slave on each master requires a separate gpio pin.
-	 */
-	.num_chipselect = 2,
  };

A patch is already applied by Mark to fix this issue.

Thanks.

---
Chen Lifu