From 42c768b5235d51b731e522be946212623c1466a8 Mon Sep 17 00:00:00 2001 From: Germain Haugou Date: Thu, 5 Mar 2020 15:56:56 +0100 Subject: [PATCH] FIxed wrong size of pos_freq_domains --- include/chips/marsellus/config.h | 2 -- include/chips/marsellus/soc.h | 2 +- include/chips/pulp/config.h | 2 -- include/chips/pulp/soc.h | 2 +- include/chips/pulpissimo/config.h | 6 ------ include/chips/pulpissimo/soc.h | 2 +- include/pulp.h | 3 ++- kernel/freq-domains.c | 2 +- 8 files changed, 6 insertions(+), 15 deletions(-) diff --git a/include/chips/marsellus/config.h b/include/chips/marsellus/config.h index 5f6cc76..4ec5d3c 100644 --- a/include/chips/marsellus/config.h +++ b/include/chips/marsellus/config.h @@ -25,6 +25,4 @@ #define PULP_CHIP_STR marsellus #define PULP_CHIP_FAMILY_STR marsellus -#define PERIPH_FREQUENCY 50000000 - #endif diff --git a/include/chips/marsellus/soc.h b/include/chips/marsellus/soc.h index 20814c6..7b67b03 100644 --- a/include/chips/marsellus/soc.h +++ b/include/chips/marsellus/soc.h @@ -22,7 +22,7 @@ #define POS_FLL_PERIPH 1 #define POS_FLL_FC 0 -extern int pos_freq_domains[ARCHI_NB_FLL]; +extern int pos_freq_domains[PI_FREQ_NB_DOMAINS]; void pos_soc_init(); diff --git a/include/chips/pulp/config.h b/include/chips/pulp/config.h index fb7912d..72a0b6a 100644 --- a/include/chips/pulp/config.h +++ b/include/chips/pulp/config.h @@ -25,6 +25,4 @@ #define PULP_CHIP_STR pulp #define PULP_CHIP_FAMILY_STR pulp -#define PERIPH_FREQUENCY 50000000 - #endif diff --git a/include/chips/pulp/soc.h b/include/chips/pulp/soc.h index 65fa71f..7230578 100644 --- a/include/chips/pulp/soc.h +++ b/include/chips/pulp/soc.h @@ -22,7 +22,7 @@ #define POS_FLL_PERIPH 1 #define POS_FLL_FC 0 -extern int pos_freq_domains[ARCHI_NB_FLL]; +extern int pos_freq_domains[PI_FREQ_NB_DOMAINS]; void pos_soc_init(); diff --git a/include/chips/pulpissimo/config.h b/include/chips/pulpissimo/config.h index dc358be..ad61bcd 100644 --- a/include/chips/pulpissimo/config.h +++ b/include/chips/pulpissimo/config.h @@ -25,10 +25,4 @@ #define PULP_CHIP_STR pulpissimo #define PULP_CHIP_FAMILY_STR pulpissimo -#if __PLATFORM__ == ARCHI_PLATFORM_FPGA -#define PERIPH_FREQUENCY 5000000 -#else -#define PERIPH_FREQUENCY 50000000 -#endif - #endif diff --git a/include/chips/pulpissimo/soc.h b/include/chips/pulpissimo/soc.h index 3b60974..71035a8 100644 --- a/include/chips/pulpissimo/soc.h +++ b/include/chips/pulpissimo/soc.h @@ -22,7 +22,7 @@ #define POS_FLL_PERIPH 1 #define POS_FLL_FC 0 -extern int pos_freq_domains[ARCHI_NB_FLL]; +extern int pos_freq_domains[PI_FREQ_NB_DOMAINS]; void pos_soc_init(); diff --git a/include/pulp.h b/include/pulp.h index 0b73277..2ddf606 100755 --- a/include/pulp.h +++ b/include/pulp.h @@ -31,7 +31,8 @@ typedef enum { PI_FREQ_DOMAIN_FC = 0, PI_FREQ_DOMAIN_CL = 1, - PI_FREQ_DOMAIN_PERIPH = 2 + PI_FREQ_DOMAIN_PERIPH = 2, + PI_FREQ_NB_DOMAINS = 3 } pi_freq_domain_e; #ifdef ARCHI_HAS_CLUSTER diff --git a/kernel/freq-domains.c b/kernel/freq-domains.c index aeaee05..ab7ccc5 100644 --- a/kernel/freq-domains.c +++ b/kernel/freq-domains.c @@ -18,7 +18,7 @@ #include -int pos_freq_domains[ARCHI_NB_FLL]; +int pos_freq_domains[PI_FREQ_NB_DOMAINS];