Commit 662db0c5 authored by Adam Wujek's avatar Adam Wujek

Kconfig: add optization to remove slaveOnly

Signed-off-by: 's avatarAdam Wujek <adam.wujek@creotech.pl>
parent 236a53ce
......@@ -345,6 +345,15 @@ config CODEOPT_EXT_PORT_CONF_FORCE_DISABLED
externalPortConfiguration set to false to reduce the footprint.
Saves ~1500B on WRPC
config CODEOPT_SO_FORCE_DISABLED
boolean "Force disabled slaveOnly"
depends on CODEOPT_ENABLED
default y if ARCH_WRPC
default n
help
Force slaveOnly to false to reduce the footprint.
Saves ~650B.
choice
prompt "Exclusive options"
......@@ -362,7 +371,7 @@ choice
config CODEOPT_SO_ENABLED
boolean "Force slaveOnly mode to true"
depends on CODEOPT_ENABLED && SINGLE_PORT
depends on CODEOPT_ENABLED && SINGLE_PORT && !CODEOPT_SO_FORCE_DISABLED
help
slaveOnly is set to true and cannot be changed.
It implies that the number of port instances must be set to 1.
......@@ -460,6 +469,12 @@ config HAS_CODEOPT_EXT_PORT_CONF_FORCE_DISABLED
default 1 if CODEOPT_EXT_PORT_CONF_FORCE_DISABLED
default 0
config HAS_CODEOPT_SO_FORCE_DISABLED
int
range 0 1
default 1 if CODEOPT_SO_FORCE_DISABLED
default 0
config HAS_CODEOPT_EPC_ENABLED
int
range 0 1
......
......@@ -188,7 +188,7 @@ static inline int is_delayMechanismE2E(struct pp_instance *ppi) {
}
static inline int is_slaveOnly(defaultDS_t *def) {
return CONFIG_HAS_CODEOPT_EPC_ENABLED==0 && def->slaveOnly;
return CONFIG_HAS_CODEOPT_SO_FORCE_DISABLED == 0 && CONFIG_HAS_CODEOPT_EPC_ENABLED==0 && def->slaveOnly;
}
static inline int get_numberPorts(defaultDS_t *def) {
......
......@@ -103,7 +103,7 @@ int pp_init_globals(struct pp_globals *ppg, struct pp_runtime_opts *pp_rt_opts)
def->externalPortConfigurationEnabled=pp_rt_opts->externalPortConfigurationEnabled;
def->slaveOnly=rt_opts->slaveOnly;
if ( is_externalPortConfigurationEnabled(def) ) {
if ( def->slaveOnly ) {
if (is_slaveOnly(def)) {
pp_printf("ppsi: Incompatible configuration: SlaveOnly and externalPortConfigurationEnabled\n");
def->slaveOnly=FALSE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment