ebe31c0a8e
This will be used to construct a memory region beyond the RAM region to let firmwares scan the address space with load/store to guess how much RAM the SoC has. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Joel Stanley <joel@jms.id.au> Tested-by: Cédric Le Goater <clg@kaod.org> Message-id: 20180807075757.7242-7-joel@jms.id.au Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
36 lines
760 B
C
36 lines
760 B
C
/*
|
|
* ASPEED SDRAM Memory Controller
|
|
*
|
|
* Copyright (C) 2016 IBM Corp.
|
|
*
|
|
* This code is licensed under the GPL version 2 or later. See the
|
|
* COPYING file in the top-level directory.
|
|
*/
|
|
#ifndef ASPEED_SDMC_H
|
|
#define ASPEED_SDMC_H
|
|
|
|
#include "hw/sysbus.h"
|
|
|
|
#define TYPE_ASPEED_SDMC "aspeed.sdmc"
|
|
#define ASPEED_SDMC(obj) OBJECT_CHECK(AspeedSDMCState, (obj), TYPE_ASPEED_SDMC)
|
|
|
|
#define ASPEED_SDMC_NR_REGS (0x174 >> 2)
|
|
|
|
typedef struct AspeedSDMCState {
|
|
/*< private >*/
|
|
SysBusDevice parent_obj;
|
|
|
|
/*< public >*/
|
|
MemoryRegion iomem;
|
|
|
|
uint32_t regs[ASPEED_SDMC_NR_REGS];
|
|
uint32_t silicon_rev;
|
|
uint32_t ram_bits;
|
|
uint64_t ram_size;
|
|
uint64_t max_ram_size;
|
|
uint32_t fixed_conf;
|
|
|
|
} AspeedSDMCState;
|
|
|
|
#endif /* ASPEED_SDMC_H */
|