mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
aspeed/smc: support different memory region ops for SMC flash region
It set "aspeed_smc_flash_ops" struct which containing read and write callbacks to be used when I/O is performed on the SMC flash region. And it set the valid max_access_size 4 by default for all ASPEED SMC models. However, the valid max_access_size 4 only support 32 bits CPUs. To support all ASPEED SMC model, introduce a new "const MemoryRegionOps *" attribute in AspeedSMCClass and use it in aspeed_smc_flash_realize function. Signed-off-by: Troy Lee <troy_lee@aspeedtech.com> Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Reviewed-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
parent
6330be8da4
commit
0559e60669
2 changed files with 14 additions and 1 deletions
|
@ -115,6 +115,7 @@ struct AspeedSMCClass {
|
|||
AspeedSegments *seg);
|
||||
void (*dma_ctrl)(AspeedSMCState *s, uint32_t value);
|
||||
int (*addr_width)(const AspeedSMCState *s);
|
||||
const MemoryRegionOps *reg_ops;
|
||||
};
|
||||
|
||||
#endif /* ASPEED_SMC_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue