Commit graph

201 commits

Author SHA1 Message Date
David B. Kinder db60d4919a doc: fix broken references to zephyr files
The zephyr-file role creates a link to the GitHub copy of a file.  Some
files have been moved so update the file references in the documentation
(found by scanning for uses of :zephyr-file:)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-06-18 16:01:55 -04:00
Ulf Magnusson a84ded74ea dts: Replace status = "ok" with status = "okay"
The DT spec. only has "okay" and not "ok". The Linux kernel has around
12k "okay"s and 300 "ok"s.

The scripts/dts scripts only check for "disabled", so should be safe re.
those at least.

The replacement was done with

    git ls-files | xargs sed -i 's/status\s*=\s*"ok"/status = "okay"/'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-06-14 19:51:13 -05:00
Kumar Gala a2693975d7 dts: Convert from DT_<COMPAT>_<INSTANCE>_<PROP> to DT_INST...
Change code from using now deprecated DT_<COMPAT>_<INSTANCE>_<PROP>
defines to using DT_INST_<INSTANCE>_<COMPAT>_<PROP>.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-14 08:02:15 -05:00
Anas Nashif 5ec6a537a3 doc: fix path to gdb in documentation
Documents were still pointing to gdb path of old SDK.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-11 22:07:52 -04:00
Marti Bolivar 35d4e62300 boards: allow cmake-time overrides of all runners
Convert all board_set_xxer(foo) calls to board_set_xxer_ifndef(foo),
which allows the user to make their own decision at CMake time.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-06-07 13:43:51 +02:00
Marti Bolivar 1717332c7a cmake: add helpers for setting board runners
This helps by letting us add checks for when the runner has already
been set. There is documentation saying you can set
-DBOARD_DEBUG_RUNNER at the command line and have it take effect,
which turns out not to be true for a large number of boards.
A status message helps the user debug.

