summaryrefslogtreecommitdiff
path: root/board/AndesTech
AgeCommit message (Collapse)Author
2024-05-14andes: Unify naming policy for Andes related sourceLeo Yu-Chi Liang
Signed-off-by: Leo Yu-Chi Liang <[email protected]>
2024-01-31spl: riscv: falcon: move fdt blob to specified addressRandolph
In Falcon Boot mode, the fdt blob should be move to the RAM from kernel BSS section. To avoid being cleared by BSS initialisation. SPL_PAYLOAD_ARGS_ADDR is the address where SPL copies. Signed-off-by: Randolph <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2023-12-27andes: ae350: Save cpu name to envLeo Yu-Chi Liang
Detect CPU name through marchid and then save it to env. Signed-off-by: Leo Yu-Chi Liang <[email protected]> Reviewed-by: Yu Chien Peter Lin <[email protected]>
2023-12-27andes: ae350: Implement cache switch via KconfigLeo Yu-Chi Liang
Kconfig provides SYS_[I|D]CACHE_OFF config options to switch off caches. Provide the corresponding implementation to the options. Signed-off-by: Leo Yu-Chi Liang <[email protected]> Reviewed-by: Yu Chien Peter Lin <[email protected]>
2023-10-24riscv: Remove common.h usageTom Rini
We can remove common.h from most cases of the code here, and only a few places need an additional header instead. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Rick Chen <[email protected]>
2023-10-23ae350: Update defconfig listTom Rini
Update the list of defconfigs, this was missed with the last pull request of the u-boot-riscv tree. Signed-off-by: Tom Rini <[email protected]>
2023-10-19riscv: spl: andes: Move the DTB in front of kernelRandolph
Originally, u-boot SPL will place the DTB directly after the kernel, but the size of the kernel does not include the BSS section, This means that u-boot SPL places the DTB in the kernel BSS section causing the DTB to be cleared by the kernel BSS initialisation. Moving the DTB in front of the kernel can avoid this error. Signed-off-by: Randolph <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2023-10-04configs: andes: add vender prefix for target nameRandolph
Modify "CONFIG_TARGET_AE350" to "CONFIG_TARGET_ANDES_AE350" Signed-off-by: Randolph <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2023-02-17riscv: Rename Andes cpu and board namesLeo Yu-Chi Liang
The current ae350-related defconfigs could also support newer Andes CPU IP, so modify the names of CPU from ax25 to andesv5, and board name from ax25-ae350 to ae350. Signed-off-by: Leo Yu-Chi Liang <[email protected]> Reviewed-by: Yu Chien Peter Lin <[email protected]> Reviewed-by: Rick Chen <[email protected]>
2023-02-17board: AndesTech: ax25-ae350.c: Enable v5l2-cache in spl_board_init()Yu Chien Peter Lin
The L2-cache is not enabled currently, the enbale_caches() will call the v5l2_enable() callback to enable it in SPL. Signed-off-by: Yu Chien Peter Lin <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]> Reviewed-by: Rick Chen <[email protected]>
2023-02-01riscv: ae350: support OpenSBI 1.0+ which enable FW_PICRick Chen
Original OpenSBI (without FW_PIC) will relocate itself from 0x1000000 to 0x0. After OpenSBI added FW_PIC codes, it will not relocate any more and always run at 0x1000000. Hence, it may overlap with Kernel memory region. So it is necessary to change OpenSBI address from 0x1000000 to 0x0. More details can refer to commit cb052d771200 ("riscv: qemu: spl: Fix booting Linux kernel with OpenSBI 1.0+") Signed-off-by: Rick Chen <[email protected]> Reviewed-by: Samuel Holland <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2022-10-20riscv: ae350: Check firmware_fdt_addr headerRick Chen
Check firmware_fdt_addr header to see if it is a valid fdt blob. Signed-off-by: Rick Chen <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2022-08-11riscv: ae350: Fix XIP config boot failureLeo Yu-Chi Liang
The booting flow is SPL -> OpenSBI -> U-Boot. The boot hart may change after OpenSBI and may not always be hart0, so wrap the related branch instruction with M-MODE. Current DTB setup for XIP is not valid. There is no chance for CONFIG_SYS_FDT_BASE, the DTB address used in XIP mode, to be returned. Fix this. Fixes: 2e8d2f88439d ("riscv: Remove OF_PRIOR_STAGE from RISC-V boards") Signed-off-by: Rick Chen <[email protected]> Signed-off-by: Leo Yu-Chi Liang <[email protected]>
2022-06-06ax25-ae350: Move CONFIG_SYS_FDT_BASE to KconfigTom Rini
The address where the device tree will be passed in to U-Boot at is now moved to the Kconfig file. If this is user configurable, it needs to be exposed rather than hidden, and should probably be renamed as well. Reviewed-by: Rick Chen <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2022-05-26riscv: ae350: Fix OF_BOARD boot failureRick Chen
Enable OF_HAS_PRIOR_STAGE for ae350 boards with OF_BOARD Fixes: 239d22c79520 ("fdt: Enable OF_HAS_PRIOR_STAGE for most boards with OF_BOARD") Signed-off-by: Rick Chen <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2022-04-25nds32: Remove the architectureTom Rini
As removal of nds32 has been ack'd for the Linux kernel, remove support here as well. Cc: Rick Chen <[email protected]> Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Rick Chen <[email protected]>
2022-04-08nds32: Migrate CONFIG_DEBUG_LED to KconfigTom Rini
Move this value to the board Kconfig file. Signed-off-by: Tom Rini <[email protected]>
2021-11-08riscv: ae350: Use #if defined instead of CONFIG_IS_ENABLEDLeo Yu-Chi Liang
According to ./include/linux/kconfig.h, CONFIG_IS_ENABLED(OF_BOARD) expands to 0 when CONFIG_SPL_BUILD is defined because there is no CONFIG_SPL_OF_BOARD. Use #if defined instead. Fixes: 2e8d2f88439d ("riscv: Remove OF_PRIOR_STAGE from RISC-V boards") Signed-off-by: Leo Yu-Chi Liang <[email protected]> Reviewed-by: Rick Chen <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2021-10-27sandbox: Remove OF_HOSTFILEIlias Apalodimas
OF_HOSTFILE is used on sandbox configs only. Although it's pretty unique and not causing any confusions, we are better of having simpler config options for the DTB. So let's replace that with the existing OF_BOARD. U-Boot would then have only three config options for the DTB origin. - OF_SEPARATE, build separately from U-Boot - OF_BOARD, board specific way of providing the DTB - OF_EMBED embedded in the u-boot binary(should not be used in production Signed-off-by: Ilias Apalodimas <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-10-18riscv: Remove OF_PRIOR_STAGE from RISC-V boardsIlias Apalodimas
At some point back in 2018 prior_stage_fdt_address and OF_PRIOR_STAGE got introduced, in order to support a DTB handed over by an earlier stage boo loader. However we have another option in the Kconfig (OF_BOARD) which has identical semantics. On RISC-V some of the boards pick up the DTB from a1 and copy it in their private gd_t. Apart from that they copy it to prior_stage_fdt_address, if the Kconfig option is selected, which is unnecessary. So let's switch the config option for those boards to OF_BOARD and define the required board_fdt_blob_setup() for them. Signed-off-by: Ilias Apalodimas <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2021-09-04mmc: Rename MMC_SUPPORT to MMCSimon Glass
Rename these options so that CONFIG_IS_ENABLED can be used with them. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Jaehoon Chung <[email protected]> [trini: Fixup some incorrect renames] Signed-off-by: Tom Rini <[email protected]>
2021-05-19riscv: ae350: Switch to use binman to generate u-boot.itbBin Meng
Use the new BINMAN_STANDALONE_FDT option for AE350 based SPL defconfigs, so that binman is now used to generate u-boot.itb. Signed-off-by: Bin Meng <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Rick Chen <[email protected]>
2021-02-15Merge branch '2021-02-02-drop-asm_global_data-when-unused'Tom Rini
- Merge the patch to take <asm/global_data.h> out of <common.h>
2021-02-03riscv: ax25-ae350: Cast addr with uintptr_tBin Meng
addr was delcared as fdt_addr_t which is now a 64-bit address. In a 32-bit build, this causes the following warning seen when building ax25-ae350.c: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Cast addr with uintptr_t. Signed-off-by: Bin Meng <[email protected]>
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 <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2020-07-24riscv: ae350: Use fdtdec_get_addr_size_auto_noparent to parse smc regRick Chen
Use fdtdec_get_addr_size_auto_noparent to read the "reg" property instead of fdtdec_get_addr. This will increase the compatibility of dtb parsing. Signed-off-by: Rick Chen <[email protected]> Acked-by: Leo Liang <[email protected]> Reviewed-by: Bin Meng <[email protected]> Tested-by: Leo Liang <[email protected]>
2020-07-17treewide: convert bd_t to struct bd_info by coccinelleMasahiro Yamada
The Linux coding style guide (Documentation/process/coding-style.rst) clearly says: It's a **mistake** to use typedef for structures and pointers. Besides, using typedef for structures is annoying when you try to make headers self-contained. Let's say you have the following function declaration in a header: void foo(bd_t *bd); This is not self-contained since bd_t is not defined. To tell the compiler what 'bd_t' is, you need to include <asm/u-boot.h> #include <asm/u-boot.h> void foo(bd_t *bd); Then, the include direcective pulls in more bloat needlessly. If you use 'struct bd_info' instead, it is enough to put a forward declaration as follows: struct bd_info; void foo(struct bd_info *bd); Right, typedef'ing bd_t is a mistake. I used coccinelle to generate this commit. The semantic patch that makes this change is as follows: <smpl> @@ typedef bd_t; @@ -bd_t +struct bd_info </smpl> Signed-off-by: Masahiro Yamada <[email protected]>
2020-05-18common: Drop image.h from common headerSimon Glass
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <[email protected]>
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 <[email protected]>
2020-05-18common: Drop flash.h from common headerSimon Glass
Move this uncommon header out of the common header. Fix up some style problems in flash.h while we are here. Signed-off-by: Simon Glass <[email protected]>
2020-01-17common: Move RAM-sizing functions to init.hSimon Glass
These functions relate to memory init so move them into the init header. Signed-off-by: Simon Glass <[email protected]>
2019-12-10riscv: ax25-ae350: Use generic memory size setupRick Chen
To get memory size from device tree instead of get_ram_size(). This can avoid memory access fault in U-Boot proper after PMP configurations in OpenSBI. Signed-off-by: Rick Chen <[email protected]> Cc: KC Lin <[email protected]> Cc: Alan Kao <[email protected]>
2019-12-10riscv: ax25-ae350: add SPL configurationRick Chen
This patch provides four configurations which can support U-Boot SPL to boot from RAM or FLASH and then boot FIT image including OpenSBI FW_DYNAMIC firmware and U-Boot proper images from RAM or MMC boot devices. With ae350_rv[32|64]_spl_defconfigs: U-Boot SPL will be loaded by gdb or FSBL and runs in RAM in machine mode and then load FIT image from RAM device on AE350. With ae350_rv[32|64]_spl_xip_defconfigs: U-Boot SPL can be burned into SPI flash and run in flash in machine mode and then load FIT image from SPI flash or MMC device on AE350. Signed-off-by: Rick Chen <[email protected]> Cc: KC Lin <[email protected]> Cc: Alan Kao <[email protected]>
2019-09-03riscv: ae350: use the v5l2 driver to configure the cacheRick Chen
Find the UCLASS_CACHE driver to configure the cache controller's settings. Signed-off-by: Rick Chen <[email protected]> Cc: KC Lin <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2019-05-09riscv: configs: AE350 will use CONFIG_OF_SEPARATE when boots from flashRick Chen
When AE350 boots from flash, use CONFIG_OF_SEPARATE instead of CONFIG_OF_BOARD. Also remove unused code about prior_stage_fdt_address. And modify CONFIG_SYS_FDT_BASE as flash address. Signed-off-by: Rick Chen <[email protected]> Cc: Greentime Hu <[email protected]> Reviewed-by: Bin Meng <[email protected]> Reviewed-by: Lukas Auer <[email protected]>
2019-05-09riscv: configs: Support AE350 SMP booting from flash flowRick Chen
Add two defconfigs to support AE350 SMP booting from flash. Signed-off-by: Rick Chen <[email protected]> Cc: Greentime Hu <[email protected]> Reviewed-by: Bin Meng <[email protected]> Reviewed-by: Lukas Auer <[email protected]>
2019-04-08riscv: ae350: enable SMPRick Chen
Signed-off-by: Rick Chen <[email protected]> Cc: Greentime Hu <[email protected]> Reviewed-by: Bin Meng <[email protected]> Reviewed-by: Lukas Auer <[email protected]>
2018-12-18riscv: configs: Rename ax25-ae350 defconfigRick Chen
Remove cpu name from the defconfig naming. Because other cpus maybe run on AE350 platform. So only use platfrom name in defconfig naming will be better. Also sync MAINTAINERS: Rename a25-ae350_32_defconfig as ae350_rv32_defconfig ax25-ae350_64_defconfig as ae350_rv64_defconfig Signed-off-by: Rick Chen <[email protected]> Cc: Greentime Hu <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2018-12-18riscv: ax25: Hide the ax25-specific Kconfig optionBin Meng
There is no need to expose RISCV_NDS to the Kconfig menu as it is an ax25-specific option. Introduce a dedicated Kconfig option for the cache ops of ax25 platform and use that to guard the cache ops. Signed-off-by: Bin Meng <[email protected]> Reviewed-by: Lukas Auer <[email protected]> Reviewed-by: Rick Chen <[email protected]>
2018-12-05riscv: ax25-ae350: Pass dtb address to u-boot with a1 registerRick Chen
ax25-ae350 use CONFIG_OF_BOARD via a2 and CONFIG_SYS_SDRAM_BASE to boot from ram which allow the board to override the fdt address originally. But after this patch riscv: save hart ID and device tree passed by prior boot stage It provide prior_stage_fdt_address which offer a temporary memory address to keep the dtb address passing from loader(gdb) to u-boot with a1. So passing via a2 and CONFIG_SYS_SDRAM_BASE is redundant and can be removed. And it also somehow may corrupted BBL if it was be arranged in CONFIG_SYS_SDRAM_BASE. In board_fdt_blob_setup() When boting from ram: prior_stage_fdt_address will be use to reserved dtb temporarily. When booting from ROM: dtb will be pre-burned in CONFIG_SYS_FDT_BASE, if it is flash base. Or CONFIG_SYS_FDT_BASE maybe a memory map space (NOT RAM or ROM) which is provided by HW. Signed-off-by: Rick Chen <[email protected]> Cc: Greentime Hu <[email protected]>
2018-11-26Merge git://git.denx.de/u-boot-riscvTom Rini
2018-10-03riscv: Remove mach typeBin Meng
Since the mach_id is not used by RISC-V, remove it. Signed-off-by: Bin Meng <[email protected]> Reviewed-by: Lukas Auer <[email protected]>
2018-05-29board: ax25-ae350: Support cfi flashRick Chen
Add smc_init() to get register base from dts and deal with atfsmc020 controler initialzation job. Write protect is enabled by default. So WP shall be disabled when startup, then cfi flash can be detected and erasing and writing can be executed. Adp-ae3xx and adp-ag101p both do smc initilize job in lowlevel_init.S and get register base fron CONFIG_FTSMC020_BASE. They also can be moved those codes to board stage. Remind them as todo jobs. After that CONFIG_FTSMC020_BASE can be removed. Signed-off-by: Rick Chen <[email protected]> Signed-off-by: Rick Chen <[email protected]> Cc: Greentime Hu <[email protected]>
2018-05-29board: nx25-ae250: Rename as ax25-ae350Rick Chen
Rename nx25 as ax25 ae250 as ae350 nx25-ae250 as ax25-ae350 including filename, variable, string and definition. Signed-off-by: Rick Chen <[email protected]> Signed-off-by: Rick Chen <[email protected]> Cc: Greentime Hu <[email protected]>
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 <[email protected]>
2018-03-30riscv: ae250: Support DT provided by the board at runtimeRick Chen
Enable CONFIG_OF_BOAD to support delivery dtb to u-boot at run time instead of embedded. There are two methods to delivery dtb. 1 Pass from loader: When u-boot boot from RAM, gdb or loader can pass dtb via a2 to u-boot dynamically. Of course gdb or loader shall be in charge of dtb delivery. 2 Configure CONFIG_SYS_FDT_BASE: It can be configured as RAM or ROM base statically, no mater u-boot boot from RAM or ROM. If it was configured as ROM base, dtb can be burned into ROM(spi flash) by spi driver. Meanwhile remove CONFIG_SKIP_LOWLEVEL_INIT which is useless in nx25-ae250 configuration. Signed-off-by: Rick Chen <[email protected]> Signed-off-by: Rick Chen <[email protected]> Cc: Greentime Hu <[email protected]>
2018-03-30board: Drop ftsdc010 non-dm codeRick Chen
Remove board_mmc_init() in adp-ag101p, adp-ae3xx and nx25-ae250 boards. Signed-off-by: Rick Chen <[email protected]> Signed-off-by: Rick Chen <[email protected]> Cc: Greentime Hu <[email protected]>
2018-01-12riscv: board: Add nx25-ae250 to support RISC-VRick Chen
Add nx25-ae250 board to do platform initializations. Signed-off-by: Rick Chen <[email protected]> Signed-off-by: Rick Chen <[email protected]> Signed-off-by: Greentime Hu <[email protected]>
2017-11-30nds32: board: Support ftsdc010 DM.Rick Chen
AG101P/AE3XX enable ftsdc010 dm flow. Signed-off-by: Rick Chen <[email protected]>
2017-09-21nds32: board: Fix andestech adp-ae3xx.c make fail problem.rick
Add #include <asm/mach-types.h> to fix it. Signed-off-by: rick <[email protected]>