Commit graph

29 commits

Author SHA1 Message Date
Kumar Gala a1b77fd589 zephyr: replace zephyr integer types with C99 types
git grep -l 'u\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g"
	git grep -l 's\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-08 08:23:57 -05:00
Karl Zhang 679b437b75 boards: arm: musca_b1: Add TFM support
This commit adds support for TF-M to the MUSCA B1.

When the CONFIG_BUILD_WITH_TFM flag is set, a secure and
non-secure processing environment image pair will be
generated, with the Zephy application image running on
the non-secure side.

The secure and non-secure binary images will be signed
for use with the BL2 secure bootloader.

Signed-off-by: Karl Zhang <karl.zhang@linaro.org>
2020-05-09 16:21:51 +02:00
Karl Zhang 68ffc2d7cf arm: musca_b1: Extend memory space in nonsecure
This is for PSA arch test to run on Musca B1. The test cases need more
than 100k RAM.

Signed-off-by: Karl Zhang <karl.zhang@linaro.org>
2020-05-09 16:21:51 +02:00
Kumar Gala d59ac4f0d5 boards: arm: musca: Convert to using DT_NODELABEL for SCC
Convert old DT defines of the form DT_ARM_SCC_BASE_ADDRESS to
DT_REG_ADDR(DT_INST(0, arm_scc)).  This allows us to remove dts_fixup.h
on musca boards.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-23 09:13:47 -05:00
Kumar Gala 1951c79db4 drivers: gpio: cmsdk_ahb: Convert driver to be full DTS based
Convert driver to utilize the new DT_INST macros completely and remove
associated Kconfig symbols that now come from devicetree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-03 04:11:36 -05:00
Karl Zhang faeeb4abea IPM: Add MHU as default IPM for sse-200 subsystem
Set sse-200 subsystem using MHU (Message Handling Unit) as default.

Signed-off-by: Karl Zhang <karl.zhang@linaro.org>
2020-03-26 06:10:07 -05:00
Romit Dasgupta b6154be163 boards: arm: Replaces a non-working web link
The web link for the Attribution units is broken.
Replacing it with a working version.

Signed-off-by: Romit Dasgupta <romlinux@gmail.com>
2020-02-19 12:40:54 +01:00
Ulf Magnusson c5839f834b kconfig: Remove assignments to CONFIG_<arch> syms and hide them
All board defconfig files currently set the architecture in addition to
the board and the SoC, by setting e.g. CONFIG_ARM=y. This spams up
defconfig files.

CONFIG_<arch> symbols currently being set in configuration files also
means that they are configurable (can be changed in menuconfig and in
configuration files), even though changing the architecture won't work,
since other things get set from -DBOARD=<board>. Many boards also allow
changing the architecture symbols independently from the SoC symbols,
which doesn't make sense.

Get rid of all assignments to CONFIG_<arch> symbols and clean up the
relationships between symbols and the configuration interface, like
this:

