ca661fae81
This activates HIOMAP support on the QEMU PowerNV machine. The PnvPnor model is used to access the flash contents. The model simply maps the contents at a fix offset and enables or disables the mapping. HIOMAP Protocol description : https://github.com/openbmc/hiomapd/blob/master/Documentation/protocol.md Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20191028070027.22752-3-clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
31 lines
648 B
C
31 lines
648 B
C
/*
|
|
* 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.
|
|
*/
|
|
#ifndef _PPC_PNV_PNOR_H
|
|
#define _PPC_PNV_PNOR_H
|
|
|
|
/*
|
|
* PNOR offset on the LPC FW address space
|
|
*/
|
|
#define PNOR_SPI_OFFSET 0x0c000000UL
|
|
|
|
#define TYPE_PNV_PNOR "pnv-pnor"
|
|
#define PNV_PNOR(obj) OBJECT_CHECK(PnvPnor, (obj), TYPE_PNV_PNOR)
|
|
|
|
typedef struct PnvPnor {
|
|
SysBusDevice parent_obj;
|
|
|
|
BlockBackend *blk;
|
|
|
|
uint8_t *storage;
|
|
uint32_t size;
|
|
MemoryRegion mmio;
|
|
} PnvPnor;
|
|
|
|
#endif /* _PPC_PNV_PNOR_H */
|