xref: /openbmc/qemu/include/hw/arm/nrf51_soc.h (revision 438c78da)
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 #include "hw/char/nrf51_uart.h"
16 
17 #define TYPE_NRF51_SOC "nrf51-soc"
18 #define NRF51_SOC(obj) \
19     OBJECT_CHECK(NRF51State, (obj), TYPE_NRF51_SOC)
20 
21 typedef struct NRF51State {
22     /*< private >*/
23     SysBusDevice parent_obj;
24 
25     /*< public >*/
26     ARMv7MState cpu;
27 
28     NRF51UARTState uart;
29 
30     MemoryRegion iomem;
31     MemoryRegion sram;
32     MemoryRegion flash;
33 
34     uint32_t sram_size;
35     uint32_t flash_size;
36 
37     MemoryRegion *board_memory;
38 
39     MemoryRegion container;
40 
41 } NRF51State;
42 
43 #endif
44 
45