1. Remove the choice with the CONFIG_<arch> symbols in arch/Kconfig and
   turn the CONFIG_<arch> symbols into invisible
   (promptless/nonconfigurable) symbols instead.

   Getting rid of the choice allows the symbols to be 'select'ed (choice
   symbols don't support 'select').

2. Select the right CONFIG_<arch> symbol from the SOC_SERIES_* symbols.
   This makes sense since you know the architecture if you know the SoC.

   Put the select on the SOC_* symbol instead for boards that don't have
   a SOC_SERIES_*.

3. Remove all assignments to CONFIG_<arch> symbols. The assignments
   would generate errors now, since the symbols are promptless.

The change was done by grepping for assignments to CONFIG_<arch>
symbols, finding the SOC_SERIES_* (or SOC_*) symbol being set in the
same defconfig file, and putting a 'select' on it instead.

See
https://github.com/ulfalizer/zephyr/commits/hide-arch-syms-unsquashed
for a split-up version of this commit, which will make it easier to see
how stuff was done. This needs to go in as one commit though.

This change is safer than it might seem re. outstanding PRs, because any
assignment to CONFIG_<arch> symbols generates an error now, making
outdated stuff easy to catch.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-08 00:50:08 -06:00
Kumar Gala 1dc4b1dd2f boards: shrink image sizes
Reduce images sizes of boards.  Get a roughly 3x reduction in size.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-02-07 13:52:45 -05:00
Ulf Magnusson ff4f5b01d6 kconfig: Remove assignments to promptless SOC_FAMILY_ARM symbol
SOC_FAMILY_ARM has no prompt. Assignments in configuration files have no
effect on symbols without prompts. A prompt means the symbol is
user-configurable.

SOC_FAMILY_ARM is instead enabled indirectly through being selected by
other symbols.

Detected through some work-in-progress improved error checking.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-09 16:24:12 +01:00
Kumar Gala c111b7e49d watchdog: cmsdk: Convert to use DT generated label for device name
Convert driver to use DT_INST_0_ARM_CMSDK_WATCHDOG_LABEL instead of
CONFIG_WDT_0_NAME.  This requires we introduce a "label" property in all
the related dts files.  Also introduce a standard watchdog alias
('watchdog0') that can be utilized by sample/test code in the future.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-06 13:51:20 -06:00
Ulf Magnusson 07bf345db3 boards: arm: mps2_an521/musca: kconfig: Clean up BOARD defaults
Putting 'if's directly on the defaults is simpler here.

I'm guessing BOARD should always be "musca_{a,b1}_nonsecure" if it isn't
"musca_{a,b1}", so I removed the condition on the
"musca_{a,b1}_nonsecure" default (turning it into an "else").

Avoiding a top-level 'if'/'depends on' also avoids adding direct
dependencies to the BOARD symbol, which looks a bit neater in the
generated docs (though direct dependencies only matter for symbols that
might be selected/implied).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-05 19:32:31 +01:00
Ulf Magnusson bd6e04411e kconfig: Clean up header comments and make them consistent
Use this short header style in all Kconfig files:

    # <description>

    # <copyright>
    # <license>

    ...

Also change all <description>s from

    # Kconfig[.extension] - Foo-related options

to just

    # Foo-related options

It's clear enough that it's about Kconfig.

The <description> cleanup was done with this command, along with some
manual cleanup (big letter at the start, etc.)

    git ls-files '*Kconfig*' | \
        xargs sed -i -E '1 s/#\s*Kconfig[\w.-]*\s*-\s*/# /'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-04 17:31:27 -05:00
Ulf Magnusson 2b61031c8f kconfig: Remove symbol types from Kconfig.defconfig files
Same deal as in commit 7fdb525754 ("kconfig: Use 'default' instead of
'def_bool' in Kconfig.defconfig files"), but I hacked Kconfiglib to also
find cases where the type is given separately as e.g.

    config FOO
            int
            default 3

Motivation (from a note in
https://docs.zephyrproject.org/latest/guides/kconfig/index.html):

    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.

It's also nice if 'def_bool' and the like turn into a semi-reliable flag
that the symbol is only defined in Kconfig.defconfig files. That might
be a sign that things could be cleaned up.

Will do a separate pass later to remove some symbols only defined in
Kconfig.defconfig files.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-24 12:40:22 -05:00
Kumar Gala 15724c6cdc arm: v2m_musca_b1: Enable GPIO support
Enable CMSDK GPIO driver on v2m_musca_b1 SoC/Board.  Add LEDs that are
on the board and init the pinmux for those LEDs to work.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-25 22:33:19 -07:00
Kumar Gala 12417cde79 boards: v2m_musca_b1: Add pyocd support
Enable pyocd support on musca-b1 board.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-25 22:33:19 -07:00
David B. Kinder f6521290e6 doc: replace hlist with column-width class
For long lists of items, it's better to use a multi-column display to
make better use of the screen space.  We used the hlist directive to
accomplish list, but it has a drawback on small (phone) screens because
under the hood, the rendering is done using tables.

Instead, we can take advantage of built-in CSS multi-column support
available in recent browsers.  So, convert uses of the hlist directive
to use an rst-class directive to apply a multi-column class to
the entity. The chosen column-width (18em) gives us a 3-column display
on typical window sizes, but will adjust to more or fewer columns
depending on the actual real estate available.

Also, update the documentation guidelines to mention this change.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-18 13:33:37 -04:00
Erwan Gouriou 5a12d51285 boards: Clean up references to env variable PROJECT_SOURCE_DIR
As recommended in cmake/app/boilerplate.cmake, ZEPHYR_BASE should
be preferred to PROJECT_SOURCE_DIR.
Do the change for all boards still referring to PROJECT_SOURCE_DIR.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-09-12 13:16:16 -05:00
Karl Zhang 26b1e07a99 arm: Musca B1: Migrate to eFlash
Musca B1 has 2 x 2MB embedded flash memories (eFlash). The flash
memories are connected to the AHB Master Expansion “Code Interface”.

Signed-off-by: Karl Zhang <karl.zhang@linaro.org>
2019-07-31 10:31:29 -04:00
Kumar Gala 2d9032e5d0 boards/arm/v2m_musca_b1: Add missing label to timer node
The binding for arm,cmsdk-timer requires a label so add it into the dts
since its missing on v2m_musca_b1.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-20 08:27:23 -04:00
Piotr Zięcik e4bd11b3f3 dts: Add information about system bus frequency to the dts
This commit adds a fixed clock node (representing clock driving
system bus). The added node is then referenced by peripherals requiring
information about driving clock frequency.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-07-17 21:53:36 +02:00
Anas Nashif a8167ab17d cleanup: include/: move pinmux.h to drivers/pinmux.h
move pinmux.h to drivers/pinmux.h and
create a shim for backward-compatibility.

No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.

Related to #16539

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-27 22:55:49 -04:00
Anas Nashif ef281c4237 cleanup: include/: move sys_io.h to sys/sys_io.h
move sys_io.h to sys/sys_io.h and
create a shim for backward-compatibility.

No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.

Related to #16539

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-27 22:55:49 -04:00
Ioannis Glaropoulos 4b15873c13 soc: arm: add ARM MPU node info and fixup for ARMv8-M SoCs
This commit adds a DTS node for the ARM MPU peripheral in the
device tree of ARMv8-M SoCs (for the secure and the non-secure
DTS descriptions) and updates the fixup files. SoCs:
- nrf9160
- musca_a
- musca_b1

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-05-20 14:06:10 -05:00
Karl Zhang a4607fd7db Revert "boards: v2m_musca_b1_nonsecure: disable sanitycheck [REVERT ME]"
This reverts commit d6d7a80057.

Signed-off-by: Karl Zhang <karl.zhang@linaro.org>
2019-04-25 08:43:17 -05:00
Karl Zhang cfd5d8f15e boards: v2m_musca_b1_nonsecure: Increase flash size
The sanity check for v2m_musca_b1_nonsecure failed because of small
flash size.

Signed-off-by: Karl Zhang <karl.zhang@linaro.org>
2019-04-25 08:43:17 -05:00
Anas Nashif d6d7a80057 boards: v2m_musca_b1_nonsecure: disable sanitycheck [REVERT ME]
Disable sanitycheck on this board for now and while fix issues that were
not detected earlier.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-19 08:55:58 -05:00
Anas Nashif 6ad19d2436 boards: v2m_musca_b1_nonsecure: add flash to yaml
Specify flash size to help filtering with sanitycheck.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-19 07:32:28 -04:00
Karl Zhang 13dfeba5bd arm: V2M Musca B1: Add Musca B1 SoC and board support
Musca B1 is a Cortex-M33 based SoC.

Signed-off-by: Karl Zhang <karl.zhang@linaro.org>
2019-04-18 13:25:50 -05:00