xref: /qemu/include/hw/ppc/pnv_pnor.h (revision db1015e92e04835c9eb50c29625fe566d1202dbd)
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 #define PNV_PNOR(obj)  OBJECT_CHECK(PnvPnor, (obj), TYPE_PNV_PNOR)
21 
22 struct PnvPnor {
23     SysBusDevice   parent_obj;
24 
25     BlockBackend   *blk;
26 
27     uint8_t        *storage;
28     int64_t        size;
29     MemoryRegion   mmio;
30 };
31 
32 #endif /* _PPC_PNV_PNOR_H */
33