(We'll address the existing in-tree boards in the next patch.)

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-06-07 13:43:51 +02:00
Alexey Brodkin 40dbec4cd1 ARC: Mention ARC EM family instead of EM4 template
ARC EM4 is just a baseline configuration of ARC EM family of CPU cores.
But with addition of more featuers like caches, DSP extensions etc
we're effectively getting EM6, EM5D etc templates.

So to not confuse users let's talk about families of ARC cores
as that's what makes sense together with extra features but not
templates itself.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2019-06-06 14:20:42 -04:00
Alexey Brodkin c5663caf77 board/nsim: Refactor device tree description
Instead of blind copy of nsim_em.dts re-structure this way:
 * nsim.dtsi     - Top-level "board" description re-usable for
 |                 all nSIM-based "boards".
 |
 |                 Even though it's not needed right now but it
 |                 allows to add other ARC core families in the future.
 |
 \_ nsim_em.dtsi - Common definitions for boards with ARC EM cores
    |
    \_ Real boards with ARC EM cores
      |
      \ nsim_em.dts
      \ nsim_sem.dts
      \ nsim_em_mpu_stack_guard.dts
      \ nsim_sem_mpu_stack_guard.dts

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2019-06-06 14:20:42 -04:00
Alexey Brodkin 797165044f board/nsim: Move CPU selection in defconfigs
This will allow us to easily specify other CPUs looking
forward and not rely on any default value.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2019-06-06 14:20:42 -04:00
Alexey Brodkin b1dcf05c68 board/nsim: Make it CPU-family independent
ARC nSIM simulates all flavors or ARC cores so there's
no point in limiting its usage to ARC EM family only.

Moreover with upcoming addition of ARC HS family support
in Zephyr we'll be re-using nSIM "board" for them as well.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2019-06-06 14:20:42 -04:00
Alexey Brodkin bceaed67b3 simulation: ARC EM in nSIM to use nsim_em.props
This matches a naming scheme used for other flavour of ARC EM
SoC flavors.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2019-06-06 14:20:42 -04:00
Wayne Ren b69ed0373e boards: iotdk: add mpu and fpu configuration
* iotdk supports fpu and mpu
* iotdk supports fast irq
* a fix in device tree

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2019-04-29 09:03:24 -07:00
Ulf Magnusson 7fdb525754 kconfig: Use 'default' instead of 'def_bool' in Kconfig.defconfig files
Same deal as in commit 4638652214 ("Kconfig: Use 'default' instead of
'def_bool' in Kconfig.defconfig files"), fixing new stuff that got
introduced since then.

Some symbols, like ALTERA_AVALON_PIO, are only defined in
Kconfig.defconfig files, and so need the def_bool.

Motivation (from the note at the end of
guides/kconfig/index.html#common-shorthands):

For a symbol defined in multiple locations (e.g., in a Kconfig.defconfig
file in Zephyr), it is best to only give the symbol type for the "base"
definition of the symbol, and to use 'default' (instead of 'def_<type>'
value) for the remaining definitions. That way, if the base definition
of the symbol is removed, the symbol ends up without a type, which
generates a warning that points to the other definitions. That makes the
extra definitions easier to discover and remove.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-04-18 12:20:49 -04:00
Andrew Boie 4cf4040af0 arc: print human-readable exception info
Right now only numerical values are printed which must
be looked up in the Designware ARCv2 ISA Programmer's
Reference, which is not public.

Add a non-default Kconfig to print more information at
the expense of footprint, and enable it for all the simulator
targets.

We only print code/parameter details for machine check and
protection violations, more may be added later as desired.
This should cover all the exceptions we commonly encounter
for memory protection.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-04-17 09:16:27 -07:00
Anas Nashif 3ae52624ff license: cleanup: add SPDX Apache-2.0 license identifier
Update the files which contain no license information with the
'Apache-2.0' SPDX license identifier.  Many source files in the tree are
missing licensing information, which makes it harder for compliance
tools to determine the correct license.

By default all files without license information are under the default
license of Zephyr, which is Apache version 2.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-07 08:45:22 -04:00
Wayne Ren 0734b4fcaa board: nsim_em: fix the bug in nsim host timer
* the nsim host timer does not work as expected,
  disable it, use cycle count to simulate timer tick

* optmize the freq definition of nsim_em

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2019-04-02 17:39:25 -04:00
Wayne Ren 950b5c1a7a board: nsim: add new configuration to cover mpu stack guard
* the original configurations are configured with stack checking
* the new configurations are configured with mpu stack guard

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2019-03-29 16:15:10 -04:00
Wayne Ren 62da238571 board: emsk: fix the wrong info about DDR
DDR's info should come from DT_MMIO_SRAM_0

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2019-03-22 08:35:26 -05:00
Wayne Ren b962789b9e board: emsk: fix the bug in dts
As em7d is configured with HARVARD, CCM will be used not DDR,
SRAM should point to DCCM.

This bug will cause the wrong caculation of heap area,

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2019-03-22 08:35:26 -05:00
Wayne Ren 0f702eba74 board: nsim: optimize the timer accuracy of timer
* use 10 Mhz of host timer as timer source

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2019-03-20 00:35:43 -07:00
Wayne Ren a1c2159acb arch: arc: refactor the ARC MPU driver
* separate the ARC MPU driver into 2 parts
  * arc_mpu_v2_internal.h for ARC MPUv2
  * arc_mpu_v3_internal.h for ARC MPUv3
* For ARC MPUv2, keep the main design, but update and optimize the code
* For ARC MPUv3, implement mpu region split to supprt MPU region overlap
* misc updates and bug fixes

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2019-03-14 23:53:16 -07:00
Ulf Magnusson 53376394b7 kconfig: Remove blank lines at the beginning/end of files
Maybe this is some "just in case" thing that got copied around. There's
no need to have a blank line at the beginning or end of Kconfig files.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-13 07:29:42 -05:00
David B. Kinder 505cc2bb0e doc: use :zephyr_file: where appropriate
A new role :zephyr_file: is available that renders to a link to the file
or folder in GitHub.  Find appropriate references using :file: and
convert to :zephyr_file: to take advantage of its linking capability.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-03-09 09:50:27 -05:00
Wayne Ren 951d96a3c3 arch: arc: fix the overkilled codes caused by removing APP_MEM
these codes are overkilled by commit 41f6011c

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2019-02-26 08:41:38 -08:00
Kumar Gala a78c2fa8d2 boards: arc: iotdk: Fix missed CONFIG -> DT define transition
The ICCM/DCCM defines come from DT so they should be DT_ prefixed and
not CONFIG_ prefixed.  Fix that in arc_mpu_regions.c.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-11 22:29:58 -05:00
Anas Nashif acaae579cc doc: boards: make board images consistent with board name
Having the image use the same name will help us script listing the
boards.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-10 17:48:08 -05:00
Anas Nashif 0e4ff809d7 doc: boards: move all board docs to be index.rst
Be consistent in how board docs are named and move all to index.rst.
This will make the URL to the board documentation predictable and easier
to remember.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-09 17:22:08 -06:00
Kumar Gala 33ab2fa42e boards: Change supported 'rtc' to 'counter' for QMSI RTC based boards
We've removed the QMSI RTC driver as part of the new counter API.  So
any old rtc tests don't build for QMSI based boards anymore.  Switch
this from 'rtc' to 'counter' in the board.yaml.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 07:31:21 -05:00
Andrew Boie 41f6011c36 userspace: remove APPLICATION_MEMORY feature
This was never a long-term solution, more of a gross hack
to get test cases working until we could figure out a good
end-to-end solution for memory domains that generated
appropriate linker sections. Now that we have this with
the app shared memory feature, and have converted all tests
to remove it, delete this feature.

To date all userspace APIs have been tagged as 'experimental'
which sidesteps deprecation policies.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-02-08 07:04:30 -05:00
David B. Kinder c1dce2f799 doc: fix misspellings in docs
Fix misspellings missed in regular reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-02-07 22:06:14 -05:00
Kumar Gala 352234e0b6 drivers: uart_nsim: Add device tree support
Add Device Tree support for uart nsim ARC driver.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-30 12:27:37 -06:00
Kumar Gala affc1ed253 sensor: bmi160: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert bmi160 sensor driver to use new defines so we can remove the
dts_fixup.h code for it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-18 12:53:53 -06:00
Wayne Ren 6b5dea578e board: iotdk: bug fixes and remove unsupported drivers config
* i2c, spi, gpio are not tested, remove them now.
* fix the license issue in openocd.cfg
* fix the shell related setting

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2019-01-10 07:05:51 -05:00
Wayne Ren 022f061632 board: add the initial support of iotdk
The initial support of iotdk which is a board based on Synopsys
ARC IoT SoC.

In this commit, it includes

* processor support
* UART driver

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2019-01-10 07:05:51 -05:00
Kumar Gala a4c3feced4 dts: flash: w25qxxdv: Add Device Tree Support for SPI FLASH w25qxxdv
Convert the w25qxxdv driver to use device tree for SPI device params.
Updated the Arduino 101 config to use device tree to specify the SPI
flash.  Update the arduino_101_sss to drop Kconfig support for the
w25qxxdv flash.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-09 10:26:10 -06:00
Jakub Rzeszutko f8178dcb05 shell: remove Console dependencies
Removed Console dependencies from shell uart backend.
Generated define: CONFIG_UART_SHELL_ON_DEV_NAME for each board.

Fixes #10191

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-12-07 12:11:11 +01:00
Kumar Gala 582e676248 dts: arc: emsk: Remove emsk_dt.h and CONFIG options from dtsi
There are different interrupt numbers for R22 v R23.  Before this was
being handled via using Kconfig symbol CONFIG_BOARD_EM_STARTERKIT_R23 in
emsk_dt.h.  Since we want to remove use of Kconfig in dts we handle this
via different dtsi files and having the proper one included by the
proper board revision dts file.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-23 09:13:55 -05:00
Kumar Gala 7feb430b38 dts: arc: emsk: Remove DT_{I,D}CCM_SIZE from emsk_dt.h
Towards removing Kconfig from DTS we need to move setting of the sizes
of ICCM/DCCM into the SoC specific DTS files and out of emsk_dt.h

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-23 09:13:55 -05:00
Kumar Gala 758d5b14a9 boards: Remove board.h from boards that don't need it
These boards don't need board.h to work so remove it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-14 06:44:02 -06:00
Ulf Magnusson 4638652214 Kconfig: Use 'default' instead of 'def_bool' in Kconfig.defconfig files
This can help find unused symbols. Those end up without a type if
'default' is used instead of 'def_bool', which generates a warning.

Search for "Kconfig.defconfig" in
https://docs.zephyrproject.org/latest/application/kconfig-tips.html for
a longer explanation.

Keep the 'def_bool' for the following symbols, which seem to be
deliberately defined only in Kconfig.defconfig files:

 - ALTERA_AVALON_I2C
 - ALTERA_AVALON_MSGDMA
 - ALTERA_AVALON_PIO
 - ALTERA_AVALON_QSPI
 - ALTERA_AVALON_SYSID
 - CLOCK_CONTROL_IMX_CCM
 - CPU_EM4_DMIPS
 - CPU_EM4_FPUDA
 - CPU_EM4_FPUS
 - FP_FPU_DA
 - I2C_GECKO

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-11-13 16:04:01 -05:00
Ulf Magnusson fc210ab505 Kconfig: Remove unused symbols defined only in Kconfig.defconfig files
Turning 'def_bool' in Kconfig.defconfig files into 'default' revealed
three unused symbols (confirmed with 'git grep'). Remove them.

Search for "Kconfig.defconfig" in
https://docs.zephyrproject.org/latest/application/kconfig-tips.html for
an explanation of how def_bool->default can reveal undefined symbols.

Removed unused symbols:

 - SPI_DW_CLOCK_GATE

 - PINMUX_MPS2

 - BOARD_XTENSA

Also remove an assignment to the promptless symbol ALTERA_AVALON_SYSID,
in tests/boards/altera_max10/sysid/prj.conf. Assignments to promptless
symbols have no effect.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-11-13 16:04:01 -05:00
Andrzej Głąbek 20202902f2 dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig
These changes were obtained by running a script  created by
Ulf Magnusson <Ulf.Magnusson@nordicsemi.no> for the following
specification:

1. Read the contents of all dts_fixup.h files in Zephyr
2. Check the left-hand side of the #define macros (i.e. the X in
   #define X Y)
3. Check if that name is also the name of a Kconfig option
   3.a If it is, then do nothing
   3.b If it is not, then replace CONFIG_ with DT_ or add DT_ if it
       has neither of these two prefixes
4. Replace the use of the changed #define in the code itself
   (.c, .h, .ld)

Additionally, some tweaks had to be added to this script to catch some
of the macros used in the code in a parameterized form, e.g.:
- CONFIG_GPIO_STM32_GPIO##__SUFFIX##_BASE_ADDRESS
- CONFIG_UART_##idx##_TX_PIN
- I2C_SBCON_##_num##_BASE_ADDR
and to prevent adding DT_ prefix to the following symbols:
- FLASH_START
- FLASH_SIZE
- SRAM_START
- SRAM_SIZE
- _ROM_ADDR
- _ROM_SIZE
- _RAM_ADDR
- _RAM_SIZE
which are surprisingly also defined in some dts_fixup.h files.

Finally, some manual corrections had to be done as well:
- name##_IRQ -> DT_##name##_IRQ in uart_stm32.c

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-11-13 10:44:42 -06:00
Andrzej Głąbek f39ba7230d dts_fixups: Update labels generated from DTS with DT_ prefix
All labels containing "_<8-hex-digits>_" or "16550_<3or6-hex-digits>_"
in their names, assumed to be generated by the extracting script,
are updated with the DT_ prefix, to reflect the recent changes made
to the script.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-11-13 10:44:42 -06:00
Kumar Gala a134438840 sensors: bmi160: Add DTS support
Convert the BMI160 to use Device Tree to get SPI and GPIO params instead
of Kconfig.  Updated samples, tests, and arduino_101_sss board support
for this.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-13 10:23:22 +01:00
Tomasz Bursztyka d658e03488 drivers/spi: Remove unused legacy options
These have been osbolete for some time already.

Fixes #11064

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-11-09 05:25:11 -06:00
Kumar Gala 37f911375a Kconfig: dts: Move HAS_DTS to arch level
Remove either duplicate settings between arch & board, or just set
HAS_DTS at the arch level since all the boards for a given arch support
DTS now.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-06 18:35:39 -05:00
Kumar Gala 325a9b3ea4 boards: arc: Convert boards to use device tree for LEDs & Buttons
Convert over arc based boards to use device tree instead of board.h to
describe buttons & LEDs.  There are a few boards that the button gpio
flags need validation.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-10 09:26:32 -04:00
Maureen Helm 339a631ac4 boards: Remove redundant "select HAS_DTS_SPI"
The spi drivers now consistently select HAS_DTS_SPI, so we no longer
need to select it at the board level.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-09-28 06:27:06 +05:30
Maureen Helm 55caa7b743 drivers: spi: Select HAS_DTS_SPI in designware driver
Makes the designware spi driver consistent with other spi drivers by
selecting HAS_DTS_SPI in the driver. This required adding spi nodes and
dts fixups to several arc and x86 socs, as well as enabling those nodes
in associated boards.

Also refactors the driver to use the base address, interrupt number, and
interrupt priority from dts.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-09-28 06:27:06 +05:30
Maureen Helm 8d89815084 boards: Remove redundant "select HAS_DTS_I2C"
The i2c drivers now consistently select HAS_DTS_I2C, so we no longer
need to select it at the board level.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-09-27 05:54:54 +05:30
Kumar Gala 0ff2ae1fe8 dts: Cleanup warnings associated with interrupt controller nodes
We get several warnings of the form:

	Warning (unit_address_vs_reg): /cpus/arcv2-intc@0:
	node has a unit name, but no reg property

Fix by removing the unit address from the nodes.  Some cases we had a
reg property and a unit address for such interrupt controllers, in those
cases remove both the reg & unit address in the node name.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-09-18 10:44:45 -07:00
Kumar Gala 6e240da26f dts: Use new DT_SIZE_{K,M} macros
Now that we have a common DT_SIZE_K macro use it instead of defining
__SIZE_K eveywhere.  We also have DT_SIZE_M, so use that in a few
places as well.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-09-15 09:23:07 -05:00
Anas Nashif f183444682 arc: move soc to top-level dir soc/
Move the SoC outside of the architecture tree and put them at the same
level as boards and architectures allowing both SoCs and boards to be
maintained outside the tree.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-13 00:56:48 -04:00
David B. Kinder 5f4cb3fd69 doc: fix reference to props file
Fix reference to misspelled file name in nsim_em documentation

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-09-05 00:41:40 -04:00
Punit Vara c83769f859 boards: quark_se_c1000_ss_devboard: Enable ADC node
Enable ADC node in dts.

Signed-off-by: Punit Vara <punit.vara@intel.com>
2018-08-29 13:46:57 -04:00
Punit Vara c995c4b42b dts: arc: Use dts tree for designware driver
Get required data from dts tree.

Signed-off-by: Punit Vara <punit.vara@intel.com>
2018-08-29 13:46:57 -04:00
Wayne Ren 0be1875e42 boards: cleanup and update the default config of arc boards
apply to snps arc boards

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-08-24 09:31:24 -07:00
David B. Kinder 7c89b63b7c doc: fix kconfig misspellings
Fix misspellings in Kconfig files missed during normal reviews

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-08-08 01:48:24 -05:00
Anas Nashif d44c900143 boards: nsim_em: mark as simulation platform
Mark this board as simulation board to be run with nsimdrv.
See documentation for how to get nsimdrv.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-07-19 18:59:07 -04:00
Anas Nashif fd62b7a085 boards: nsim_sem: fix identifier
Fix identifier of board, was duplicating nsim_em.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-07-19 18:59:07 -04:00
Anas Nashif 7ce9615a2b nsim: add run target
Support 'make run' with this target rather than using 'flash' which
might be confusing.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-07-19 18:59:07 -04:00
Wayne Ren 3bda93a3aa dts: arc: fixes the warning msgs during cmake
fixes the warning msgs during cmake which are
caused by the missing info in dts files

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-07-19 09:20:38 -05:00
Wayne Ren c056340162 boards: arc: fix the wrong mpu configuration of nsim board
fix the wrong mpu configuration.

verified by tests/kernel/mem_protection/userspace

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-07-18 07:16:37 -04:00
Wayne Ren b6e41e715c boards: arc: add virtual board based on nsim
two configs are contained in this board

* nsim_em: em with arc MPUv2
* nsim_sem: em with arc SecureShield and MPUv3

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-07-10 19:05:13 -04:00
Anas Nashif 7c15934b53 toolchains: add xtools support for ARC
Latest crosstools NG supports ARC, so add it here for those who build
their own toolchains using xtools-ng or use the scripts from sdk-ng repo
in the zephyr project.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-07-08 15:39:35 -04:00
Ulf Magnusson 02b5f3edc8 drivers: gpio: Fix GPIO_QMSI_{0,1}_NAME Kconfig references
These symbols were removed by commit ed26b95 ("drivers/gpio:
Removing dts generated options in QMSI Kconfig"). The settings should
come from DTS now.

Commit 9611002f7a ("boards/x86: Use right GPIO names for CC2520")
fixed some of the references, but there are still others left. Guess
that the same fix is appropriate in those spots (hardcoded
"GPIO_0"/"GPIO_1" names).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-13 13:35:56 -04:00
Anas Nashif f0bafc307b boards: make em_starterkit_em7d default test platform
This is a core platform that needs to be tested by default. Fix the
default tag in the board YAML (it was duplicated in the wrong section).

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-06-07 18:01:49 -05:00
Ulf Magnusson 1d1bd60d16 boards: arduino_101: Fix separated-line interrupt Kconfig setting
The SPI_DW_INTERRUPT_SEPARATED_LINES symbol was removed and replaced by
SPI_DW_PORT_{0,1,2,3}_INTERRUPT_SINGLE_LINE in commit 423f0095c7
("drivers/spi: Specify options per-port on DW driver"), but an
assignment to it remains.

Remove the assignment and set SPI_DW_PORT_0_INTERRUPT_SINGLE_LINE to 'n'
instead. The Arduino has a single SPI port.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-05-23 08:50:27 -04:00
Marti Bolivar 59dc82e0d2 boards: adjust openocd runner arg syntax
The current method of setting the openocd runner arguments works for
direct invocation from the command line, but the values that are
written to the CMake cache are not properly separated and are
difficult to parse, due to the fact that in several cases, option
values contain spaces.

Adjust these runner arguments so that the options and their values are
separate list items. This makes it possible to parse them accurately
from the CMake cache.

No functional changes.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-05-19 07:01:39 +03:00
Wayne Ren b8196c8906 boards: em_starterkit: add pmod mux init
* add pmod mux init to config the pmode interfaces
  to the specific functions

* without pmod mux init, all pmod interfaces will be
GPIO, no interfaces for spi/i2c0/i2c1/uart0

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-05-15 09:48:11 +02:00
Wayne Ren 532e4d22ee dts: optimize and bug fixes the dts of em_starterkit
* add gpio, i2c, spi definitions
* optimize and bug fix the dts.fixup
* optimize and bug fix the em_starterkit related definitions
  in dts folder

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-05-15 09:48:11 +02:00
Wayne Ren 9c7d92a694 dts: fixes in the dts of em_starterkit em9d configuration
* em9d is configured to use ccm, and no sram
* choose dccm as virtual sram to generate the correct definitions
of CONFIG_SRAM_XXX which are used in many places, e.g. lib-hooks.c.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-05-15 09:48:11 +02:00
Wayne Ren 15f2035cab doc: update the doc of em_starterkit
update some content of doc of em_starterkit

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-05-15 09:48:11 +02:00
Wayne Ren 99e1f849bf dts: optimize the dts for em_starterkit
eliminate unnecessary duplication

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-05-15 09:48:11 +02:00
Wayne Ren 6307b8b97d arch: arc: refactor the soc part of em_starterkit
The original em7d, em9d and em11d are different configurations of
em_starterkit. They have the same peripherals, e.g. uart, spi, gpio
, ddr. The differences of them are in arc core configurations, interrupt
number assignment.

So em7d, em9d and em11d can be viewed in the same SoC family or SoC
series.

Referring other arch's implementation, this commit merges em7d, em9d
and em11d into the same SoC, named snps_emsk. This will eliminate
unnecessary duplication and make it easier for future maintainment.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-05-15 09:48:11 +02:00
Kumar Gala c542c0e33e boards: dts: Cleanup aliases
Underscore ('_') isn't a valid char for alias names based on the device
tree spec.  Newer dtc compilers flag this as a warning so lets clean it
up.  Replaced '_' with '-' to keep things simple.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-04-12 04:03:46 -05:00
Anas Nashif 993c350b92 cleanup: replace old jira numbers with GH issues
Replace all references to old JIRA issues (ZEP) with the corrosponding
Github issue ID.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-03-26 13:13:04 -04:00
Kumar Gala 8a824356e0 arch: arc: em{7,9,11}d: Add initial DTS UART support
Add support for getting some basic params from the DTS for the UART.
The ns16550 driver still needs to be updated to get IRQ and address
info from DTS.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-03-23 10:13:53 +01:00
Kumar Gala 311e6b9e3e arch: arc: Use DTS for all ARC SoCs
Now that all ARC SoCs we can remove code associated with !HAS_DTS and
select HAS_DTS at the architecture level.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-03-23 10:13:53 +01:00
Kumar Gala 60ec8be309 arch: em{7,9,11}d: Add dts support
Add initial device tree support for the em{7,9,11}d SoC and associated
em_starterkit boards.  The device tree at this point specifies cpu core,
memory, interrupt controller, uart's and i2c controllers.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-03-23 10:13:53 +01:00
Tomasz Bursztyka 8f891ba702 drivers/i2c: Use standard bitrate settings for DW driver
Applying the change to relevant arch/boards, either in their Kconfig or
the dts specific files.

Taking the opportunity in dw driver to rename the variable the same way
as they are everywhere else in the code (s/dev/dw and s/port/dev) in
init function.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-03-23 10:42:33 +08:00
Tomasz Bursztyka 9ddd8d1e4d arch/x86: Enable i2c through DTS for quark_se SS
And adapt relevant boards accordingly.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-03-23 10:42:33 +08:00
Wayne Ren 848d15e8e5 boards: em_starterkit: fix the board default config
Change TICKS_PER_SEC from 1000 to 100
* em_starterkit is a FPGA board with cores running at max 30 Mhz.
  1000 ticks per second is a little heavy for it.
* the tests/kernel/common requires 200 ticks per second at most,
  or the testcase will stall.

disable the generation of bin file.
* there is no flash in em_starterkit
* there is huge gap between ICCM and DCCM which will cause the bin
  file too large, alomst 2GB

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-03-08 11:01:11 +01:00
Wayne Ren ef174f0140 boards: em_starterkit: fix the mpu regions definition
_image_rom_end to _image_rom_size

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-03-08 11:01:11 +01:00
Kumar Gala 6becb64dfc dts: quark_se_c1000_ss: Refactor dts.fixup into arch/arc/soc
Move common SoC dts.fixup defines into
arch/arc/soc/quark_se_c1000_ss/dts.fixup so we remove duplication in the
boards and only have board specific defines in
boards/arc/<FOO>/dts.fixup.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-02-26 10:55:36 -06:00
Wayne Ren e91733c78b arch: arc: bug fixes and add user space support in secure mode
* bug fixes
* add user space support in secure mode

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-02-16 12:20:16 +01:00
Wayne Ren f81dee0b2b arch: arc: add user space support for arc
* add the implementation of syscall
  * based on 'trap_s' intruction, id = 3
* add the privilege stack
  * the privilege stack is allocted with thread stack
  * for the kernel thread, the privilege stack is also a
    part of thread stack, the start of stack can be configured
    as stack guard
  * for the user thread, no stack guard, when the user stack is
    overflow, it will fall into kernel memory area which requires
    kernel privilege, privilege violation will be raised
* modify the linker template and add MPU_ADDR_ALIGN
* add user space corresponding codes in mpu
* the user sp aux reg will be part of thread context
* When user thread is interruptted for the 1st time, the context is
  saved in user stack (U bit of IRQ_CTLR is set to 1). When nest
  interrupt comes, the context is saved in thread's privilege stack
* the arc_mpu_regions.c is moved to board folder, as it's board
  specific
* the above codes have been tested through tests/kernel/mem_protect/
  userspace for MPU version 2

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-02-16 12:20:16 +01:00
Anas Nashif 8949233390 kconfig: fix more help spacing issues
Fix Kconfig help sections and add spacing to be consistent across all
Kconfig file. In a previous run we missed a few.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-02-15 23:20:55 -05:00
Anas Nashif 44cab35004 boards: arc: default board with MPU enabled
em_starterkit_em7d has MPU enabled, so make it default for better test
coverage.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-30 21:05:24 -05:00
Anas Nashif 4e2fcccc4c boards: make em_starterkit the defaule for ARC
When testing, make em_starterkit the default for sanitycheck to test new
features such as MPU.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-30 17:18:01 -05:00
Wayne Ren 1ca60ffdb2 board: em_starter_kit: add default config for em7d in version 22
* arc MPUv2 is only available in em7d em starterkit version 22.
  Add a default config for this to simply the config.

* The change of board version in menuconfig, e.g, version 23 to
  v22, will not cause other options depending on board version
  change automatically, users still need to change these options
  manually. This is another reason to need a new default config file.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-01-18 11:50:59 -08:00
Wayne Ren 9a40bf6b7e arch: arc: Add the intial support of memory domain
Refering the ARM's implementation, the initial support of memory
domain in ARC is added:
* changes in MPU drivers
* changes in Kconfig
* codes to configure memory domain during thread swap
* changes in linker script template
* memory domain related macro definitions

the commited codes are simply tested through
samples/mpu/mem_domain_apis_test.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-01-18 11:50:59 -08:00
Carles Cufi 7d764b35f3 cmake: Use path-corrected version of ZEPHYR_BASE
Instead of accessing the environment variable ZEPHYR_BASE every time we
require accessing the source code root, use an intermediate variable
that has OS path separators correctly set to '/' to avoid issues on
Windows.

Note: This removes the ZEPHYR_SOURCE_DIR CMake variable. External
applications using that will need to change to use the new ZEPHYR_BASE
variable.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-01-11 14:59:03 -05:00
Anas Nashif be61a66e14 boards: remove panther board
This board was never released and is similar in many ways to the
quark_se_c1000_devboard.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-15 18:09:34 -05:00
Savinay Dharmappa 21c2cf78f2 driver: serial: Get interrupt number from dts
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-12-15 11:22:55 -06:00
Marti Bolivar 7a3462de7a scripts: runner: use arguments, not environment vars
The various runners (flash/debug scripts) use environment variables to
take arguments. This is legacy behavior which is not desirable.

Use command line arguments instead.

Note: this leaves more general environment variables with publicly
      documented behavior in place for now, for compatibility, e.g.:

      ZEPHYR_FLASH_OVER_DFU, OPENSDA_FW, ESP_IDF_PATH, PYOCD_DAPARG

For example, when using dfu-util to flash arduino_101, instead of
setting DFUUTIL_PID, DFUUTIL_ALT, and DFUUTIL_IMG environment
variables, have the script invocation look like this:

  python3 .../zephyr_flash_debug.py dfu-util flash \
          [common arguments omitted] \
          --pid=8087:0aba --alt=x86_app \
          --img=.../build/zephyr/zephyr.bin

Make similar changes for other runners (openocd, etc.) and
targets (debug, debugserver).

To implement this in the scripts:

  - have the individual scripts/support/runner/some-runner.py files
    register their own command line arguments

  - teach them to construct instances from arguments, not the
    environment

  - have zephyr_flash_debug.py request runners to register command
    line argument parsers, and handle arguments

In the build system:

  - add a new board_runner_args() extension function that board.cmake
    files can use to add to the zephyr_flash_debug.py command line

  - adjust cmake/flash/CMakeLists.txt to invoke with arguments

  - add new helper include files for each runner (like
    boards/common/dfu-util.board.cmake, etc.), which add default
    options as needed and then add on overrides from
    board_runner_args() calls

  - update board.cmake files to use the new includes and extension

This implied some tweaking when using openocd to make the CMake string
escaping and unescaping work properly.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-12-15 09:57:30 -05:00
Marti Bolivar e33ec242fd scripts: refactor flash/debug scripts to remove "shell"
The Python-based runners have replaced the old shell scripts. Refactor
the build system accordingly:

- FLASH_SCRIPT is now BOARD_FLASH_RUNNER
- DEBUG_SCRIPT is now BOARD_DEBUG_RUNNER

The values, rather than being the names of files, are now the names of
runners in scripts/support/runner. They are still short, descriptive
names like "openocd", "jlink", "em-starterkit", etc.

Adjust the zephyr_flash_debug.py call and runner internals
accordingly. Have each runner class report a name and the commands it
can handle. This lets us move some boilerplate from each do_run()
method into the common run() routine, and enables further improvements
in future patches.

The handles_command() method is temporary, and will be replaced by a
more general mechanism for describing runner capabilities in a
subsequent patch. The initial use case for extending this is to add
device tree awareness to the runners.

To try to avoid user confusion, abort the configuration if an
xxx_SCRIPT is defined.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-12-15 09:57:30 -05:00
Wayne Ren 9e6078690a board: em_starterkit: Update the defconfig to em_starter_kit version 2.3
As em7d is supported, all configurations of em_starter_kit version 2.3
are supported. Update all the defconfig to version 2.3.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2017-12-13 12:05:33 -05:00
Wayne Ren 0892cd7f46 board: arc: em_starterkit: Add em7d support of em_starterkit 2.3
* em7d of em_starterkit 2.3 supports secure mode. add the support
  in kconfig and build system.

* change the default configuration of em_starterkit 2.3 to em7d

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2017-12-13 12:05:33 -05:00
Anas Nashif f0e562f614 boards: fix board yaml syntax
Use better indentation for yaml syntax.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-11 14:47:08 -05:00