xref: /openbmc/qemu/include/hw/arm/max78000_soc.h (revision 65714d3e6c384956537c43ee9a58f2e4ebfdd883)
1 /*
2  * MAX78000 SOC
3  *
4  * Copyright (c) 2025 Jackson Donaldson <jcksn@duck.com>
5  *
6  * SPDX-License-Identifier: GPL-2.0-or-later
7  */
8 
9 #ifndef HW_ARM_MAX78000_SOC_H
10 #define HW_ARM_MAX78000_SOC_H
11 
12 #include "hw/or-irq.h"
13 #include "hw/arm/armv7m.h"
14 #include "hw/misc/max78000_icc.h"
15 #include "qom/object.h"
16 
17 #define TYPE_MAX78000_SOC "max78000-soc"
18 OBJECT_DECLARE_SIMPLE_TYPE(MAX78000State, MAX78000_SOC)
19 
20 #define FLASH_BASE_ADDRESS 0x10000000
21 #define FLASH_SIZE (512 * 1024)
22 #define SRAM_BASE_ADDRESS 0x20000000
23 #define SRAM_SIZE (128 * 1024)
24 
25 /* The MAX78k has 2 instruction caches; only icc0 matters, icc1 is for RISC */
26 #define MAX78000_NUM_ICC 2
27 
28 struct MAX78000State {
29     SysBusDevice parent_obj;
30 
31     ARMv7MState armv7m;
32 
33     MemoryRegion sram;
34     MemoryRegion flash;
35 
36     Max78000IccState icc[MAX78000_NUM_ICC];
37 
38     Clock *sysclk;
39 };
40 
41 #endif
42