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