summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* xen: Code style conformityWIP/2020-08-24-misc-improvementsAnastasiia Lukianenko2020-08-244-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | Cleaning up the following: ERROR: do not use assignment in if condition #281: FILE: drivers/xen/pvblock.c:260: + if ((err = xenbus_switch_state(XBT_NIL, nodename, CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written "err" #52: FILE: drivers/xen/pvblock.c:298: + if (err != NULL) { ERROR: do not use assignment in if condition #176: FILE: drivers/xen/gnttab.c:103: + if ((flags = nflags) & (GTF_reading | GTF_writing)) { WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 #329: FILE: include/xen/gnttab.h:1: +/* WARNING: Misplaced SPDX-License-Identifier tag - use line 1 instead #330: FILE: include/xen/gnttab.h:2: + * SPDX-License-Identifier: GPL-2.0 ERROR: do not use assignment in if condition #630: FILE: lib/sscanf.c:558: + if ((n = inr) < width) { Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* board: xen: Remove unnecessary CONFIG_INITRD_TAG and CONFIG_CMDLINE_TAGAnastasiia Lukianenko2020-08-241-3/+0
| | | | | Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* board: xen: Remove CONFIG_CMD_RUN define and clean xenguest_arm64_defconfigAnastasiia Lukianenko2020-08-242-50/+27
| | | | | | | | | CONFIG_CMD_RUN is set on by default in Kconfig. Create xenguest_arm64_defconfig by using savedefconfig to avoid unnecessary options. Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* MAINTAINERS: Add maintainers to XEN sectionAnastasiia Lukianenko2020-08-242-1/+18
| | | | | Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* board: xen: Remove unnecessary CONFIG_BOARD_EARLY_INIT_F define and ↵Anastasiia Lukianenko2020-08-242-7/+0
| | | | | | | board_early_init_f function Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* arm: dts: mt7623: add USB nodesFrank Wunderlich2020-08-242-0/+62
| | | | | | | This adds USB nodes for MT7623/BPI-R2 Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
* arm: dts: mt7622: add USB nodesFrank Wunderlich2020-08-243-0/+72
| | | | | | | Add DTS nodes for MT7622/BPI-R64 Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
* arm: dts: rename mt7622-bpi-r64.dtsFrank Wunderlich2020-08-242-1/+1
| | | | | | | rename mt7622-bpi-r64.dts to mt7622-bananapi-bpi-r64.dts to follow naming convensions Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
* clk: mt7622: add needed clocks for ssusb-nodeFrank Wunderlich2020-08-241-0/+42
| | | | | | MT7622 needs additional clock definitions to work properly Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
* ahci: mediatek: fix copyright and author-linesFrank Wunderlich2020-08-241-4/+2
| | | | | | | | | after review of sam copyright should be on one line and link should not between author lines just remove the link and put ryder first as he is author of linux-driver Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
* reset: drop unnecessary comment for pciesysFrank Wunderlich2020-08-241-1/+0
| | | | | | after review from sam this comment should be removed Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
* phy: mtk-tphy: make shared reg optional for v1Frank Wunderlich2020-08-241-3/+2
| | | | | | | | make the shared reg optional when version is v1 for sata Suggested-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
* fs/squashfs: Fix Coverity Scan defectsJoao Marcos Costa2020-08-243-12/+36
| | | | | | | | | Fix defects such as uninitialized variables and untrusted pointer operations. Most part of the tainted variables and the related defects actually comes from Linux's macro get_unaligned_le**, extensively used in SquashFS code. Add sanity checks for those variables. Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
* virtio_blk: set log2blksz correctlyAKASHI Takahiro2020-08-241-0/+1
| | | | | | | | | | | | | | | 'log2blksz' in blk_desc structure must always be initialized, otherwise it will cause a lot of weird failures in file operations. For example, fs_set_blk_dev[_with_part]() examines a block device against every file system with its probe function. In particular, ext4 file system's ext4_probe() will calls fs_devread() to fetch a super block. If log2blksz is 0, the actual 'read' size, i.e. block_len >> log2blksz, is much bigger than a buffer's size, and it can end up with memory corruption. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Fixes: f4802209e59d ("virtio: Add block driver support") Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* test/py: Add tests for LZO and ZSTDJoao Marcos Costa2020-08-243-47/+102
| | | | | | | | Improve SquashFS tests architecture. Add 'Compression' class. LZO algorithm may crash if the file is fragmented, so the fragments are disabled when testing LZO. Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
* fs/squashfs: add support for LZO decompressionJoao Marcos Costa2020-08-241-0/+25
| | | | | | | | | | Add call to lzo's lzo1x_decompress_safe() into sqfs_decompress(). U-Boot's LZO sources may still have some unsolved issues that could make the decompression crash when dealing with fragmented files, so those should be avoided. The "-no-fragments" option can be passed to mksquashfs. Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
* fs/squashfs: add support for ZSTD decompressionJoao Marcos Costa2020-08-242-0/+45
| | | | | | | | | Add call to ZSTD's ZSTD_decompressDCtx(). In this use case, the caller can upper bound the decompressed size, which will be the SquashFS data block (or metadata block) size, so there is no need to use streaming API. Add ZSTD's worskpace to squashfs_ctxt structure. Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
* fs/squashfs: replace sqfs_decompress() parameterJoao Marcos Costa2020-08-243-20/+14
| | | | | | Replace 'u16 comp_type' by a reference to squashfs_ctxt structure. Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
* fs/squashfs: Add init and clean-up functions to decompressionJoao Marcos Costa2020-08-244-10/+51
| | | | | | | | | | | | | Add sqfs_decompressor_init() and sqfs_decompressor_cleanup(). These functions are called respectively in sqfs_probe() and sqfs_close(). For now, only ZSTD requires an initialization logic. ZSTD support will be added in a follow-up commit. Move squashfs_ctxt definition to sqfs_filesystem.h. This structure is passed to sqfs_decompressor_init() and sqfs_decompressor_cleanup(), so it can no longer be local to sqfs.c. Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
* cmd: fix clone coverity scanJohn Chau2020-08-241-3/+5
| | | | | | | This patch fixes coverity scan MISSING_BREAK issues, and also an error on block size check. Signed-off-by: John Chau <john@harmon.hk>
* firmware: psci: Do not bind driver if U-Boot runs in EL3Michal Simek2020-08-241-0/+6
| | | | | | | | | There is no reason to bind psci driver if U-Boot runs in EL3 because SMC/HVC instructions can't be called. That's why detect this state and don't let user to crash from prompt by performing reset or poweroff commands (if enabled). Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* board: armltd: Add support for Total Compute platformUsama Arif2020-08-2410-1/+296
| | | | | | | | | | | | | Total Compute is based on ARM architecture and has the following features enabled in u-boot: - PL011 UART - PL180 MMC - NOR Flash - FIT image with Signature - AVB Signed-off-by: Usama Arif <usama.arif@arm.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* avb: Make AVB independent of fastbootUsama Arif2020-08-243-4/+21
| | | | | | | | | | | | | | | AVB only uses CONFIG_FASTBOOT_BUF_ADDR from fastboot for memory. This memory is used for assigning temporary buffers. This can be assigned a new variable and used as CONFIG_AVB_BUF_ADDR. This is to support future boards that support AVB but dont support USB and therefore dont support FASTBOOT. Signed-off-by: Usama Arif <usama.arif@arm.com> Cc: Igor Opaniuk <igor.opaniuk@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Igor Opaniuk <igor.opaniuk@gmail.com> [trini: Change defaults] Signed-off-by: Tom Rini <trini@konsulko.com>
* Merge tag 'u-boot-clk-24Aug2020' of ↵Tom Rini2020-08-2413-30/+153
|\ | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-clk - Add CCF clocks definitions for iMX6Q enet (ETH) - Several fixes for CCF framework - the most notable is the one, which adds get_rate helper to clk-mux.c - Improvements for clk command - better visibility and alignment.
| * clk: ccf: Add missing #include <dm/uclass.h> to clk-mux.cLukasz Majewski2020-08-241-0/+1
| | | | | | | | | | | | | | | | After adding custom get_rate helper function it was necessary to include <dm/uclass.h> to avoid warnings about missing uclass_get_device_by_name. Signed-off-by: Lukasz Majewski <lukma@denx.de> Series-to: u-boot
| * cmd: clk: correctly handle depth for clk dumpPatrick Delaunay2020-08-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Update depth only when clock uclass is found to have correct display of command "clk dump". Without this patch, the displayed depth is the binding depth for all the uclass and that can be strange as only clock uclass nodes are displayed. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * cmd: clk: cosmetic: correct code alignment in show_clksPatrick Delaunay2020-08-241-16/+16
| | | | | | | | | | | | | | Correct code alignment in show_clks() function. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * clk: ccf: mux: change the get_rate helperDario Binacchi2020-08-242-1/+49
| | | | | | | | | | | | | | | | | | | | | | | | The previous version of the get_rate helper does not work if the mux clock parent is changed after the probe. This error has not been detected because this condition has not been tested. The error occurs because the set_parent helper does not change the parent of the clock device but only the clock selection register. Since changing the parent of a probed device can be tricky, the new version of the get_rate helper provides the rate of the selected clock and not that of the parent. Signed-off-by: Dario Binacchi <dariobin@libero.it>
| * clk: ccf: mux: fix access to the sandbox registerDario Binacchi2020-08-241-0/+8
| | | | | | | | | | | | | | | | The tests developed for the mux clock are run on the sandbox. They don't call the clk_mux_set_parent routine and therefore they do not detect this error. Signed-off-by: Dario Binacchi <dariobin@libero.it>
| * clk: ccf: mux: fix typoDario Binacchi2020-08-241-1/+1
| | | | | | | | | | | | Close the opening bracket. Signed-off-by: Dario Binacchi <dariobin@libero.it>
| * clk: ccf: mux: change include orderDario Binacchi2020-08-241-4/+4
| | | | | | | | | | | | Apply u-boot coding style on include files order. Signed-off-by: Dario Binacchi <dariobin@libero.it>
| * clk: fix the console output of clk_registerDario Binacchi2020-08-241-5/+5
| | | | | | | | | | | | | | The parent->name variable can be used only in case the uclass_get_device_by_name routine returns successfully. Signed-off-by: Dario Binacchi <dariobin@libero.it>
| * clk: set flags in the ccf registration routinesDario Binacchi2020-08-247-1/+14
| | | | | | | | | | | | | | | | | | The top-level framework flags are passed as parameter to the common clock framework (ccf) registration routines without being used. Checks of the flags setting added by the patch have been added in the ccf test. Signed-off-by: Dario Binacchi <dariobin@libero.it>
| * dm: test: clk: add the test for the ccf gated clockDario Binacchi2020-08-243-0/+20
| | | | | | | | | | | | | | | | | | | | | | Unlike the other clock types, in the case of the gated clock, a new driver has been developed which does not use the registering routine provided by the common clock framework. The addition of the ecspi0 clock to sandbox therefore allows testing the ccf gate clock. Signed-off-by: Dario Binacchi <dariobin@libero.it> Reviewed-by: Simon Glass <sjg@chromium.org>
| * clk: imx6: Add definition for IMX6QDL_CLK_ENET_REF clockLukasz Majewski2020-08-241-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | After commit 673f6597321d ("net: fec_mxc: support i.MX8M with CLK_CCF") all NXP boards, which are not IMX8 and in the same time are supporting CCF need to provide PTP clock. On the i.MX6Q this clock is provided with IMX6QDL_CLK_ENET_REF in the Linux kernel's CCF. Code in this change models the simplest case when enet reference clock is generated from 'osc' clock. Signed-off-by: Lukasz Majewski <lukma@denx.de>
| * clk: imx: Add support for pllv3 enet clockLukasz Majewski2020-08-241-0/+25
| | | | | | | | | | | | | | | | | | | | This code has been ported from Linux kernel v5.5.5 (tag) and has been adjusted to U-Boot's DM. It adds support for correct recognition of IMX_PLLV3_ENET flag in the clk-pllv3.c driver. Signed-off-by: Lukasz Majewski <lukma@denx.de>
| * clk: imx6: Add definition for IMX6QDL_CLK_ENET clockLukasz Majewski2020-08-241-0/+1
| | | | | | | | | | | | | | | | | | | | After commit 673f6597321d ("net: fec_mxc: support i.MX8M with CLK_CCF") all NXP boards, which are not IMX8 and in the same time are supporting CCF need to provide IMX6QDL_CLK_ENET. This change defines the missing clock in i.MX6Q's CCF. Signed-off-by: Lukasz Majewski <lukma@denx.de>
| * clk: ICS8N3QV01 remove superfluous codeHeinrich Schuchardt2020-08-241-1/+0
| | | | | | | | | | | | | | | | | | | | Do not calculate a unused value of n which is overwritten in both branches of the subsequent if statement. Identified by cppcheck. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Lukasz Majewski <lukma@denx.de>
* | Merge tag 'dm-pull-22aug20' of ↵WIP/23Aug2020Tom Rini2020-08-2340-88/+199
|\ \ | |/ |/| | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-dm replace devfdt_get_addr_ptr() with dev_read_addr_ptr() binman fixes for portage various minor fixes 'bind' command improvements
| * sandbox: u-boot.lds: Remove bogus __bss_start symbolOvidiu Panait2020-08-222-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sections described in the sandbox linker script are inserted before data section via "INSERT BEFORE .data;". Running readelf -S on sandbox u-boot binary shows that the bss section is located after the data section: Section Headers: [Nr] Name Type Address Offset Size EntSize Flags Link Info Align ... [25] .u_boot_list PROGBITS 000000000041d1c8 0021d1c8 000000000000dd90 0000000000000000 WA 0 0 8 [26] _u_boot_sandbox_g PROGBITS 000000000042af58 0022af58 00000000000000a0 0000000000000000 WA 0 0 8 [27] .data PROGBITS 000000000042b000 0022b000 000000000000f708 0000000000000000 WA 0 0 32 [28] .bss NOBITS 000000000043a720 0023a708 0000000000018930 0000000000000000 WA 0 0 32 This means that the __bss_start assignment in the linker script is bogus, as the actual bss section start is located elsewhere. Remove this assignment, as the __bss_start symbol is not used on sandbox anyway. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
| * board_f: Remove dead code from init_func_i2cOvidiu Panait2020-08-221-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 69153988a6f4 ("i2c: Finish dropping use of CONFIG_I2C_HARD") init_func_i2c is wrapped only by "#if defined(CONFIG_SYS_I2C)". Because of this, the second ifdef within becomes pointless: #if defined(CONFIG_SYS_I2C) static int init_func_i2c(void) <snip> #ifdef CONFIG_SYS_I2C ... #else ... #endif <snip> } #endif Remove the dead #else preprocessor code. Fixes: 69153988a6f ("i2c: Finish dropping use of CONFIG_I2C_HARD") Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
| * binman: Add a setup script for PythonSimon Glass2020-08-221-0/+12
| | | | | | | | | | | | Allow binman to be installed by adding a suitable setup.py script. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dtoc: Add a setup script for PythonSimon Glass2020-08-221-0/+12
| | | | | | | | | | | | Allow dtoc to be installed by adding a suitable setup.py script. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Correct some import statementsSimon Glass2020-08-224-5/+4
| | | | | | | | | | | | | | | | | | Some of these were not converted when binman moved to use absolute paths. Fix them. Also drop the import of 'test' which is a directory, not a module. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Move GetEntryModules() to controlSimon Glass2020-08-223-17/+17
| | | | | | | | | | | | | | | | | | | | | | When binman is installed its main program is in a different directory to its modules. This means that __file__ is different and we cannot use it to obtain the path to etype/ from main.py To fix this, move the function to the 'control' module, since it is installed with all the other modules, including the etype/ directory. Signed-off-by: Simon Glass <sjg@chromium.org>
| * treewide: convert devfdt_get_addr_ptr() to dev_read_addr_ptr()Masahiro Yamada2020-08-2218-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you enable CONFIG_OF_LIVE, you will end up with a lot of conversions. To help this tedious work, this commit converts devfdt_get_addr_ptr() to dev_read_addr_ptr() by coccinelle. I also removed redundant casts because dev_read_addr_ptr() returns an opaque pointer. To generate this commit, I ran the following semantic patch excluding include/dm/. <smpl> @@ type T; expression dev; @@ -(T *)devfdt_get_addr_ptr(dev) +dev_read_addr_ptr(dev) @@ expression dev; @@ -devfdt_get_addr_ptr(dev) +dev_read_addr_ptr(dev) </smpl> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * ata: mvebu: use dev_read_addr() to get base addressMasahiro Yamada2020-08-221-1/+1
| | | | | | | | | | | | | | | | | | | | It is strange to use devfdt_get_addr_ptr(), then cast the pointer back to ulong because you could use devfdt_get_addr() without casting. Convert it to dev_read_addr(), which is capable to CONFIG_OF_LIVE. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Stefan Roese <sr@denx.de>
| * gpio: at91: use dev_read_addr() to get base addressMasahiro Yamada2020-08-221-1/+1
| | | | | | | | | | | | | | | | | | | | It is strange to use devfdt_get_addr_ptr(), then cast the pointer back to uint32 because you could use devfdt_get_addr() without casting. Convert it to dev_read_addr(), which is capable to CONFIG_OF_LIVE. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * test: dm: Add test case for devfdt_get_addr_ptrOvidiu Panait2020-08-221-0/+18
| | | | | | | | | | | | | | Add flat tree test case to cover devfdt_get_addr_ptr function. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * dm: core: Fix devfdt_get_addr_ptr return valueOvidiu Panait2020-08-227-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | According to the description of devfdt_get_addr_ptr, this function should return NULL on failure, but currently it returns (void *)FDT_ADDR_T_NONE. Fix this by making devfdt_get_addr_ptr return NULL on failure, as described in the function comments. Also, update the drivers currently checking (void *)FDT_ADDR_T_NONE to check for NULL. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: Simon Glass <sjg@chromium.org>