xref: /openbmc/qemu/include/hw/arm/nrf51_soc.h (revision 966f2ec3)
1 /*
2  * Nordic Semiconductor nRF51  SoC
3  *
4  * Copyright 2018 Joel Stanley <joel@jms.id.au>
5  *
6  * This code is licensed under the GPL version 2 or later.  See
7  * the COPYING file in the top-level directory.
8  */
9 
10 #ifndef NRF51_SOC_H
11 #define NRF51_SOC_H
12 
13 #include "hw/sysbus.h"
14 #include "hw/arm/armv7m.h"
15 
16 #define TYPE_NRF51_SOC "nrf51-soc"
17 #define NRF51_SOC(obj) \
18     OBJECT_CHECK(NRF51State, (obj), TYPE_NRF51_SOC)
19 
20 typedef struct NRF51State {
21     /*< private >*/
22     SysBusDevice parent_obj;
23 
24     /*< public >*/
25     ARMv7MState cpu;
26 
27     MemoryRegion iomem;
28     MemoryRegion sram;
29     MemoryRegion flash;
30 
31     uint32_t sram_size;
32     uint32_t flash_size;
33 
34     MemoryRegion *board_memory;
35 
36     MemoryRegion container;
37 
38 } NRF51State;
39 
40 #endif
41 
42