Enhance soft spi performance
cover Enhance soft spi performance
From: Jean-Marie Verdun <[email protected]>
v1
Add a test to enhance soft spi performance when delay is set to 0
Jean-Marie Verdun (1):
soft_spi performance enhancement
drivers/spi/soft_spi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Signature · 1 line
2.43.0
PATCH 1/1 soft_spi performance enhancement
From: Jean-Marie Verdun <[email protected]>
Add a test when delay is set to 0 to improve performances by 20% on ARM based systems
--- drivers/spi/soft_spi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/spi/soft_spi.c +4 -2
@@ -173,7 +173,8 @@ static int soft_spi_xfer(struct udevice *dev, unsigned int bitlen,soft_spi_scl (dev, !cidle);if ((txrx &SPI_MASTER_NO_TX ) ==0 )soft_spi_sda (dev, !!(tmpdout &0x80 )); -udelay (plat->spi_delay_us); +if (plat->spi_delay_us) +udelay (plat->spi_delay_us);/* * sample bit
@@ -190,7 +191,8 @@ static int soft_spi_xfer(struct udevice *dev, unsigned int bitlen, &plat->mosi : &plat->miso); tmpdout <<=1 ; -udelay (plat->spi_delay_us); +if (plat->spi_delay_us) +udelay (plat->spi_delay_us);/* * drive bit
Signature · 1 line
2.43.0
Re: [PATCH v1 1/1] soft_spi performance enhancement
Quoted 25 lines · On 10/06/2025 18:38, [email protected] wrote:
From: Jean-Marie Verdun <[email protected]>
Add a test when delay is set to 0 to improve performances by 20% on ARM based systems
Signed-off-by Jean-Marie Verdun <[email protected]>--- drivers/spi/soft_spi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/spi/soft_spi.c +2
-1@@ -173,7 +173,8 @@ static int soft_spi_xfer(struct udevice *dev, unsigned int bitlen,soft_spi_scl (dev, !cidle);if ((txrx &SPI_MASTER_NO_TX ) ==0 )soft_spi_sda (dev, !!(tmpdout &0x80 )); -udelay (plat->spi_delay_us); +if (plat->spi_delay_us) +udelay (plat->spi_delay_us);/* * sample bit
drivers/spi/soft_spi.c static int soft_spi_xfer(struct udevice *dev, unsigned int bitlen, · line 198
Quoted 9 lines
drivers/spi/soft_spi.c +2
-1@@ -190,7 +191,8 @@ static int soft_spi_xfer(struct udevice *dev, unsigned int bitlen, &plat->mosi : &plat->miso); tmpdout <<=1 ; -udelay (plat->spi_delay_us); +if (plat->spi_delay_us) +udelay (plat->spi_delay_us);/* * drive bit
Re: [PATCH v1 1/1] soft_spi performance enhancement
In reply to [email protected]Quoted 4 lines · On Tue, 10 Jun 2025 16:38:35 +0000, [email protected] wrote:
Add a test when delay is set to 0 to improve performances by 20% on ARM based systems
Applied to u-boot/next, thanks!
[1/1] soft_spi performance enhancement
commit: 6caff66ce4692b78faf0c5c654f223eaa3aec774
Signature · 1 line
Tom