mirror of
				https://git.openwrt.org/openwrt/openwrt.git
				synced 2025-10-31 15:56:03 +00:00 
			
		
		
		
	This patch series greatly improve airoha snfi driver and fix a number of serious bugs. Fixed bugs: * Fix reading/writing of flashes with more than one plane per lun * Fill the buffer with 0xff before writing * Fix reading of flashes supporting continuous reading mode * Fix error paths Improvements: * Add support of dual/quad wires spi modes in exec_op(). This also fix flash reading/writing if dirmap can't be created. * Support of dualio/quadio flash reading commands Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> Link: https://github.com/openwrt/openwrt/pull/20295 Signed-off-by: Robert Marko <robimarko@gmail.com>
		
			
				
	
	
		
			32 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
| From 4658f57ba7f60c3bd8e14c1ca7acf2090aee8436 Mon Sep 17 00:00:00 2001
 | |
| From: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
 | |
| Date: Tue, 12 Aug 2025 06:21:35 +0300
 | |
| Subject: [PATCH v6 02/13] spi: airoha: remove unnecessary restriction length
 | |
| 
 | |
| The "length < 160" restriction is not needed because airoha_snand_write_data()
 | |
| and airoha_snand_read_data() will properly handle data transfers above
 | |
| SPI_MAX_TRANSFER_SIZE.
 | |
| 
 | |
| Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
 | |
| Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
 | |
| ---
 | |
|  drivers/spi/spi-airoha-snfi.c | 7 -------
 | |
|  1 file changed, 7 deletions(-)
 | |
| 
 | |
| --- a/drivers/spi/spi-airoha-snfi.c
 | |
| +++ b/drivers/spi/spi-airoha-snfi.c
 | |
| @@ -579,13 +579,6 @@ static int airoha_snand_adjust_op_size(s
 | |
|  
 | |
|  		if (op->data.nbytes > max_len)
 | |
|  			op->data.nbytes = max_len;
 | |
| -	} else {
 | |
| -		max_len = 1 + op->addr.nbytes + op->dummy.nbytes;
 | |
| -		if (max_len >= 160)
 | |
| -			return -EOPNOTSUPP;
 | |
| -
 | |
| -		if (op->data.nbytes > 160 - max_len)
 | |
| -			op->data.nbytes = 160 - max_len;
 | |
|  	}
 | |
|  
 | |
|  	return 0;
 |