This reverts commit 8084ea55b7.
The rootcause is fixed in the ARC QEMU which is in SDK 0.16.3.
As we've updated SDK in upstream CI we can revert this
workaround.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Set vendor to `snps` to be consistent with vendor in board yaml
file.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
This is coming from devicetree and corrosponds to what we have in the
dts/bindings/vendor-prefixes.txt file.
This will allow for static filtering, especially with twister, i.e. no
need to build anything to know the vendor of a board
All of the vendor data was extracted automatically from the devicetree,
so some platforms might not have the right vendor or no vendor at all
right now, we need to fix some of the DTS information or do this
manually to get this 100% correct. But we are close.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
I spent several hours debugging a weird stack pointer corruption bug and
discovered that QEMU appears to mess up register contents when an interrupt
fires during the execution of a branch with a delay slot.
Instead of trying to fix qemu, let's just tell the compiler to not generate
code that uses the branch instructions with delay slots.
Closes: #60071
Signed-off-by: Keith Packard <keithp@keithp.com>
- Updated basic samples READMEs to use the new zephyr:code-sample::
directive. Dropped "-sample" suffix that's not required anymore now
that samples have their own namespace.
- Updated all references to the samples to use the :zephyr:code-sample:
role. Checked and updated the wording of said references to account
for the fact that samples should not have "... sample" in their name
anymore.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
These were also added as part of some major refactoring and should not
be relevant anymore. They are also the last two GPIO_INIT_PRIORITY
overrides left in boards, so after this every GPIO device should be
working with the standard initialization priority.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This was introduced long time ago during a big priority refactoring,
with the current priority changes it should not be necesary anymore, the
current value is causing some build fail in the weekly test.
Fixes the following breakage:
```
$ west build -p -b em_starterkit_em11d -T
tests/drivers/build_all/gpio/drivers.gpio.build
...
ERROR: /test/nct3807_alert_1 POST_KERNEL 52 51 <
/test/gpio@deadbeef POST_KERNEL 70 47
ninja: build stopped: subcommand failed.
```
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Make make UART IRQ line number configurable in nSIM
nsim-uart-ns16550.dtsi DTS helper.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Add gpio-keys codes for all boards. These are mostly INPUT_KEY_0 and so
on but I've used some more specific ones where it was obvious that
there's something else on the boards.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Mux Control Register Index are internals of driver, now
moved from dt-binding header to driver itself.
Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
ARC EMSDP board has some peripherals are internal connected,
such as DW spi1 and DFSS i2c0. They are unmuxed and have fix
connection to spi-flash or sensor. For these peripheral, add
dummy mux type to avoid pinctrl ENOENT error.
Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
Introduce DesignWare ARC Data Fusion IP Subsystem(DFSS) SPI
driver for ARC boards, i.e. EMSDP, which uses DW SPI to controll
SPI-Flash and DFSS SPI to connect external devices. Both drivers
share most source code, but DFSS uses ARC auxiliary registers.
Move FIFO depth setting to device tree.
Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
Actual DCCM size is 100000 in nsim_hs_mpuv6, nsim_hs
and nsim_hs3x_hostlink, but their nsim property is
40000. Now fixed the difference to avoid data access
to unpopulated region during picolibc malloc heap init.
In minimal libc, it is set not using malloc as default.
Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
The init infrastructure, found in `init.h`, is currently used by:
- `SYS_INIT`: to call functions before `main`
- `DEVICE_*`: to initialize devices
They are all sorted according to an initialization level + a priority.
`SYS_INIT` calls are really orthogonal to devices, however, the required
function signature requires a `const struct device *dev` as a first
argument. The only reason for that is because the same init machinery is
used by devices, so we have something like:
```c
struct init_entry {
int (*init)(const struct device *dev);
/* only set by DEVICE_*, otherwise NULL */
const struct device *dev;
}
```
As a result, we end up with such weird/ugly pattern:
```c
static int my_init(const struct device *dev)
{
/* always NULL! add ARG_UNUSED to avoid compiler warning */
ARG_UNUSED(dev);
...
}
```
This is really a result of poor internals isolation. This patch proposes
a to make init entries more flexible so that they can accept sytem
initialization calls like this:
```c
static int my_init(void)
{
...
}
```
This is achieved using a union:
```c
union init_function {
/* for SYS_INIT, used when init_entry.dev == NULL */
int (*sys)(void);
/* for DEVICE*, used when init_entry.dev != NULL */
int (*dev)(const struct device *dev);
};
struct init_entry {
/* stores init function (either for SYS_INIT or DEVICE*)
union init_function init_fn;
/* stores device pointer for DEVICE*, NULL for SYS_INIT. Allows
* to know which union entry to call.
*/
const struct device *dev;
}
```
This solution **does not increase ROM usage**, and allows to offer clean
public APIs for both SYS_INIT and DEVICE*. Note that however, init
machinery keeps a coupling with devices.
**NOTE**: This is a breaking change! All `SYS_INIT` functions will need
to be converted to the new signature. See the script offered in the
following commit.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
init: convert SYS_INIT functions to the new signature
Conversion scripted using scripts/utils/migrate_sys_init.py.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
manifest: update projects for SYS_INIT changes
Update modules with updated SYS_INIT calls:
- hal_ti
- lvgl
- sof
- TraceRecorderSource
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
tests: devicetree: devices: adjust test
Adjust test according to the recently introduced SYS_INIT
infrastructure.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
tests: kernel: threads: adjust SYS_INIT call
Adjust to the new signature: int (*init_fn)(void);
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
There is a spi-flash fl256s on emsdp board, which can be
contolled by DesignWare SPI driver. Now add DW SPI and
SPI-FLASH support for emsdp board.
Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
Yaml description for simulators should contain simulation_exec
telling which tool to use. nsim_em11d was missing this entry
causing twister to only build but not execute tests on this
platform. Value from other nsims was used.
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
Enable FPU for nsim_sem_mpu_stack_guard to fix zdsp.basicmath.fpu
failure due to lack of FPU option. Add FPU feature to its related
mdb.args, also for nsim_sem and nsim_em7d_v22 boards.
Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
To run zdsp tests on nsim_sem and nsim_em7d_v22, FPU feature
is needed to be added in their nsim.props file.
Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
Allow cross-compile toolchain for all ARC target which support zephyr
toolchain.
This aligns the behavior between ARC targets - as some of them
were supporting zephyr toolchain but weren't supporting cross-compile
toolchain (which wasn't actually true).
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
The XY Memory is a feature commonly found in DSP processors to increase
the DSP performance. The XY component allows a ARC processor to
implicitly load source operands and store results into a closely coupled
memory using a single instruction.
Add XY memory for ARC EM9D/EM11D processors including em_starterkit,
em_starterkit_em11d. emsdp_em9d, nsim_em, iotdk.
Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
We mark MPU existing for nSIM HS SoC, but doesn't enable
it for nsim_hs board. Fix that.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Provide the information as part of the board yaml file, this way we will
know what binary to check for.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add XIP support with MWDT toolchain. To have it proper tested
add separate nsim platforms for XIP (flash + sram) and
non-XIP (sram) memory organization in addition to existing
nsim_hs platfor with CCMs (ICCM + DCCM) memory organization.
This PR also enables MPU for all nsim hs3x based platforms
(like we previously enabled it for qemu_arc_hs) to have proper
memory regions permissions.
Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
Add some changes to ARC linker script. They make correct alignment
for ROMable region. Now regions borders are aligned with respect
to MPU settings.
Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
Update cmake related files that are used by simulators to use
CONFIG_MP_MAX_NUM_CPUS instead of CONFIG_MP_NUM_CPUS as we work to
phase out CONFIG_MP_NUM_CPUS.
Signed-off-by: Kumar Gala <kumar.gala@intel.com>
The sys* ops like sys_clear_bit are indirectly included via arch CPU
header. Other stuff like find_msb_set end up included via this header as
well.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Needed for proper filtering based on type in twister.
Sometimes we do not want to run a test in a simulator.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
As we've finally switched to 0.15.0 Zephyr SDK in upstream
verification we can enable zephyr toolchain for all ARC HS5x
targets.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>