| 31336258 | 14-May-2021 |
Pali Rohár <pali@kernel.org> |
refactor(plat/marvell/uart): de-duplicate PLAT_MARVELL_UART macros
Macros PLAT_MARVELL_BOOT_UART* and PLAT_MARVELL_CRASH_UART* are defined to same values. De-duplicate them into PLAT_MARVELL_UART* m
refactor(plat/marvell/uart): de-duplicate PLAT_MARVELL_UART macros
Macros PLAT_MARVELL_BOOT_UART* and PLAT_MARVELL_CRASH_UART* are defined to same values. De-duplicate them into PLAT_MARVELL_UART* macros.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: Iae5daf7cad6a971e6f3dbe561df3d0174106ca7f
show more ...
|
| 6b557f48 | 14-May-2021 |
Pali Rohár <pali@kernel.org> |
refactor(plat/marvell/uart): remove unused macros
Macros PLAT_MARVELL_BL31_RUN_UART* are not used since commit d7c4420cb8a7 ("plat/marvell: Migrate to multi-console API").
Remove them.
Signed-off-
refactor(plat/marvell/uart): remove unused macros
Macros PLAT_MARVELL_BL31_RUN_UART* are not used since commit d7c4420cb8a7 ("plat/marvell: Migrate to multi-console API").
Remove them.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I5ec959ef4de87dcfb332c017ad2599bf8af6ffc3
show more ...
|
| 66a77528 | 13-May-2021 |
Pali Rohár <pali@kernel.org> |
fix(plat/marvell/a3720/uart): fix UART clock rate value and divisor calculation
UART parent clock is by default the platform's xtal clock, which is 25 MHz.
The value defined in the driver, though,
fix(plat/marvell/a3720/uart): fix UART clock rate value and divisor calculation
UART parent clock is by default the platform's xtal clock, which is 25 MHz.
The value defined in the driver, though, is 25.8048 MHz. This is a hack for the suboptimal divisor calculation Divisor = UART clock / (16 * baudrate) which does not use rounding division, resulting in a suboptimal value for divisor if the correct parent clock rate was used.
Change the code for divisor calculation to Divisor = Round(UART clock / (16 * baudrate)) and change the parent clock rate value to 25 MHz.
The final UART divisor for default baudrate 115200 is not affected by this change.
(Note that the parent clock rate should not be defined via a macro, since the xtal clock can also be 40 MHz. This is outside of the scope of this fix, though.)
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: Iaa401173df87aec94f2dd1b38a90fb6ed0bf0ec6
show more ...
|
| f2800a47 | 06-Apr-2021 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: a3k: Add new compile option A3720_DB_PM_WAKEUP_SRC
This new compile option is only for Armada 3720 Development Board. When it is set to 1 then TF-A will setup PM wake up src c
plat: marvell: armada: a3k: Add new compile option A3720_DB_PM_WAKEUP_SRC
This new compile option is only for Armada 3720 Development Board. When it is set to 1 then TF-A will setup PM wake up src configuration.
By default this new option is disabled as it is board specific and no other A37xx board has PM wake up src configuration.
Currently neither upstream U-Boot nor upstream Linux kernel has wakeup support for A37xx platforms, so having it disabled does not cause any issue.
Prior this commit PM wake up src configuration specific for Armada 3720 Development Board was enabled for every A37xx board. After this change it is enabled only when compiling with build flag A3720_DB_PM_WAKEUP_SRC=1
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I09fea1172c532df639acb3bb009cfde32d3c5766
show more ...
|
| e01658ea | 29-Jan-2021 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: a3k: Do not use 'echo -e' in Makefile
It does not have to be supported by the current shell used in Makefile. Replace it by a simple echo with implicit newline.
Signed-off-by
plat: marvell: armada: a3k: Do not use 'echo -e' in Makefile
It does not have to be supported by the current shell used in Makefile. Replace it by a simple echo with implicit newline.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I97fe44986ac36d3079d5258c67f0c9184537e7f0
show more ...
|
| 4e80d151 | 26-Jan-2021 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: a3k: Remove unused variable WTMI_SYSINIT_IMG from Makefile
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I322c8aa65437abb61385f58b700a06b3e2e22e4f |
| c0f60e78 | 26-Jan-2021 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: Move definition of mrvl_flash target to common marvell_common.mk file
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: If545b3812787cc97b95dbd61ed51c37d30c5d412 |
| 907f8fc1 | 26-Jan-2021 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: a3k: Use $(Q) instead of @
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I09fd734510ec7019505263ff0ea381fab36944fa |
| 8b920973 | 26-Jan-2021 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: a3k: Add a new target mrvl_uart which builds UART image
This change separates building of flash and UART images, so it is possible to build only one of these images. Also this
plat: marvell: armada: a3k: Add a new target mrvl_uart which builds UART image
This change separates building of flash and UART images, so it is possible to build only one of these images. Also this change allows make to build them in parallel.
Target mrvl_flash now builds only flash image and mrvl_uart only UART image. This change reflects it also in the documentation.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: Ie9ce4538d52188dd26d99dfeeb5ad171a5b818f3
show more ...
|
| 57987415 | 26-Jan-2021 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: a3k: Build UART image files directly in $(BUILD_UART) subdirectory
This removes need to move files and also allows to build uart and flash images in parallel.
Signed-off-by:
plat: marvell: armada: a3k: Build UART image files directly in $(BUILD_UART) subdirectory
This removes need to move files and also allows to build uart and flash images in parallel.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I13bea547d7849615e1c1e11d333c8c99e568d3f6
show more ...
|
| d4dc8311 | 26-Jan-2021 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: a3k: Build intermediate files in $(BUILD_PLAT) directory
Currently a3700_common.mk makefile builds intermediate files in TF-A top level directory and also outside of the TF-A
plat: marvell: armada: a3k: Build intermediate files in $(BUILD_PLAT) directory
Currently a3700_common.mk makefile builds intermediate files in TF-A top level directory and also outside of the TF-A tree. This change fixes this issue and builds all intermediate files in $(BUILD_PLAT) directory.
Part of this change is also removal of 'rm' and 'mv' commands as there is no need to remove or move intermediate files from outside of the TF-A build tree.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I72e3a3024bd3fdba1b991a220184d750029491e9
show more ...
|
| b50c715b | 26-Jan-2021 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: a3k: Correctly set DDR_TOPOLOGY and CLOCKSPRESET for WTMI
When building WTMI image we need to correctly set DDR_TOPOLOGY and CLOCKSPRESET variables which WTMI build system exp
plat: marvell: armada: a3k: Correctly set DDR_TOPOLOGY and CLOCKSPRESET for WTMI
When building WTMI image we need to correctly set DDR_TOPOLOGY and CLOCKSPRESET variables which WTMI build system expect. Otherwise it use default values.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: Ib83002194c8a6c64a2014899ac049bd319e1652f
show more ...
|
| 8708a884 | 26-Jan-2021 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: a3k: Allow use of the system Crypto++ library
This change introduces two new A3720 parameters, CRYPTOPP_LIBDIR and CRYPTOPP_INCDIR, which can be used to specify directory path
plat: marvell: armada: a3k: Allow use of the system Crypto++ library
This change introduces two new A3720 parameters, CRYPTOPP_LIBDIR and CRYPTOPP_INCDIR, which can be used to specify directory paths to pre-compiled Crypto++ library and header files.
When both new parameters are specified then the source code of Crypto++ via CRYPTOPP_PATH parameter is not needed. And therefore it allows TF-A build process to use system Crypto++ library.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I6d440f86153373b11b8d098bb68eb7325e86b20b
show more ...
|
| edb4a8a2 | 26-Jan-2021 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: a3k: Add checks that WTP, MV_DDR_PATH and CRYPTOPP_PATH are correctly defined
These variables must contain a path to a valid directory (not a file) which really exists. Also W
plat: marvell: armada: a3k: Add checks that WTP, MV_DDR_PATH and CRYPTOPP_PATH are correctly defined
These variables must contain a path to a valid directory (not a file) which really exists. Also WTP and MV_DDR_PATH must point to either a valid Marvell release tarball or git repository.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I1ad80c41092cf3ea6a625426df62b7d9d6f37815
show more ...
|
| 036e9c17 | 25-Jan-2021 |
Lauren Wehrmeister <lauren.wehrmeister@arm.com> |
Merge changes I635cf82e,Iee3b4e0d into integration
* changes: Makefile: Fix ${FIP_NAME} to be rebuilt only when needed Makefile: Do not mark file targets as .PHONY target |
| b04921f7 | 07-Jan-2021 |
Marek Behún <marek.behun@nic.cz> |
plat: marvell: armada: a3k: improve 4GB DRAM usage from 3.375 GB to 3.75 GB
The current configuration of CPU windows on Armada 37x0 with 4 GB DRAM can only utilize 3.375 GB of memory. This is becaus
plat: marvell: armada: a3k: improve 4GB DRAM usage from 3.375 GB to 3.75 GB
The current configuration of CPU windows on Armada 37x0 with 4 GB DRAM can only utilize 3.375 GB of memory. This is because there are only 5 configuration windows, configured as such (in hexadecimal, also showing ranges not configurable by CPU windows):
0 - 80000000 | 2 GB | DDR | CPU window 0 80000000 - C0000000 | 1 GB | DDR | CPU window 1 C0000000 - D0000000 | 256 MB | DDR | CPU window 2 D0000000 - D2000000 | 32 MB | | Internal regs empty space | | | D8000000 - D8010000 | 64 KB | | CCI regs empty space | | | E0000000 - E8000000 | 128 MB | DDR | CPU window 3 E8000000 - F0000000 | 128 MB | PCIe | CPU window 4 empty space | | | FFF00000 - end | 64 KB | | Boot ROM
This can be improved by taking into account that: - CCI window can be moved (the base address is only hardcoded in TF-A; U-Boot and Linux will not break with changing of this address) - PCIe window can be moved (upstream U-Boot can change device-tree ranges of PCIe if PCIe window is moved)
Change the layout after the Internal regs as such:
D2000000 - F2000000 | 512 MB | DDR | CPU window 3 F2000000 - FA000000 | 128 MB | PCIe | CPU window 4 empty space | | | FE000000 - FE010000 | 64 KB | | CCI regs empty space | | | FFF00000 - end | 64 KB | | Boot ROM
(Note that CCI regs base address is moved from D8000000 to FE000000 in all cases, not only for the configuration with 4 GB of DRAM. This is because TF-A is built with this address as a constant, so we cannot change this address at runtime only on some boards.)
This yields 3.75 GB of usable RAM.
Moreover U-Boot can theoretically reconfigure the PCIe window to DDR if it discovers that no PCIe card is connected. This can add another 128 MB of DRAM (resulting only in 128 MB of DRAM not being used).
Signed-off-by: Marek Behún <marek.behun@nic.cz> Change-Id: I4ca1999f852f90055fac8b2c4f7e80275a13ad7e
show more ...
|
| a9812206 | 24-Nov-2020 |
Pali Rohár <pali@kernel.org> |
Makefile: Do not mark file targets as .PHONY target
Only non-file targets should be set a .PHONY. Otherwise if file target is set as .PHONY then targets which depends on those file .PHONY targets wo
Makefile: Do not mark file targets as .PHONY target
Only non-file targets should be set a .PHONY. Otherwise if file target is set as .PHONY then targets which depends on those file .PHONY targets would be always rebuilt even when their prerequisites are not changed.
File target which needs to be always rebuilt can be specified in Make system via having a prerequisite on some .PHONY target, instead of marking whole target as .PHONY. In Makefile projects it is common to create empty .PHONY target named FORCE for this purpose.
This patch changes all file targets which are set as .PHONY to depends on new .PHONY target FORCE, to ensure that these file targets are always rebuilt (as before). Basically they are those targets which calls external make subprocess.
After FORCE target is specified in main Makefile, remove it from other Makefile files to prevent duplicate definitions.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: Iee3b4e0de93879b95eb29a1745a041538412e69e
show more ...
|
| d9243f26 | 05-Jan-2021 |
Marek Behún <marek.behun@nic.cz> |
plat: marvell: armada: a3k: support doing system reset via CM3 secure coprocessor
Introduce a new build option CM3_SYSTEM_RESET for A3700 platform, which, when enabled, adds code to the PSCI reset h
plat: marvell: armada: a3k: support doing system reset via CM3 secure coprocessor
Introduce a new build option CM3_SYSTEM_RESET for A3700 platform, which, when enabled, adds code to the PSCI reset handler to try to do system reset by the WTMI firmware running on the Cortex-M3 secure coprocessor. (This function is exposed via the mailbox interface.)
The reason is that the Turris MOX board has a HW bug which causes reset to hang unpredictably. This issue can be solved by putting the board in a specific state before reset.
Signed-off-by: Marek Behún <marek.behun@nic.cz> Change-Id: I3f60b9f244f334adcd33d6db6a361fbc8b8d209f
show more ...
|
| e3337082 | 03-Dec-2020 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: a3k: Simplify check if WTP variable is defined
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: Ieb352f0765882efdcb64ef54e6b2a39768590a06 |
| bc1f3687 | 23-Nov-2020 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: a3k: Split building $(WTMI_MULTI_IMG) and $(TIMDDRTOOL)
These two targets are build by make subprocesses and are independent. So splitting them into own targets allow make to
plat: marvell: armada: a3k: Split building $(WTMI_MULTI_IMG) and $(TIMDDRTOOL)
These two targets are build by make subprocesses and are independent. So splitting them into own targets allow make to build them in parallel. $(TIMBUILD) script depends on $(TIMDDRTOOL) so specify it in Makefile.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I139fc7fe64d8de275b01a853e15bfb88c4ff840d
show more ...
|
| e4bbd39c | 23-Nov-2020 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: Add missing FORCE, .PHONY and clean targets
FORCE target is used as a dependency for other file targets which needs to be always rebuilt. .PHONY target is standard Makefile ta
plat: marvell: armada: Add missing FORCE, .PHONY and clean targets
FORCE target is used as a dependency for other file targets which needs to be always rebuilt. .PHONY target is standard Makefile target which specify non-file targets and therefore needs to be always rebuilt.
Targets clean, realclean and distclean are .PHONY targets used to remove built files. Correctly set that mrvl_clean target is prerequisite for these clean targets to ensure that built files are removed.
Finally this change with usage of FORCE target allows to remove mrvl_clean hack from the prerequisites of a8k ${DOIMAGETOOL} target which was used just to ensure that ${DOIMAGETOOL} is always rebuilt via make subprocess.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I2fa8971244b43f101d846fc433ef7b0b6f139c92
show more ...
|
| ed9bae6a | 23-Nov-2020 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: a3k: Use make ifeq/endif syntax for $(MARVELL_SECURE_BOOT) code
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: Id766db4a900a56c795fe5ffdd8a2b80b1aaa2132 |
| bafc9476 | 23-Nov-2020 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: a3k: Build $(WTMI_ENC_IMG) in $(BUILD_PLAT) directory
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: Iaecd6c24bf334a959ac2bf395c3ee49c810b01a7 |
| 2f852b89 | 23-Nov-2020 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: a3k: Do not remove external WTMI image files outside of TF-A repository
Create copy of WTMI images instead of moving them into TF-A build directory.
Signed-off-by: Pali Rohár
plat: marvell: armada: a3k: Do not remove external WTMI image files outside of TF-A repository
Create copy of WTMI images instead of moving them into TF-A build directory.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I2dc24c33b9ce540e4acde51fc1a5c946ae66a5d7
show more ...
|
| 13aa8956 | 23-Nov-2020 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: a3k: Do not modify $(WTMI_MULTI_IMG)
Rather create a temporary copy in $(BUILD_PLAT) and modify only copy.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I256c029106e
plat: marvell: armada: a3k: Do not modify $(WTMI_MULTI_IMG)
Rather create a temporary copy in $(BUILD_PLAT) and modify only copy.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I256c029106ea6f69faa086fc4e5bee9f68cd257f
show more ...
|