aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-meson/sm.c
AgeCommit message (Collapse)Author
2023-06-28arch/arm: meson: sm: introduce power domain functionsAlexey Romanov
This commit adds functions to manage secure power domain for Amlogic SoC's using smc functionality. Signed-off-by: Alexey Romanov <avromanov@sberdevices.ru> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20230531093156.29240-2-avromanov@sberdevices.ru Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-01-10arm/mach-meson: move smc commands in cmd/mesonAlexey Romanov
It is incorrect to keep commands in the arch/ folder. Signed-off-by: Alexey Romanov <avromanov@sberdevices.ru> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20230110105650.54580-3-avromanov@sberdevices.ru [narmstrong: moved after cmd/sound in index.rst] Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2022-08-08ARM: meson: fixup error on efuse commands returnJerome Brunet
All `sm efuseread/efusewrite` commands exit with an error, even if the fuse have actually been dealt with correctly. This is because the smc call return the size it actually processed but this result is checked against 0. Return failure in do_efuse_read/write if the return value of meson_sm_read/write_efuse() is not the requested size. Fixes: 52195ba5f579 ("ARM: amlogic: add sm efuse write support and cmd for read/write efuse") Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://lore.kernel.org/r/20220804144138.33809-1-jbrunet@baylibre.com
2021-10-29ARM: amlogic: add sm efuse write support and cmd for read/write efuseVyacheslav Bocharov
This adds support for amlogic efuse write and provides two subcommands of "sm" command: "efuseread" and "efusewrite" to read/write bytes between memory and efuse. Signed-off-by: Vyacheslav Bocharov <adeep@lexina.in> [narmstrong: fixed indent at end of patch] Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-02-02common: Drop asm/global_data.h from common headerSimon Glass
Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2020-05-18common: Drop linux/bitops.h from common headerSimon Glass
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop asm/ptrace.h from common headerSimon Glass
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop log.h from common headerSimon Glass
Move this header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18command: Remove the cmd_tbl_t typedefSimon Glass
We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop net.h from common headerSimon Glass
Move this header out of the common header. Network support is used in quite a few places but it still does not warrant blanket inclusion. Note that this net.h header itself has quite a lot in it. It could be split into the driver-mode support, functions, structures, checksumming, etc. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05dm: core: Require users of devres to include the headerSimon Glass
At present devres.h is included in all files that include dm.h but few make use of it. Also this pulls in linux/compat which adds several more headers. Drop the automatic inclusion and require files to include devres themselves. This provides a good indication of which files use devres. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Anatolij Gustschin <agust@denx.de>
2019-08-12arm: meson: add sm command to retrieve the reboot reasonNeil Armstrong
The Secure Monitor offers multiple services, like returning the SoC unique serial number, and can provide the "reboot reason" as set by the previous booted system. This extends the Amlogic specific "sm" cmd with a "reboot_reason" subcommand to print or set a specified environment variable with the reboot reason in human readable format. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-08-12arm: meson: add sm cmd to retrieve SoC serialNeil Armstrong
The Secure Monitor offers multiple services, like returning the SoC unique serial number, already used to generate an unique MAC address. This adds a new, Amlogic specific, "sm" cmd with a "serial" subcommand to write the SoC unique serial to memory. This "cm" command will be extended in further patches. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-07-04ARM: meson: sm: Add secure monitor calls to retrieve SoC serial numberNeil Armstrong
The Secure Monitor interface permits retrieving the SoC Serial Number, add a function to retrieve it. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-11-26ARM: meson: rework soc arch file to prepare for new SoCJerome Brunet
We are about to add support for the Amlogic AXG SoC. While very close to the Gx SoC family, we will need to handle a few thing which are different in this SoC. Rework the meson arch directory to prepare for this. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-05-08ARM: meson: rename GXBB to GXNeil Armstrong
Taking into account the Amlogic Family name starts with GX, including the GXBB, GXL and GXM SoCs. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2016-05-27arm: meson: implement calls to secure monitorBeniamino Galvani
Implement calls to secure monitor to read the MAC address from e-fuse. Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>