xref: /openbmc/qemu/include/hw/ppc/pnv_pnor.h (revision c47edb8d)
1 /*
2  * QEMU PowerNV PNOR simple model
3  *
4  * Copyright (c) 2019, IBM Corporation.
5  *
6  * This code is licensed under the GPL version 2 or later. See the
7  * COPYING file in the top-level directory.
8  */
9 #ifndef _PPC_PNV_PNOR_H
10 #define _PPC_PNV_PNOR_H
11 #include "qom/object.h"
12 
13 /*
14  * PNOR offset on the LPC FW address space
15  */
16 #define PNOR_SPI_OFFSET         0x0c000000UL
17 
18 #define TYPE_PNV_PNOR  "pnv-pnor"
19 typedef struct PnvPnor PnvPnor;
20 DECLARE_INSTANCE_CHECKER(PnvPnor, PNV_PNOR,
21                          TYPE_PNV_PNOR)
22 
23 struct PnvPnor {
24     SysBusDevice   parent_obj;
25 
26     BlockBackend   *blk;
27 
28     uint8_t        *storage;
29     int64_t        size;
30     MemoryRegion   mmio;
31 };
32 
33 #endif /* _PPC_PNV_PNOR_H */
34