Skip to content

Commit 8a718c8

Browse files
committed
SoC/evalsoc: Fix HPM default feature in cpufeature.h after XLCFG optimization
Signed-off-by: Huaqi Fang <578567190@qq.com>
1 parent bb6f907 commit 8a718c8

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

SoC/evalsoc/Common/Include/cpufeature.h

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,13 @@ extern "C" {
4343
#define CFG_CPU_SERIES 0xFFFFFF
4444
#define CFG_CPU_VER 0xFFFFFF
4545

46-
#if defined(XLCFG_ECLIC)
46+
// NOTE: By default enabled features
47+
48+
#if !(defined(XLCFG_ECLIC) && XLCFG_ECLIC == 0)
4749
#define CFG_HAS_CLIC
4850
#if XLCFG_ECLIC == 2
4951
#define CFG_HAS_ECLICV2
50-
#elif XLCFG_ECLIC == 0
51-
#undef CFG_HAS_CLIC
5252
#endif
53-
#else
54-
#define CFG_HAS_CLIC
5553
#endif
5654

5755
// External Interrupt Number
@@ -161,17 +159,13 @@ extern "C" {
161159
#define CFG_HAS_DDR
162160
#endif
163161

164-
#if defined(XLCFG_HPM)
165-
#define CFG_HPM_VER 1
166-
#if XLCFG_HPM == 2
167-
#define CFG_HPM_VER 2
168-
#elif XLCFG_HPM == 0
169-
#undef CFG_HPM_VER
170-
#endif
171-
#else
172-
#define CFG_HPM_VER 1
162+
#if !(defined(XLCFG_HPM) && XLCFG_HPM == 0)
163+
#define CFG_HAS_HPM
164+
#define CFG_HPM_VER XLCFG_HPM
173165
#endif
174166

167+
// NOTE: By default disabled features
168+
175169
#if defined(XLCFG_CCM) && XLCFG_CCM != 0
176170
#define CFG_HAS_CCM
177171
#endif

0 commit comments

Comments
 (0)