mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
aspeed/sdmc: Perform memory training
This allows qemu to run the "normal" power on reset boot path through u-boot, where the DDR is trained. An enhancement would be to have the SCU bit stick across qemu reboots, but be unset on initial boot. Proper modelling would be to discard all writes to the phy setting regs at offset 0x100 - 0x400 and to model the phy status regs at offset 0x400. The status regs model would only need to account for offets 0x00, 0x50, 0x68 and 0x7c. Signed-off-by: Joel Stanley <joel@jms.id.au> [ clg: checkpatch fixes ] Message-Id: <20200819100956.2216690-17-clg@kaod.org> Signed-off-by: Cédric Le Goater <clg@kaod.org>
This commit is contained in:
parent
e0059c8883
commit
14c179541b
3 changed files with 30 additions and 4 deletions
|
@ -17,7 +17,18 @@
|
|||
#define TYPE_ASPEED_2500_SDMC TYPE_ASPEED_SDMC "-ast2500"
|
||||
#define TYPE_ASPEED_2600_SDMC TYPE_ASPEED_SDMC "-ast2600"
|
||||
|
||||
#define ASPEED_SDMC_NR_REGS (0x174 >> 2)
|
||||
/*
|
||||
* SDMC has 174 documented registers. In addition the u-boot device tree
|
||||
* describes the following regions:
|
||||
* - PHY status regs at offset 0x400, length 0x200
|
||||
* - PHY setting regs at offset 0x100, length 0x300
|
||||
*
|
||||
* There are two sets of MRS (Mode Registers) configuration in ast2600 memory
|
||||
* system: one is in the SDRAM MC (memory controller) which is used in run
|
||||
* time, and the other is in the DDR-PHY IP which is used during DDR-PHY
|
||||
* training.
|
||||
*/
|
||||
#define ASPEED_SDMC_NR_REGS (0x500 >> 2)
|
||||
|
||||
typedef struct AspeedSDMCState {
|
||||
/*< private >*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue