2019-10-21 16:12:11 +03:00
|
|
|
/*
|
|
|
|
* QEMU PowerNV PNOR simple model
|
|
|
|
*
|
|
|
|
* Copyright (c) 2019, IBM Corporation.
|
|
|
|
*
|
|
|
|
* This code is licensed under the GPL version 2 or later. See the
|
|
|
|
* COPYING file in the top-level directory.
|
|
|
|
*/
|
2022-05-06 16:49:09 +03:00
|
|
|
|
|
|
|
#ifndef PPC_PNV_PNOR_H
|
|
|
|
#define PPC_PNV_PNOR_H
|
|
|
|
|
2022-12-22 13:46:26 +03:00
|
|
|
#include "hw/sysbus.h"
|
2019-10-21 16:12:11 +03:00
|
|
|
|
2019-10-28 10:00:27 +03:00
|
|
|
/*
|
|
|
|
* PNOR offset on the LPC FW address space
|
|
|
|
*/
|
|
|
|
#define PNOR_SPI_OFFSET 0x0c000000UL
|
|
|
|
|
2019-10-21 16:12:11 +03:00
|
|
|
#define TYPE_PNV_PNOR "pnv-pnor"
|
2020-09-16 21:25:19 +03:00
|
|
|
OBJECT_DECLARE_SIMPLE_TYPE(PnvPnor, PNV_PNOR)
|
2019-10-21 16:12:11 +03:00
|
|
|
|
2020-09-03 23:43:22 +03:00
|
|
|
struct PnvPnor {
|
2019-10-21 16:12:11 +03:00
|
|
|
SysBusDevice parent_obj;
|
|
|
|
|
|
|
|
BlockBackend *blk;
|
|
|
|
|
|
|
|
uint8_t *storage;
|
2020-01-07 20:18:09 +03:00
|
|
|
int64_t size;
|
2019-10-21 16:12:11 +03:00
|
|
|
MemoryRegion mmio;
|
2020-09-03 23:43:22 +03:00
|
|
|
};
|
2019-10-21 16:12:11 +03:00
|
|
|
|
2022-05-06 16:49:09 +03:00
|
|
|
#endif /* PPC_PNV_PNOR_H */
|