From 673b2d42a8bfbc36bbfd9aad18410b3970913043 Mon Sep 17 00:00:00 2001 From: Joel Stanley Date: Tue, 25 Sep 2018 14:02:31 +0100 Subject: arm: Add Nordic Semiconductor nRF51 SoC The nRF51 is a Cortex-M0 microcontroller with an on-board radio module, plus other common ARM SoC peripherals. http://infocenter.nordicsemi.com/pdf/nRF51_RM_v3.0.pdf This defines a basic model of the CPU and memory, with no peripherals implemented at this stage. Signed-off-by: Joel Stanley Message-id: 20180831220920.27113-3-joel@jms.id.au Reviewed-by: Peter Maydell [PMM: wrapped a few long lines] Signed-off-by: Peter Maydell --- include/hw/arm/nrf51_soc.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 include/hw/arm/nrf51_soc.h (limited to 'include/hw/arm') diff --git a/include/hw/arm/nrf51_soc.h b/include/hw/arm/nrf51_soc.h new file mode 100644 index 0000000..f4e092b --- /dev/null +++ b/include/hw/arm/nrf51_soc.h @@ -0,0 +1,41 @@ +/* + * Nordic Semiconductor nRF51 SoC + * + * Copyright 2018 Joel Stanley + * + * This code is licensed under the GPL version 2 or later. See + * the COPYING file in the top-level directory. + */ + +#ifndef NRF51_SOC_H +#define NRF51_SOC_H + +#include "hw/sysbus.h" +#include "hw/arm/armv7m.h" + +#define TYPE_NRF51_SOC "nrf51-soc" +#define NRF51_SOC(obj) \ + OBJECT_CHECK(NRF51State, (obj), TYPE_NRF51_SOC) + +typedef struct NRF51State { + /*< private >*/ + SysBusDevice parent_obj; + + /*< public >*/ + ARMv7MState cpu; + + MemoryRegion iomem; + MemoryRegion sram; + MemoryRegion flash; + + uint32_t sram_size; + uint32_t flash_size; + + MemoryRegion *board_memory; + + MemoryRegion container; + +} NRF51State; + +#endif + -- cgit v1.1