Use DT_INST_FOREACH_STATUS_OKAY to reduce duplicated code for each
instance.
We make interrupts optional since they aren't always available.
Signed-off-by: Kumar Gala <galak@kernel.org>
Remove Kconfig symbols that determine which instances and just use
the number of enabled instance in the devicetree to determine which
instances to build.
Signed-off-by: Kumar Gala <galak@kernel.org>
Do not check for exact SoC to pass '--cores=${CONFIG_MP_NUM_CPUS}'
options to runners an pass it unconditionally instead.
That preventis from issues when adding new SoC/board.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
The ns16550 flags reg-shift property as optional. In case it is not
supplied, the ns16550 driver relies on a value defined in <soc.h>, or,
by default it takes 4 (shift by 2).
This patch adds the property to all ns16550 nodes, with the following
values:
- 2 if SoC did not have any custom value defined by
UART_REG_ADDR_INTERVAL (corresponds to 1 << 2 = 4)
- If SoC defined DEFAULT_REG_INTERVAL (snps_arc_iot/it8xxx2), use such
value (4=2, 2=1, 1=0).
These changes will allow simplifying the ns16550 driver.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit adds a dedicated page for the Zephyr SDK under the
'Toolchains' sub-category under 'Developing with Zephyr'.
The content of this page is based on the Zephyr SDK installation
instruction from the 'Getting Started Guide'.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Adds few missing zephyr/ prefixes to leftover #include statements that
either got added recently or were using double quote format.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Pinmux is deprecated (see #39740) so let's get rid of
it's usage for HSDK board.
As we call pinmux only once at init phase we simply do
register setup in platform code instead of pinmux.
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
nSIM SMP simulation is s bit slower than single-core one, so
let's increase timeouts for nsim_hs5x_smp platforms as we have for
nsim_hs_smp and nsim_hs6x_smp
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Setup peripheral and NOC apertures to make hs5x and hs6x configurations
runnable on real HW (HAPS).
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Use correct gfrc version in nsim args for mdb_hs6x_smp board.
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Add nSIM-based (simulator) boards with
* nsim_hs5x - single core ARCv3 HS5x 32 bit CPU
* nsim_hs5x_smp - SMP, two core ARCv3 HS5x 32 bit CPU
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
In order to bring consistency in-tree, migrate all boards code to the
new prefix <zephyr/...>. Note that the conversion has been scripted,
refer to zephyrproject-rtos#45388 for more details.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Currently we use incorrect memory layout for SMP boards as
we put data (which need do be accessible from all cores) to
DCCM which is private for each CPU core.
This works for nSIM which doesn't simulate CCMs (as we don't pass
corresponding nSIM options for SMP configurations) however
it won't work if we run that code on real HW (we want to achieve
that nSIM configurations are also runnable on HAPS - FPGA platform).
Let's fix that issue by using DDR instead of CCMs for SMP
configurations (nsim_hs_smp and nsim_hs6x_smp).
While I'm at it - switch UP HS6x configuration (nsim_hs6x)
for DDR usage instead of CCMs - to make that configuration closer
to the HAPS config we have.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Allow mwdt toolchain usage for 2 cores HSDK configuration
as we have it for 4 cores configuration.
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
nSIM SMP simulation is s bit slower than single-core one, so
let's increase timeouts for nSIM SMP platforms.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
The simplest way of getting networking to work on really tiny embedded
system is to use an extra serial port as an interface to external world
with help of a SLIP,
see https://en.wikipedia.org/wiki/Serial_Line_Internet_Protocol.
The catch is on a deeply embedded system we most likely won't see
an Ethernet MAC in the system as it might be as large ans as complex
as the CPU itself so there's no point in adding it. Moreover it will
require support in drivers, which are very hardware specific
(not only IP-block specific, but also need to take care of all the quirks
made in this particular instance and platform).
But with SLIP we may use existing serial port of the board which already
has all the needed support and with a platform-agnotic code of SLIP
we may have usable networking on both simulators & real HW boards.
And that's what we do in Zephyr.
Now we teach ARC's QEMU platform to do so as well.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Kconfig options now belong to the Kconfig domain, therefore, the
:kconfig:option: role needs to be used.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
We don't set core numbers for mdb-hw runner for nSIM
board, so it defaults to 1, so mdb-hw runner doesn't work with
SMP boards.
Fix that.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Refactors all of the on-chip GPIO drivers to use a shared driver class
initialization priority configuration, CONFIG_GPIO_INIT_PRIORITY, to
allow configuring GPIO drivers separately from other devices. This is
similar to other driver classes like I2C and SPI.
Most drivers previously used CONFIG_KERNEL_INIT_PRIORITY_DEFAULT or
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, therefore the default for this new
option is the lower of the two, which means earlier initialization.
Driver-specific options for off-chip I2C- or SPI-based GPIO drivers are
left intact because they often need to be initialized at a different
priority than on-chip GPIO drivers.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
Currently there is no way to support running a board on multiple
emulation platforms nor to choose a desired emulation platform for the
simulation to be run on. This commit introduces a new
SUPPORTED_EMU_PLATFORMS list, which defines available emulation
platforms for a given board.
Fixes#12375.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
HS6x nSIM doesn't have dcache_uncached_region property. Its presence
in configs (mdb.args) causes issues with 2021.06 nSIM, so let's
drop this property as it isn't used anyway.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Add nsim_sem_mpu_stack_guard.props and
nsim_sem_mpu_stack_guard.args, so we don't
do workarounds in cmake code.
Signed-off-by: Jingru Wang <jingru@synopsys.com>
We add support of mpu v6 therefore it is needed to have a board to
validate that feature. This commit add a new HS nsim simulator
which supports mpu v6.
Signed-off-by: Yuguo Zou <yuguo.zou@synopsys.com>
Currently the default runner of nsim_hs_smp is mdb,
the runner of other nsim platform is nsimdrv, user
can't change the default runner unless he uses
west command(--runner).
With this change cmake will choose runner according
to BOARD_DEBUG_RUNNER or BOARD_FLASH_RUNNER. so if
add -DBOARD_FLASH_RUNNER=mdb-nsim or
-DBOARD_DEBUG_RUNNER=mdb-nsim to cmake command,
the apllication will be run with mdb.
Signed-off-by: Jingru Wang <jingru@synopsys.com>
As 0.13 SDK is available and used in upstream verification by
default we can allow Zephyr toolchain for ARCv3 64bit boards.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
The idea of having default platforms is to prioritize running tests over
just building them. We do not have NSIM in CI and thus we are just
building for those platforms without running the tests, so, we spend
lots of time building on PRs which slows everything down. This is
already done in the daily builds.
We now have Qemu covering ARC. If we can get NSIM into CI, then we
should reconsider enabling some NSIM platforms.
Leaving hs_smp and _sem for coverage, we do not have other platforms
covering those.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add QEMU board with single core ARCv3 HS6x 64 bit CPU
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
The board has an I2C GPIO expander on it. A number of samples utilize
LEDs on GPIOs for testing purpose so it makes sense to enable the GPIO
expander (CONFIG_GPIO_CY8C95XX) driver when CONFIG_GPIO has been
enabled. We have to also enable I2C since the expander is connected
over an I2C interface.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
hsdk has an on board cy8c95xx I/O expander, and 4 on
board LEDs use the expander GPIO. Add the I/O expander
and LEDs in hsdk dts, then add documents for them.
Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
As of today the build-only testing in upstream is enabled for
nsim_em and nsim_em7d_v22 which are very similar from the
compiler POW. The ARC HS, ARC Secure EM and SMP targets miss
any testing.
So adjust default testing for better coverage by enabling
build-only testing for nsim_hs, nsim_sem and nsim_hs_smp and drop
excessive testing for nsim_em7d_v22.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Don't allow user to choose CPU_ARCEM / CPU_ARCHS options
but select them when exact CPU type (i.e. EM4 / EM6 / HS3X/ etc)
is chosen.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
When CONFIG_ARC_USE_UNALIGNED_MEM_ACCESS=y, we also
need to add -Xunaligned option for mdb to enable unaligned
memory access feature for nsim.
Signed-off-by: Watson Zeng <zhiwei@synopsys.com>