Patch "spi: aspeed: Fix window offset of CE1" has been added to the 6.0-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

    spi: aspeed: Fix window offset of CE1

to the 6.0-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:
     spi-aspeed-fix-window-offset-of-ce1.patch
and it can be found in the queue-6.0 subdirectory.

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



commit 592115c785329f9ae9e6d72832bd0c78e281b8f0
Author: Cédric Le Goater <clg@xxxxxxxx>
Date:   Sun Oct 16 17:57:22 2022 +0200

    spi: aspeed: Fix window offset of CE1
    
    [ Upstream commit f8aa6c895d482847c9b799dcdac8bbdb56cb8e04 ]
    
    The offset value of the mapping window in the kernel structure is
    calculated using the value of the previous window offset. This doesn't
    reflect how the HW is configured and can lead to erroneous setting of
    the second flash device (CE1).
    
    Cc: Chin-Ting Kuo <chin-ting_kuo@xxxxxxxxxxxxxx>
    Fixes: e3228ed92893 ("spi: spi-mem: Convert Aspeed SMC driver to spi-mem")
    Signed-off-by: Cédric Le Goater <clg@xxxxxxxx>
    Reviewed-by: Joel Stanley <joel@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20221016155722.3520802-1-clg@xxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/spi/spi-aspeed-smc.c b/drivers/spi/spi-aspeed-smc.c
index 3e891bf22470..5a995b5653f1 100644
--- a/drivers/spi/spi-aspeed-smc.c
+++ b/drivers/spi/spi-aspeed-smc.c
@@ -398,7 +398,7 @@ static void aspeed_spi_get_windows(struct aspeed_spi *aspi,
 		windows[cs].cs = cs;
 		windows[cs].size = data->segment_end(aspi, reg_val) -
 			data->segment_start(aspi, reg_val);
-		windows[cs].offset = cs ? windows[cs - 1].offset + windows[cs - 1].size : 0;
+		windows[cs].offset = data->segment_start(aspi, reg_val) - aspi->ahb_base_phy;
 		dev_vdbg(aspi->dev, "CE%d offset=0x%.8x size=0x%x\n", cs,
 			 windows[cs].offset, windows[cs].size);
 	}



[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