Patch "gpio: aspeed: Add the flush write to ensure the write complete." has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    gpio: aspeed: Add the flush write to ensure the write complete.

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     gpio-aspeed-add-the-flush-write-to-ensure-the-write-.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c336c9f98eb83f2b7f0956f9a95f4fa22c9801b4
Author: Billy Tsai <billy_tsai@xxxxxxxxxxxxxx>
Date:   Tue Oct 8 16:14:44 2024 +0800

    gpio: aspeed: Add the flush write to ensure the write complete.
    
    [ Upstream commit 1bb5a99e1f3fd27accb804aa0443a789161f843c ]
    
    Performing a dummy read ensures that the register write operation is fully
    completed, mitigating any potential bus delays that could otherwise impact
    the frequency of bitbang usage. E.g., if the JTAG application uses GPIO to
    control the JTAG pins (TCK, TMS, TDI, TDO, and TRST), and the application
    sets the TCK clock to 1 MHz, the GPIO's high/low transitions will rely on
    a delay function to ensure the clock frequency does not exceed 1 MHz.
    However, this can lead to rapid toggling of the GPIO because the write
    operation is POSTed and does not wait for a bus acknowledgment.
    
    Fixes: 361b79119a4b ("gpio: Add Aspeed driver")
    Reviewed-by: Andrew Jeffery <andrew@xxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Billy Tsai <billy_tsai@xxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20241008081450.1490955-2-billy_tsai@xxxxxxxxxxxxxx
    Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c
index ba1cd971d50b6..5cc80678ac352 100644
--- a/drivers/gpio/gpio-aspeed.c
+++ b/drivers/gpio/gpio-aspeed.c
@@ -407,6 +407,8 @@ static void __aspeed_gpio_set(struct gpio_chip *gc, unsigned int offset,
 	gpio->dcache[GPIO_BANK(offset)] = reg;
 
 	iowrite32(reg, addr);
+	/* Flush write */
+	ioread32(addr);
 }
 
 static void aspeed_gpio_set(struct gpio_chip *gc, unsigned int offset,




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux