summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-08-14configs: evb-ast2500: Convert to OF_SEPARATEChia-Wei, Wang1-1/+0
Switch DTB provider form OF_EMBED to OF_SEPARATE to avoid the compile warning message: ==================== WARNING ====================== CONFIG_OF_EMBED is enabled. This option should only be used for debugging purposes. Please use CONFIG_OF_SEPARATE for boards in mainline. See doc/README.fdt-control for more info. ==================================================== Signed-off-by: Chia-Wei, Wang <chiawei_wang@aspeedtech.com>
2020-08-14configs: evb-ast2500: Move BOOTCOMMAND from header to defconfigChia-Wei, Wang2-2/+2
Move the BOOTCOMMAND definition from the board inclusion header to the default configuration file. Signed-off-by: Chia-Wei, Wang <chiawei_wang@aspeedtech.com>
2020-08-14include/configs: aspeed: Remove hardcoded variablesChia-Wei, Wang2-7/+29
The hardcoded platform variables such as DRAM base address are not common to Aspeed SoCs AST24xx/AST25xx/AST26xx. This patch replaces those hardcoded with macros defined in a newly added header, where the basic SoC HW information are assigned accordingly. Signed-off-by: Chia-Wei, Wang <chiawei_wang@aspeedtech.com>
2020-08-14cosmetic: aspeed: ast2500: Rename board fileChia-Wei, Wang3-1/+2
Rename the ast2500-board.c to board_common.c and place the renamed file under the ast2500 folder. Signed-off-by: Chia-Wei, Wang <chiawei_wang@aspeedtech.com>
2020-08-14aspeed: ast2500: Add lowlevel_init assemblyChia-Wei, Wang3-25/+42
The original lowlevel_init function of AST2500 is written in C. However, the C runtime environment is not ready until _main execution. This patch adds the assembly version of the lowlevel_init function. Additional initialization to DRAM configuration and LPC reset source are also added. Signed-off-by: Chia-Wei, Wang <chiawei_wang@aspeedtech.com>
2020-08-14MAINTAINERS: Add maintainers for Aspeed SoCsChia-Wei, Wang1-0/+12
Update maintainers for Aspeed SoC platforms. Signed-off-by: Chia-Wei, Wang <chiawei_wang@aspeedtech.com>
2020-08-14drivers: pcie: add Broadcom IPROC PCIe RC driverSrinath Mannam3-0/+1295
Add support for IPROC PAXC PCIe RC driver. Signed-off-by: Srinath Mannam <srinath.mannam@broadcom.com> Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-08-14drivers: pci: add api to get dma regionsRayagonda Kokatanur2-1/+44
Add api to get dma regions. Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
2020-08-14Merge https://gitlab.denx.de/u-boot/custodians/u-boot-riscvTom Rini14-110/+201
- Fix HiFive Unleashed the broken problem by call fix_fdt() before reserve_fdt(). Please refer to https://www.mail-archive.com/u-boot@lists.denx.de/msg379444.html for master u-boot broken for HiFive Unleashed. - Add unaligned exception cmd. - Refine sifive/fu540 spl flow. - Add additional crash information for efi. - Update sipeed/maix doc. - Two minor refine.
2020-08-14common/board_f: make sure to call fix_fdt() before reserve_fdt()Pragnesh Patel1-3/+3
There may be a chance that board specific fix_fdt() will change the size of FDT blob so it's safe to call reserve_fdt() after fix_fdt() otherwise global data (gd) will overwrite with FDT blob values. Fixes: a8492e25ac71 ("riscv: Expand the DT size before copy reserved memory node") Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Rick Chen <rick@andestech.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
2020-08-14riscv: additional crash informationHeinrich Schuchardt1-22/+35
If an exception occurs, the relocated program counter and return address are required for an analysis. With this patch you get: => exception undefined Unhandled exception: Illegal instruction EPC: 0000000080595908 RA: 000000008059c0c6 TVAL: 000000008030c01e EPC: 0000000080007908 RA: 000000008000e0c6 reloc adjusted We can use the relocated addresses to find the involved functions in u.boot.map: .text.do_undefined 0x0000000080007908 0x8 cmd/built-in.o .text.cmd_process 0x000000008000dfcc 0x11a common/built-in.o 0x000000008000dfcc cmd_process If an exception occurs in an UEFI binary additionally the load addresses of the UEFI binaries are needed. With this patch: => setenv efi_selftest exception => bootefi selftest Unhandled exception: Illegal instruction EPC: 000000008042e18a RA: 000000008042e18a TVAL: 000000008030c01e EPC: 000000007fea018a RA: 000000007fea018a reloc adjusted UEFI image [0x0000000000000000:0xffffffffffffffff] '/\selftest' UEFI image [0x000000008042e000:0x000000008042e43f] pc=0x18a '/bug.efi' The value pc=0x18a matches the position of the illegal instruction in efi_selftest_miniapp_exception.efi (loaded as /bug.efi); asm volatile (".word 0xffffffff\n"); 00000180 93 85 C5 11 1C 64 22 85 82 97 FF FF FF FF 1C 64 Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Sean Anderson <seanga2@gmail.com> Tested-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Rick Chen <rick@andestech.com>
2020-08-14cmd: exception: unaligned data access on RISC-VHeinrich Schuchardt1-1/+16
The command 'exception' can be used to test the handling of exceptions. Currently the exception command only allows to create an illegal instruction exception on RISC-V. Provide a sub-command 'exception unaligned' to cause a misaligned load address exception. Adjust the online help for 'exception undefined'. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Rick Chen <rick@andestech.com>
2020-08-14doc: riscv: debug UART for MAIXHeinrich Schuchardt1-0/+10
Provide the required settings for the debug UART. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Sean Anderson <seanga2@gmail.com>
2020-08-14doc: riscv: Update documentation for Sipeed MAIX boardsHeinrich Schuchardt1-9/+66
The MAIXDUINO runs fine with the sipeed_maix_bitm_defconfig but a different board id parameter should be passed to kflash. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Sean Anderson <seanga2@gmail.com>
2020-08-14riscv: sifive: fu540: redundant initializationHeinrich Schuchardt1-1/+1
We should not initialize a variable if the value is overwritten before being read. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Pragnesh Patel <pragnesh.patel@sifive.com> Tested-by: Pragnesh Patel <pragnesh.patel@sifive.com> Reviewed-by: Rick Chen <rick@andestech.com>
2020-08-14riscv: remove redundant logical constraint.Heinrich Schuchardt1-1/+1
After if (ret) return ret; we know that ret is zero. Don't check it again. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Rick Chen <rick@andestech.com>
2020-08-14riscv: sifive/fu540: Move SPL related functions to spl.cBin Meng2-34/+32
It's better to keep all SPL related functions in the same spl.c. Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Leo Liang <ycliang@andestech.com> Reviewed-by: Rick Chen <rick@andestech.com> Reviewed-by: Pragnesh Patel <pragnesh.patel@sifive.com> Tested-by: Pragnesh Patel <pragnesh.patel@sifive.com>
2020-08-14riscv: sifive/fu540: Drop NET_RANDOM_ETHADDRBin Meng1-1/+0
This option was enabled during the earlier U-Boot porting time. Now we already have the OTP driver in place and the unique MAC address is read from the OTP, there is no need to turn on this option. Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Leo Liang <ycliang@andestech.com> Reviewed-by: Rick Chen <rick@andestech.com> Reviewed-by: Pragnesh Patel <pragnesh.patel@sifive.com> Tested-by: Pragnesh Patel <pragnesh.patel@sifive.com>
2020-08-14riscv: sifive/fu540: kconfig: Move FU540 driver related options to the SoC levelBin Meng2-22/+22
All FU540 driver related options should be in the SoC level Kconfig. Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Rick Chen <rick@andestech.com> Reviewed-by: Pragnesh Patel <pragnesh.patel@sifive.com> Tested-by: Pragnesh Patel <pragnesh.patel@sifive.com>
2020-08-14riscv: sifive/fu540: spl: Rename soc_spl_init()Bin Meng3-3/+3
spl_soc_init() seems to be a better name, as all SPL functions names start from the spl_ prefix. Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Rick Chen <rick@andestech.com> Reviewed-by: Pragnesh Patel <pragnesh.patel@sifive.com> Tested-by: Pragnesh Patel <pragnesh.patel@sifive.com>
2020-08-14riscv: sifive/fu540: spl: Drop our own version of board_init_f()Bin Meng1-18/+1
Use the generic board_init_f() provided by the RISC-V library codes. Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Rick Chen <rick@andestech.com> Reviewed-by: Pragnesh Patel <pragnesh.patel@sifive.com> Tested-by: Pragnesh Patel <pragnesh.patel@sifive.com>
2020-08-14riscv: Call spl_board_init_f() in the generic SPL board_init_f()Bin Meng2-0/+16
The generic SPL version of board_init_f() should give a call to board specific codes to initialize board in the SPL phase. Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Rick Chen <rick@andestech.com> Reviewed-by: Pragnesh Patel <pragnesh.patel@sifive.com> Tested-by: Pragnesh Patel <pragnesh.patel@sifive.com>
2020-08-13Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvellTom Rini4-0/+9
- Fix dtc warnings for some MVEBU boards
2020-08-13Merge tag 'u-boot-stm32-20200813' of ↵Tom Rini20-519/+1627
https://gitlab.denx.de/u-boot/custodians/u-boot-stm - Use IS_ENABLED to prevent ifdef in board_key_check for STM32MP - Add STM32 FMC2 EBI controller driver - Fix dwc3-sti-glue which allows STiH410-B2260 to boot again - Add fitImage its entry for 587-200 DHCOR SoM - Add both PDK2 and DRC02 DT into DHCOM fitImage its - Fix DHCOM KS8851 ethernet MAC address - Remove stm32mp1 board.c file - Use const for struct node_info in board stm32mp1.c file
2020-08-13arm: mvebu: armada-3720-turris-mox.dts: Fix dtc warningStefan Roese1-0/+2
Fix this dtc warning: Warning (avoid_default_addr_size) Signed-off-by: Stefan Roese <sr@denx.de> Cc: Marek Behún <marek.behun@nic.cz>
2020-08-13arm: mvebu: armada-388-gp.dts: Fix dtc warningsStefan Roese1-0/+2
Fix these dtc warnings: Warning (reg_format) Warning (avoid_default_addr_size) Signed-off-by: Stefan Roese <sr@denx.de> Cc: Chris Packham <judge.packham@gmail.com> Reviewed-by: Chris Packham <judge.packham@gmail.com>
2020-08-13arm: mvebu: armada-xp-maxbcm.dts: Fix dtc warningStefan Roese1-0/+3
Fix this dtc warning: Warning (avoid_default_addr_size) Signed-off-by: Stefan Roese <sr@denx.de>
2020-08-13arm: mvebu: armada-xp-theadorable.dts: Fix dtc warningStefan Roese1-0/+2
Fix this dtc warning: Warning (avoid_default_addr_size) Signed-off-by: Stefan Roese <sr@denx.de>
2020-08-13board: stm32mp1: use const for struct node_infoPatrick Delaunay1-1/+1
Use const for the variable nodes in ft_board_setup, this patch follow fdt_fixup_mtdparts prototype and no more use stack. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-08-13board: stm32mp1: remove board.cPatrick Delaunay1-36/+0
Remove the file board/st/stm32mp1/board.c which is not more compiled since commit 156732cc8939 ("board: stm32mp1: move the function board_debug_uart_init in spl.c") Fixes: 4fb46816c7e2 ("board: stm32mp1: move the function board_debug_uart_init in spl.c") Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-08-13ARM: dts: stm32: Update eth1addr from EEPROM if eth1 presentMarek Vasut2-2/+24
The STM32MP1 DHCOM has two ethernet interfaces, the on-SoM DWMAC and KS8851. Set eth1addr for the KS8851 to a MAC address of the DWMAC incremented by 1. The MAC of the DWMAC is set from on-SoM EEPROM already, but the MAC address of KS8851 was left uninitialized, so fix this. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Patrice Chotard <patrice.chotard@st.com> Cc: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-08-13ARM: stm32: Add fitImage its entry for 587-200 DHCOR SoMMarek Vasut1-0/+14
The new 587-200 DHCOR SoM is compatible with the 587-100 prototype, hence just replicate the entries, as there is no pattern matching. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Patrice Chotard <patrice.chotard@st.com> Cc: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-08-13ARM: stm32: Add both PDK2 and DRC02 DT into DHCOM fitImage itsMarek Vasut4-4/+26
Include both PDK2 and DRC02 DTs in the DHCOM fitImage .its and implement support in SPL to select the correct configuration entry for U-Boot by using the machine compatible string from SPL DT. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Patrice Chotard <patrice.chotard@st.com> Cc: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-08-13ARM: dts: stm32: add FMC2 EBI support for stm32mp157cChristophe Kerello2-21/+38
This patch adds FMC2 External Bus Interface support on stm32mp157c. Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-08-13configs: stm32mp: add CONFIG_STM32_FMC2_EBIChristophe Kerello2-0/+2
This patch enables the support of FMC2 EBI. Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-08-13board: stm32mp1: update fdt fixup partitions tableChristophe Kerello1-0/+1
This patch adds "st,stm32mp1-fmc2-nfc" compatible string in the fdt fixup partitions table. Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-08-13mtd: rawnand: stm32_fmc2: get resources from parent nodeChristophe Kerello1-28/+59
FMC2 EBI support has been added. Common resources (registers base address and clock) can now be shared between the 2 drivers using "st,stm32mp1-fmc2-nfc" compatible string. It means that the common resources should now be found in the parent device when EBI node is available. Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-08-13memory: stm32-fmc2-ebi: add STM32 FMC2 EBI controller driverChristophe Kerello3-0/+1066
The driver adds the support for the STMicroelectronics FMC2 EBI controller found on STM32MP SOCs. Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-08-13mtd: rawnand: stm32_fmc2: use clrsetbits_le32Christophe Kerello1-35/+21
This patch uses clrsetbits_le32 function instead of multiple instructions. Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-08-13mtd: rawnand: stm32_fmc2: use FIELD_PREP/FIELD_GET macrosChristophe Kerello1-64/+56
This patch removes custom macros and uses FIELD_PREP and FIELD_GET macros. Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-08-13mtd: rawnand: stm32_fmc2: cosmetic change to use nfc instead of fmc2 where ↵Christophe Kerello1-132/+131
relevant This patch renames functions and local variables. This cleanup is done to get all functions starting by stm32_fmc2_nfc in the FMC2 raw NAND driver when all functions will start by stm32_fmc2_ebi in the FMC2 EBI driver. Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-08-13mtd: rawnand: stm32_fmc2: use FMC2_TIMEOUT_5S for timeoutsChristophe Kerello1-3/+5
FMC2_TIMEOUT_5S will be used each time that we need to wait. It was seen, during stress tests in an overloaded system, that we could be close to 1 second, even if we never met this value. To be safe, FMC2_TIMEOUT_MS is set to 5 seconds. Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-08-13mtd: rawnand: stm32_fmc2: remove useless inline commentsChristophe Kerello1-25/+0
Remove inline comments that are useless since function label are self explanatory. Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-08-13mtd: rawnand: stm32_fmc2: fix a buffer overflowChristophe Kerello1-1/+1
The chip select defined in the device tree could only be 0 or 1. Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-08-13arm: stm32mp: stm32prog: use IS_ENABLED to prevent ifdefPatrick Delaunay2-47/+58
Use IS_ENABLED to prevent ifdef in stm32prog command. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-08-13arm: stm32mp: bsec: use IS_ENABLED to prevent ifdefPatrick Delaunay1-40/+46
Use IS_ENABLED to prevent ifdef in bsec driver. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-08-13board: stm32mp1: use IS_ENABLED to prevent ifdef in ft_board_setupPatrick Delaunay1-3/+3
Use IS_ENABLED to prevent ifdef in ft_board_setup. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-08-13board: stm32mp1: use IS_ENABLED to prevent ifdef in env functionsPatrick Delaunay1-19/+17
Use IS_ENABLED to prevent ifdef in env functions: - env_get_location - env_ext4_get_intf - mmc_get_env_dev Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-08-13board: stm32mp1: use IS_ENABLED to prevent ifdef in board_late_initPatrick Delaunay1-30/+30
Use IS_ENABLED to prevent ifdef in board_late_init. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-08-13board: stm32mp1: use IS_ENABLED to prevent ifdef in dk2_i2c1_fixPatrick Delaunay1-5/+5
Use IS_ENABLED to prevent ifdef in dk2_i2c1_fix. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>