Skip to contentSkip to conversation

spi: bcm63xx: fix shared reset

PATCH In review Álvaro Fernández Rojas 5 participants 9 messages May 29, 2025 – Jun 5, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spi: bcm63xx: fix shared reset

Some bmips SoCs (bcm6362, bcm63268) share the same SPI reset for both SPI and HSSPI controllers, so reset shouldn't be exclusive.

Álvaro Fernández Rojas (2):
spi: bcm63xx-spi: fix shared reset
spi: bcm63xx-hsspi: fix shared reset

 drivers/spi/spi-bcm63xx-hsspi.c | 2 +-
 drivers/spi/spi-bcm63xx.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.39.5
#1 lore raw

PATCH 1/1 spi: bcm63xx-spi: fix shared reset

Some bmips SoCs (bcm6362, bcm63268) share the same SPI reset for both SPI and HSSPI controllers, so reset shouldn't be exclusive.

Fixes 38807adeaf1e ("spi: bcm63xx-spi: add reset support")
---
 drivers/spi/spi-bcm63xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-bcm63xx.c +1 -1
index c8f64ec69344..b56210734caa 100644
@@ -523,7 +523,7 @@ static int bcm63xx_spi_probe(struct platform_device *pdev)
 		return PTR_ERR(clk);
 	}
 
-	reset = devm_reset_control_get_optional_exclusive(dev, NULL);
+	reset = devm_reset_control_get_optional_shared(dev, NULL);
 	if (IS_ERR(reset))
 		return PTR_ERR(reset);
 
Signature · 1 line
2.39.5
Reviewed-by on v1 1/1
#2 lore raw

Re: [PATCH] spi: bcm63xx-spi: fix shared reset

Quoted 6 lines · Álvaro Fernández Rojas

Some bmips SoCs (bcm6362, bcm63268) share the same SPI reset for both SPI and HSSPI controllers, so reset shouldn't be exclusive.

Fixes 38807adeaf1e ("spi: bcm63xx-spi: add reset support")
Signature · 1 line
Florian
maintainer
#3 lore raw

Re: [PATCH] spi: bcm63xx-spi: fix shared reset

In reply to Álvaro Fernández Rojas
Quoted 4 lines · Álvaro Fernández Rojas

Some bmips SoCs (bcm6362, bcm63268) share the same SPI reset for both SPI and HSSPI controllers, so reset shouldn't be exclusive.

Applied to

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

Thanks!

[1/1] spi: bcm63xx-spi: fix shared reset

      commit: 5ad20e3d8cfe3b2e42bbddc7e0ebaa74479bb589

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

#4 lore raw

PATCH 1/1 spi: bcm63xx-hsspi: fix shared reset

In reply to Álvaro Fernández Rojas

Some bmips SoCs (bcm6362, bcm63268) share the same SPI reset for both SPI and HSSPI controllers, so reset shouldn't be exclusive.

Fixes 0eeadddbf09a ("spi: bcm63xx-hsspi: add reset support")
---
 drivers/spi/spi-bcm63xx-hsspi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-bcm63xx-hsspi.c +1 -1
index 644b44d2aef2..18261cbd413b 100644
@@ -745,7 +745,7 @@ static int bcm63xx_hsspi_probe(struct platform_device *pdev)
 	if (IS_ERR(clk))
 		return PTR_ERR(clk);
 
-	reset = devm_reset_control_get_optional_exclusive(dev, NULL);
+	reset = devm_reset_control_get_optional_shared(dev, NULL);
 	if (IS_ERR(reset))
 		return PTR_ERR(reset);
 
Signature · 1 line
2.39.5
Reviewed-by on v1 1/1
#5 lore raw

Re: [PATCH] spi: bcm63xx-hsspi: fix shared reset

Quoted 6 lines · Álvaro Fernández Rojas

Some bmips SoCs (bcm6362, bcm63268) share the same SPI reset for both SPI and HSSPI controllers, so reset shouldn't be exclusive.

Fixes 0eeadddbf09a ("spi: bcm63xx-hsspi: add reset support")
Signature · 1 line
Florian
maintainer
#6 lore raw

Re: [PATCH] spi: bcm63xx-hsspi: fix shared reset

In reply to Álvaro Fernández Rojas
Quoted 4 lines · Álvaro Fernández Rojas

Some bmips SoCs (bcm6362, bcm63268) share the same SPI reset for both SPI and HSSPI controllers, so reset shouldn't be exclusive.

Applied to

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

Thanks!

[1/1] spi: bcm63xx-hsspi: fix shared reset

      commit: 3d6d84c8f2f66d3fd6a43a1e2ce8e6b54c573960

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

#7 lore raw
In reply to Álvaro Fernández Rojas
Quoted 5 lines · Álvaro Fernández Rojas

Some bmips SoCs (bcm6362, bcm63268) share the same SPI reset for both SPI and HSSPI controllers, so reset shouldn't be exclusive.

Álvaro Fernández Rojas (2):
spi: bcm63xx-spi: fix shared reset

Both drivers currently enable the SPI clock before triggering a reset. Can the hardware cope with being reset before the clock is enabled? That could happen for the second device to be bound [1], unless the SPI clock is shared as well or already running for another reason.

[1] https://docs.kernel.org/driver-api/reset.html#triggering

regards
Philipp

maintainer
#8 lore raw
Quoted 8 lines · Philipp Zabel
Quoted 5 lines · Álvaro Fernández Rojas

Some bmips SoCs (bcm6362, bcm63268) share the same SPI reset for both SPI and HSSPI controllers, so reset shouldn't be exclusive.

Álvaro Fernández Rojas (2):
spi: bcm63xx-spi: fix shared reset

Quoted 6 lines

Both drivers currently enable the SPI clock before triggering a reset. Can the hardware cope with being reset before the clock is enabled? That could happen for the second device to be bound [1], unless the SPI clock is shared as well or already running for another reason.

[1] https://docs.kernel.org/driver-api/reset.html#triggering

In a completely unscientific test, I disabled both SPI clocks and triggered the reset, and the hardware didn't seem to mind. It also didn't seem to have any observable effect, as all registers I checked kept their previous values (both with and without clocks enabled). Neither disabling the clocks nor asserting the reset prevented my from reading the registers of either block, so their effects seem to be rather limited.

That being said, the bootloader (in the one device I tested) seems to keep both clocks enabled, so they would still both be enabled during the reset of whichever is probed first.

Regards,
Jonas