diff options
| author | Alistair Francis | 2019-10-09 01:32:14 +0200 |
|---|---|---|
| committer | Palmer Dabbelt | 2019-10-28 15:47:28 +0100 |
| commit | 687caef13d084b829156c7784a62d4c07316ae47 (patch) | |
| tree | 3f69f7bd4c10b3a40952fca58b1136f11a2d3c33 /include/hw/riscv | |
| parent | riscv/sifive_u: Add QSPI memory region (diff) | |
| download | qemu-687caef13d084b829156c7784a62d4c07316ae47.tar.gz qemu-687caef13d084b829156c7784a62d4c07316ae47.tar.xz qemu-687caef13d084b829156c7784a62d4c07316ae47.zip | |
riscv/sifive_u: Manually define the machine
Instead of using the DEFINE_MACHINE() macro to define the machine let's
do it manually. This allows us to specify machine properties.
This patch is no functional change.
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Diffstat (limited to 'include/hw/riscv')
| -rw-r--r-- | include/hw/riscv/sifive_u.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/hw/riscv/sifive_u.h b/include/hw/riscv/sifive_u.h index 0062276190..794b958dcc 100644 --- a/include/hw/riscv/sifive_u.h +++ b/include/hw/riscv/sifive_u.h @@ -44,12 +44,17 @@ typedef struct SiFiveUSoCState { CadenceGEMState gem; } SiFiveUSoCState; +#define TYPE_RISCV_U_MACHINE MACHINE_TYPE_NAME("sifive_u") +#define RISCV_U_MACHINE(obj) \ + OBJECT_CHECK(SiFiveUState, (obj), TYPE_RISCV_U_MACHINE) + typedef struct SiFiveUState { /*< private >*/ - SysBusDevice parent_obj; + MachineState parent_obj; /*< public >*/ SiFiveUSoCState soc; + void *fdt; int fdt_size; } SiFiveUState; |
