aspeed/scu: Fix valid access size on AST2400
The read access size of the SCU registers can be 1/2/4 bytes and write is 4 bytes and all Aspeed models would need a .valid.accepts() handler. For the moment, set the min access size to 1 byte to cover both read and write operations on the AST2400 but keep the min access size of the other SoCs to 4 bytes as this is an unusual access size. This fixes support for some old firmware doing 2 bytes reads on the AST2400 SoC. Reported-by: Erik Smit <erik.lucas.smit@gmail.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Message-Id: <20200819100956.2216690-5-clg@kaod.org> Signed-off-by: Cédric Le Goater <clg@kaod.org>
This commit is contained in:
		@@ -328,9 +328,10 @@ static const MemoryRegionOps aspeed_ast2400_scu_ops = {
 | 
				
			|||||||
    .read = aspeed_scu_read,
 | 
					    .read = aspeed_scu_read,
 | 
				
			||||||
    .write = aspeed_ast2400_scu_write,
 | 
					    .write = aspeed_ast2400_scu_write,
 | 
				
			||||||
    .endianness = DEVICE_LITTLE_ENDIAN,
 | 
					    .endianness = DEVICE_LITTLE_ENDIAN,
 | 
				
			||||||
    .valid.min_access_size = 4,
 | 
					    .valid = {
 | 
				
			||||||
    .valid.max_access_size = 4,
 | 
					        .min_access_size = 1,
 | 
				
			||||||
    .valid.unaligned = false,
 | 
					        .max_access_size = 4,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static const MemoryRegionOps aspeed_ast2500_scu_ops = {
 | 
					static const MemoryRegionOps aspeed_ast2500_scu_ops = {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user