aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-02-04x86: Update coreboot serial table structSimon Glass
Since mid 2016, coreboot has additional fields in the serial struct that it passes down to U-Boot. Add these so we are in sync. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-04serial: ns16550: Support run-time configurationSimon Glass
At present this driver uses an assortment of CONFIG options to control how it accesses the hardware. This is painful for platforms that are supposed to be controlled by a device tree or a previous-stage bootloader. Add a new CONFIG option to enable fully dynamic configuration. This controls register spacing, size, offset and endianness. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Aiden Park <aiden.park@intel.com> Tested-by: Aiden Park <aiden.park@intel.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: squashed in http://patchwork.ozlabs.org/patch/1232929/] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-02Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini
- DFU and Cadence USB 3 fixes
2020-02-02dfu: Add option to skip empty pages when flashing UBI images to NANDGuillermo Rodríguez
Add a new option to enable the DROP_FFS flag when flashing UBI images to NAND in order to drop trailing all-0xff pages. This is similar to the existing FASTBOOT_FLASH_NAND_TRIMFFS option. Signed-off-by: Guillermo Rodriguez <guille.rodriguez@gmail.com> Cc: Lukasz Majewski <lukma@denx.de>
2020-02-02usb: cdns3: ep0: Invalidate cache before reading Setup PacketVignesh Raghavendra
Invalidate dcache line before accessing Setup Packet contents. Otherwise driver will see stale content on non coherent architecture. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2020-02-01Merge tag 'u-boot-rockchip-20200130' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip - Support redundant boot for rk3399 - Support binman for rockchip platform - Update ram driver and add ddr4 support for rk3328
2020-01-31Merge tag 'uniphier-v2020.04-2' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-uniphier UniPhier SoC updates for v2020.04 (2nd) Denali NAND driver changes: - Set up more registers in denali-spl for SOCFPGA - Make clocks optional - Do not assert reset signals in the remove hook - associate SPARE_AREA_SKIP_BYTES with DT compatible - switch to UCLASS_MTD UniPhier platform changes: - fix a bug in dram_init() - specify loadaddr for "source" command
2020-02-01ARM: uniphier: use $loadaddr for source commandMasahiro Yamada
If the "source" command is not given the address, it uses CONFIG_SYS_LOAD_ADDR, which is compile-time determined. Using the "loadaddr" environment variable is handier because it is relocated according to the memory base when CONFIG_POSITION_INDEPENDENT is enabled. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-02-01ARM: uniphier: set gd->ram_base correctlyMasahiro Yamada
gd->ram_base is not set at all if the end address of the DRAM ch0 exceeds the 4GB limit. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-02-01mtd: rawnand: denali_dt: use UCLASS_MTD instead of UCLASS_MISCMasahiro Yamada
UCLASS_MTD is a better fit for NAND drivers. Make NAND_DENALI_DT depend on DM_MTD, which is needed to compile drivers/mtd/mtd-uclass.c Also, make ARCH_UNIPHIER select DM_MTD because all the defconfig of this platform enables NAND_DENALI_DT. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
2020-02-01ARM: uniphier: remove adhoc reset deassertion for the NAND controllerMasahiro Yamada
Now that the reset controlling of the Denali NAND driver (denali_dt.c) works for this platform, remove the adhoc reset deassert code. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-02-01mtd: rawnand: denali: set SPARE_AREA_SKIP_BYTES based on DT compatibleMasahiro Yamada
Currently, the denali NAND driver in U-Boot configures the SPARE_AREA_SKIP_BYTES based on the CONFIG option. Recently, Linux kernel merged a patch that associates the proper value for this register with the DT compatible string. Do likewise in U-Boot too. The denali_spl.c still uses CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-02-01mtd: rawnand: denali_dt: insert udelay() after reset deassertMasahiro Yamada
When the reset signal is de-asserted, the HW-controlled bootstrap starts running unless it is disabled in the SoC integration. It issues some commands to detect a NAND chip, and sets up registers automatically. Until this process finishes, software should avoid any register access. Without this delay function, some of UniPhier boards hangs up while executing nand_scan_ident(). (denali_read_byte() is blocked) Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-02-01mtd: rawnand: denali: Do not reset the block before booting the kernelMarek Vasut
The Denali NAND driver in mainline Linux currently cannot deassert the reset. The upcoming Linux 5.6 will support the reset controlling, and also set up SPARE_AREA_SKIP_BYTES correctly. So, the Denali driver in the future kernel will work without relying on any bootloader or firmware. However, we still need to take care of stable kernel versions for a while. U-boot should not assert the reset of this controller. Fixes: ed784ac3822b ("mtd: rawnand: denali: add reset handling") Signed-off-by: Marek Vasut <marex@denx.de> [yamada.masahiro: reword the commit description] Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-02-01mtd: rawnand: denali_dt: make the core clock optionalMasahiro Yamada
The "nand_x" and "ecc" clocks are currently optional. Make the core clock optional in the same way. This will allow platforms with no clock driver support to use this driver. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Tested-by: Marek Vasut <marex@denx.de> # On SoCFPGA Arria V
2020-02-01mtd: rawnand: denali-spl: Add missing hardware init on SoCFPGAMarek Vasut
On Altera SoCFPGA, upon either cold-boot or power-on reset, the Denali NAND IP is initialized by the BootROM ; upon warm-reset, the Denali NAND IP is NOT initialized by BootROM. In fact, upon warm-reset, the SoCFPGA BootROM checks whether the SPL image in on-chip RAM is valid and if so, completely skips re-loading the SPL from the boot media. This does sometimes lead to problems where the software left the boot media in inconsistent state before warm-reset, and because the BootROM does not reset the boot media, the boot media is left in this inconsistent state, often until another component attempts to access the boot media and fails with an difficult to debug failure. To mitigate this problem, the SPL on Altera SoCFPGA always resets all the IPs on the SoC early on boot. This results in a couple of register values, pre-programmed by the BootROM, to be lost during this reset. To restore correct operation of the IP on SoCFPGA, these values must be programmed back into the controller by the driver. Note that on other SoCs which do not use the HW-controlled bootstrap, more registers may have to be programmed. This also aligns the SPL behavior with the full Denali NAND driver, which sets these values in denali_hw_init(). Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-01-30Merge branch '2020-01-30-master-imports'Tom Rini
- Assorted minor fixes - Revert 6dcb8ba4 from upstream libfdt to restore boot-time speed on many platforms.
2020-01-30Remove redundant YYLOC global declarationPeter Robinson
Same as the upstream fix for building dtc with gcc 10. Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2020-01-30Makefile: Fix the location of the migration fileFabio Estevam
Since commit e1910d93b890 ("doc: driver-model: Convert MIGRATION.txt to reST") MIGRATION.txt has been converted to migration.rst, so update the Makefile references accordingly. Fixes: e1910d93b890 ("doc: driver-model: Convert MIGRATION.txt to reST") Signed-off-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2020-01-30tools: buildman: fix typoFlavio Suligoi
Signed-off-by: Flavio Suligoi <f.suligoi@asem.it> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-01-30net: fix typoFlavio Suligoi
Signed-off-by: Flavio Suligoi <f.suligoi@asem.it>
2020-01-30MAINTAINERS: board: hisi: poplar: update emailJorge Ramirez-Ortiz
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
2020-01-30MAINTAINERS: board: qcom: db820c: update emailJorge Ramirez-Ortiz
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
2020-01-30libfdt: Revert 6dcb8ba4 from upstream libfdtTom Rini
In upstream libfdt, 6dcb8ba4 "libfdt: Add helpers for accessing unaligned words" introduced changes to support unaligned reads for ARM platforms and 11738cf01f15 "libfdt: Don't use memcpy to handle unaligned reads on ARM" improved the performance of these helpers. In practice however, this only occurs when the user has forced the device tree to be placed in memory in a non-aligned way, which in turn violates both our rules and the Linux Kernel rules for how things must reside in memory to function. This "in practice" part is important as handling these other cases adds visible (1 second or more) delay to boot in what would be considered the fast path of the code. Cc: Patrice CHOTARD <patrice.chotard@st.com> Cc: Patrick DELAUNAY <patrick.delaunay@st.com> Link: https://www.spinics.net/lists/devicetree-compiler/msg02972.html Signed-off-by: Tom Rini <trini@konsulko.com> Tested-by: Patrice Chotard <patrice.chotard@st.com>
2020-01-30Consistently use nproc for counting the CPUsHeinrich Schuchardt
Coreutils command nproc can be used on Linux and BSD to count the number of available CPU cores. Use this instead of relying on the parsing of the Linux specific proc file system. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-01-30optee: Replace uninitialized return variable by proper one.Christoph Müllner
As hinted by GCC 9, there is a return statement that returns an uninitialized variable in optee_copy_firmware_node(). This patch addresses this. Signed-off-by: Christoph Müllner <christoph.muellner@theobroma-systems.com> Reviewed-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
2020-01-30tools: correct Markdown in concurrencytest/README.mdHeinrich Schuchardt
Remove incorrect indentation. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-01-30common/board_f.c: Remove arch-specific checks for cpucheckOvidiu Panait
This removes the arch-specific checks for "checkcpu" function from the init sequence. Make "checkcpu" generic and provide a weak nop stub instead. Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
2020-01-30cmd/gpt: Address error cases during gpt rename more correctlyTom Rini
New analysis by the tool has shown that we have some cases where we weren't handling the error exit condition correctly. When we ran into the ENOMEM case we wouldn't exit the function and thus incorrect things could happen. Rework the unwinding such that we don't need a helper function now and free what we may have allocated. Fixes: 18030d04d25d ("GPT: fix memory leaks identified by Coverity") Reported-by: Coverity (CID: 275475, 275476) Cc: Alison Chaiken <alison@she-devel.com> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Jordy <jordy@simplyhacker.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
2020-01-30configs: firefly-rk3399: Enable CONFIG_MISC_INIT_R and ROCKCHIP_EFUSEMark Kettenis
This enables readning the cpuid from e-fuse, and deriving a static MAC address from it. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-01-30rockchip: rk3308: add alias for emmc/sdmmcKever Yang
Add alias for mmc/sdmmc so that we can have a fix mmc number for emmc. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2020-01-30rockchip: px30: remove CONFIG_OPTEE supportKever Yang
Rockchip use CONFIG_SPL_OPTEE for OPTEE support, which is load and run before U-Boot, but not use CONFIG_OPTEE which is after U-Boot. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2020-01-30ram: rk3328: update lpddr3 settingYouMin Chen
update lpddr3 setting for fix init fail about "col error". Signed-off-by: YouMin Chen <cym@rock-chips.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2020-01-30ram: rk3328: add support ddr4 initYouMin Chen
Add rk3328-sdram-ddr4-666.dtsi for support ddr4 init. Signed-off-by: YouMin Chen <cym@rock-chips.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2020-01-30ram: rk3328: only do data traning for cs0Kever Yang
No need to do twice data training for rk3328 ddr sdram, we re-use the setting for both channel. And adjust the sdram_init properly for correct init flow. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Signed-off-by: YouMin Chen <cym@rock-chips.com>
2020-01-30doc: boards: Add rockchip documentationJagan Teki
Rockchip has documentation file, doc/README.rockchip but which is not so readable to add or understand the existing contents. Even the format that support is legacy readme in U-Boot. Add rockchip specific documentation file using new rst format, which describes the information about Rockchip supported boards and it's usage steps. Added minimal information about rk3288, rk3328, rk3368 and rk3399 boards and usage. This would indeed updated further based on the requirements and updates. Cc: Kever Yang <kever.yang@rock-chips.com> Cc: Matwey V. Kornilov <matwey.kornilov@gmail.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-01-30rockchip: Add Single boot image (with binman, pad_cat)Jagan Teki
All rockchip platforms support TPL or SPL-based bootloader in mainline with U-Boot proper as final stage. For each stage we need to burn the image on to flash with respective offsets. This patch creates a single boot image component using - binman, for arm32 rockchip platforms - pad_cat, for arm64 rockchip platforms. This would help users to get rid of burning different boot stage images. The new image called 'u-boot-rockchip.bin' which can burn into flash like: ₹ sudo dd if=u-boot-rockchip.bin of=/dev/sda seek=64 This would support all rockchip platforms, except rk3128 since it doesn't support for SPL yet. Cc: Matwey V. Kornilov <matwey.kornilov@gmail.com> Cc: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-01-30arm: dts: rk3188: Add rk3188-u-boot.dtsiJagan Teki
Add U-Boot specific dtsi file for rk3188 SoC. This would help to add U-Boot specific dts nodes, properties which are common across rk3188. Right now, the file is empty, will add required changes in future patches. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-01-30arm: dts: rk3036: Add rk3036-u-boot.dtsiJagan Teki
Add U-Boot specific dtsi file for rk3036 SoC. This would help to add U-Boot specific dts nodes, properties which are common across rk3036. Right now, the file is empty, will add required changes in future patches. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-01-30Makefile: rockchip: Support SPL-alone mkimageJagan Teki
Add SPL-alone mkimage tooling support via Makefile for few platforms or boards used in rockchip family. With this users would get rid of explicitly creating mkimage tool for rockchip rksd or rkspi boot modes. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-01-30Makefile: rockchip: Suffix platform type with tpl nameJagan Teki
Most of the platforms uses the platform type on their boot stage image naming conventions in makefile like, u-boot-x86-start16-tpl.bin - x86 start16 TPL bin u-boot-spl-mtk.bin - Mediatek SPL bin This would help to understand the users to what that particular image belongs to? and less confused. On that note, suffix platform type rockchip for existing u-boot-tpl.img so now it become u-boot-tpl-rockchip.bin Also, bin is more conventional way to include it on tools like binman, pad_cat etc in future patches. Note: usage of platform type doesn't follow consistent order as of now. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-01-30Makefile: Add rockchip image typeJagan Teki
Add rockchip image type support. right now the image type marked with rksd, So create image type variable with required image type like rksd or rkspi. Cc: Matwey V. Kornilov <matwey.kornilov@gmail.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-01-30rockchip: rk3399: Add bootcount supportJagan Teki
Add bootcount support for Rockchip rk3399. The bootcount value is preserved in PMU_SYS_REG0 register, this would help to support redundent boot. Once the redundant boot triggers, the altboot command will look for extlinux-rollback.conf on particular bootable partition which supposed to be a recovery partition where redundant boot required. Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2020-01-30rockchip: Add common reset causeJagan Teki
Add cpu reset cause in common cpu-info file. This would help to print the reset cause for various resets. Right now it support rk3288, rk3399. rest of rockchip platforms doesn't have reset cause support ye but this code is more feasible to extend the same. Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2020-01-30arm: rockchip: Add common cru.hJagan Teki
Few of the rockchip family SoC atleast rk3288, rk3399 are sharing some cru register bits so adding common code between these SoC families would require to include both cru include files that indeed resulting function declarations error. So, create a common cru include as cru.h then include the rk3399 arch cru include file and move the common cru register bit definitions into it. The rest of rockchip cru files will add it in future. Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2020-01-30rockchip: rk3399: Enable DISPLAY_CPUINFOJagan Teki
RK3288, RK3399 are now support cpu-info, so enable DISPLAY_CPUINFO by default. Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2020-01-30rockchip: Add cpu-infoJagan Teki
Add cpu information for rockchip soc. This would help to print the SoC family number, with associated temparature, clock and reason for reset etc. Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2020-01-30rockpro-rk3399: Enable SPI FlashJagan Teki
Enable winbond SPI flash for ROC-PC-RK3399 board. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-01-30roc-pc-rk3399: Enable SPI FlashJagan Teki
Enable winbond SPI flash for ROC-PC-RK3399 board. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-01-30rockchip: dts: Sync ROC-RK3399-PC changes from LinuxJagan Teki
Sync the ROC-RK3399-PC device tree changes from Linux with below commit details: commit <c36308abe4110e4db362d5e2ae3797834a7b1192> ("arm64: dts: rockchip: Enable MTD Flash on rk3399-roc-pc") Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>