mirror of
https://github.com/qemu/qemu.git
synced 2024-12-12 13:13:51 +08:00
aspeed/smc: add a 'sdram_base' property
The DRAM address of a DMA transaction depends on the DRAM base address of the SoC. Inform the SMC controller model with this value. Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Joel Stanley <joel@jms.id.au> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20190618165311.27066-15-clg@kaod.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
ad1a978218
commit
6da4433fc5
@ -337,6 +337,12 @@ static void aspeed_soc_realize(DeviceState *dev, Error **errp)
|
||||
aspeed_soc_get_irq(s, ASPEED_I2C));
|
||||
|
||||
/* FMC, The number of CS is set at the board level */
|
||||
object_property_set_int(OBJECT(&s->fmc), sc->info->memmap[ASPEED_SDRAM],
|
||||
"sdram-base", &err);
|
||||
if (err) {
|
||||
error_propagate(errp, err);
|
||||
return;
|
||||
}
|
||||
object_property_set_bool(OBJECT(&s->fmc), true, "realized", &err);
|
||||
if (err) {
|
||||
error_propagate(errp, err);
|
||||
|
@ -913,6 +913,7 @@ static const VMStateDescription vmstate_aspeed_smc = {
|
||||
|
||||
static Property aspeed_smc_properties[] = {
|
||||
DEFINE_PROP_UINT32("num-cs", AspeedSMCState, num_cs, 1),
|
||||
DEFINE_PROP_UINT64("sdram-base", AspeedSMCState, sdram_base, 0),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
|
@ -97,6 +97,9 @@ typedef struct AspeedSMCState {
|
||||
uint8_t r_timings;
|
||||
uint8_t conf_enable_w0;
|
||||
|
||||
/* for DMA support */
|
||||
uint64_t sdram_base;
|
||||
|
||||
AspeedSMCFlash *flashes;
|
||||
|
||||
uint8_t snoop_index;
|
||||
|
Loading…
Reference in New Issue
Block a user