summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-12-06video: make BPP and ANSI configs optionalAnatolij Gustschin
Many boards do not use all selected framebuffer depth configurations, for such boards there is some unused code in video and console uclass routines. Make depth specific code optional to avoid dead code and slightly reduce binary size. Also make ANSI code optional for the same reason. When i.e. using only VIDEO_BPP16 the code size shrinks (below values when using gcc-7.3.0): $ ./tools/buildman/buildman -b video-wip -sS wandboard ... 01: Merge git://git.denx.de/u-boot-sh 02: video: add guards around 16bpp/32bbp code 03: video: make BPP and ANSI configs optional arm: (for 1/1 boards) all -776.0 bss -8.0 text -768.0 Signed-off-by: Anatolij Gustschin <agust@denx.de> Tested-by: Eugen Hristev <eugen.hristev@microchip.com> Tested-by: Patrice Chotard <patrice.chotard@st.com> Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
2019-12-06video: add guards around 16bpp/32bbp codeAnatolij Gustschin
Many boards use only single depth configuration, for such boards there is some unused code in video and console uclass routines. Add guards to avoid dead code. Signed-off-by: Anatolij Gustschin <agust@denx.de> Tested-by: Eugen Hristev <eugen.hristev@microchip.com> Tested-by: Patrice Chotard <patrice.chotard@st.com> Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
2019-12-06video: bmp: Fix video_display_rle8_bitmap()Patrice Chotard
In case the BMP size is bigger than the frame buffer, don't use the BMP's width and height in video_display_rle8_bitmap, but the one's checked in video_bmp_display() as parameters to video_display_rle8_bitmap(). Signed-off-by: Patrice Chotard <patrice.chotard@st.com> CC: Yannick Fertré <yannick.fertre@st.com>
2019-12-06video: bmp: Fix video_splash_align_axis()Patrice Chotard
Convert panel_picture_delta and axis_alignment from unsigned long to long to insure to store correctly the difference between panel_size and picture_size in case the panel_size is smaller than picture_size. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> CC: Yannick Fertré <yannick.fertre@st.com> [agust: change axis_alignment to long] Signed-off-by: Anatolij Gustschin <agust@denx.de>
2019-12-05Merge branch '2019-12-05-master-imports'Tom Rini
- Assorted omapl138_lcdk / da850-evm fixes - FAT fix, add another pytest as well for FAT. - Assorted general fixes
2019-12-05ARM: omapl138_lcdk: Shrink code size by building with ThumbAdam Ford
SPL has limited available resources, and the performance between ARM and Thumb isn't that significant. This patch builds using Thumb instruction set to reduce the code size by nearly 6K. Original: text data bss dec hex filename 26526 4004 1376 31906 7ca2 spl/u-boot-spl Thumb: text data bss dec hex filename 20232 4004 1376 25612 640c spl/u-boot-spl Signed-off-by: Adam Ford <aford173@gmail.com> Tested-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2019-12-05Fix typo in macros, "FIRMEWARE" -> "FIRMWARE"Thomas Hebb
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
2019-12-05ARM: da850-evm: Disable SYS_MMCSD_RAW_MODE_USE_SECTORAdam Ford
The da850-evm doesn't have the boot pins configured in a way to make MMC/SD booting an option, and MMC/SD support is not enabled in SPL. Therefore, there is no need to support raw mode mmc/sd support in SPL. This patch disables CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR Signed-off-by: Adam Ford <aford173@gmail.com>
2019-12-05spl: fix entry_point equal to load_addrGiulio Benetti
At the moment entry_point is set to image_get_load(header) that sets it to "load address" instead of "entry point", assuming entry_point is equal to load_addr, but it's not true. Then load_addr is set to "entry_point - header_size", but this is wrong too since load_addr is not an entry point. So use image_get_ep() for entry_point assignment and image_get_load() for load_addr assignment. Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
2019-12-05test/py: test_fs: add tests for creating/deleting many filesAKASHI Takahiro
# This is actually a resent patch of # [1] https://lists.denx.de/pipermail/u-boot/2019-May/369170.html Two test cases are added under test_fs_ext: test case 10: for root directory test case 11: for non-root directory Those will verify a behavior fixed by the commits related to root directory ("fs: fat: allocate a new cluster for root directory of fat32" and "fs: fat: flush a directory cluster properly"), and focus on handling long-file-name directory entries under a directory. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2019-12-05fs: fat: handle deleted directory entries correctlyAKASHI Takahiro
Unlink test for FAT file system seems to fail at test_unlink2. (When I added this test, I haven't seen any errors though.) for example, ===8<=== fs_obj_unlink = ['fat', '/home/akashi/tmp/uboot_sandbox_test/128MB.fat32.img'] def test_unlink2(self, u_boot_console, fs_obj_unlink): """ Test Case 2 - delete many files """ fs_type,fs_img = fs_obj_unlink with u_boot_console.log.section('Test Case 2 - unlink (many)'): output = u_boot_console.run_command('host bind 0 %s' % fs_img) for i in range(0, 20): output = u_boot_console.run_command_list([ '%srm host 0:0 dir2/0123456789abcdef%02x' % (fs_type, i), '%sls host 0:0 dir2/0123456789abcdef%02x' % (fs_type, i)]) assert('' == ''.join(output)) output = u_boot_console.run_command( '%sls host 0:0 dir2' % fs_type) > assert('0 file(s), 2 dir(s)' in output) E AssertionError: assert '0 file(s), 2 dir(s)' in ' ./\r\r\n ../\r\r\n 0 0123456789abcdef11\r\r\n\r\r\n1 file(s), 2 dir(s)' test/py/tests/test_fs/test_unlink.py:52: AssertionError ===>8=== This can happen when fat_itr_next() wrongly detects an already- deleted directory entry. File deletion, which was added in the commit f8240ce95d64 ("fs: fat: support unlink"), is implemented by marking its entry for a short name with DELETED_FLAG, but related entry slots for a long file name are kept unmodified. (So entries will never be actually deleted from media.) To handle this case correctly, an additional check for a directory slot will be needed in fat_itr_next(). In addition, I added extra comments about long file name and short file name format in FAT file system. Although they are not directly related to the issue, I hope it will be helpful for better understandings in general. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2019-12-05drivers: optee: rpmb: fix returning CID to TEEJorge Ramirez-Ortiz
The mmc CID value is one of the input parameters used to provision the RPMB key. The trusted execution environment expects this value to be specified in big endian format. Before this fix, on little endian systems, the value returned by the linux kernel mmc driver differed from the one returned by u-boot. This meant that if linux provisioned the RPMB key, u-boot would not have access to the partition (and the other way around). Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
2019-12-05cmd: cp: add missing map_sysmemPhilippe Reynes
The command cp fails on sandbox because the address is used directly. To fix this issue, we call the function map_sysmem to translate the address. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2019-12-05iminfo: add missing map_sysmemPhilippe Reynes
The command iminfo fails on sandbox because the address is used directly. To fix this issue, we call the function map_sysmem to translate the address. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2019-12-05spl: Introduce SPL_DM_GPIO Kconfig defineLukasz Majewski
This define indicates if DM_GPIO shall be supported in SPL. This allows proper operation of DM converted GPIO drivers in SPL, which use boards. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2019-12-05drivers: pci: ignore disabled devicesMichael Walle
PCI devices may be disabled in the device tree. Devices which are probed by the device tree handle the "status" property and are skipped if disabled. Devices which are probed by the PCI enumeration don't check that property. Fix it. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Alex Marginean <alexandru.marginean@nxp.com> Tested-by: Alex Marginean <alexandru.marginean@nxp.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-12-04Merge git://git.denx.de/u-boot-shTom Rini
- Convert some R-Car Gen3 platforms to DM_SPI{,_FLASH}
2019-12-04configs: Resync with savedefconfigTom Rini
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2019-12-04Merge branch '2019-10-27-mtd-cleanup'Tom Rini
- Merge the series to clean up our MTD Kconfig and Makefile logic
2019-12-04mtd: Makefile: deep cleanupMiquel Raynal
Move MTD-related lines out of the root Makefile. Put them in their respective directories. Enclose some of these new lines to skip them when building the SPL. MTD core files and some MTD device drivers are compiled in a mtd.o object and included in the final object only if MTD support is required (there are two different symbols for that, one for U-Boot and one for the SPL). Now that all defconfigs have been fixed, we can stop the logic where enabling a command selects the core files to compile. This logic is broken since selecting a symbol with a 'depends on' will not enforce this secondary dependency. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2019-12-04cmd: make MTD commands depend on MTDMiquel Raynal
Defconfigs have been fixed, now we can add proper dependencies in Kconfig. SPI FLASH is still not dependent on MTD (deeper rework needed). Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2019-12-04cmd: nand/sf: isolate legacy codeMiquel Raynal
The 'sf' command is not supposed to rely on the MTD stack, but both 'sf' and 'nand' commands use helpers located in mtd_uboot.c. Despite their location, these functions do not depend at all on the MTD stack. This file (drivers/mtd/mtd_uboot.c) is only compiled if CONFIG_MTD is selected, which is inconsistent with the current situation. Solve this by moving these three functions (which are only used by the above two commands) out of mtd_uboot.c and put them in a C file only compiled with cmd/sf.c and cmd/nand.c. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> [trini: Don't export get_part function now] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-12-04cmd: mtdparts: Kconfig: join mtdparts command entry with its optionsMiquel Raynal
Move the Kconfig entry of the option right after the entry of the mtdparts command. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2019-12-04mtd: spi: SPI_FLASH_MTD depends on MTDMiquel Raynal
It is already the case that all defconfigs with SPI_FLASH_MTD also declare using MTD, but let's make this consistent and enforce it in Kconfig. Most of the time SPI_FLASH_MTD is used in conjunction with UBI, which already depends on MTD. Suggested-by: Vignesh R <vigneshr@ti.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2019-12-04dfu: add dependency on the raw NAND coreMiquel Raynal
CONFIG_DFU_NAND needs the raw NAND core being compiled. Also fix the colibri_vf defconfig to reflect this dependency. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-04mtd: nand: add includes in NAND core to avoid warningsMiquel Raynal
Because of the include's game, when some files are compiled for a SPI NAND device, no warning appears. But when it is for a raw NAND device, GCC complains. Fix these warning by including <common.h>. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-04configs: ls104x/ls108x/ls208x: Build the raw NAND core with TFABOOTMiquel Raynal
Enabling TFABOOT configuration will compile-in a call to nand_read in the boot sequence. Handle the situation by also selecting officially the raw NAND core in this case. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2019-12-04configs: socfpga: mcvevk: Remove useless UBI infosMiquel Raynal
There is no flash on this board, there is no reason to define MTD environment variables nor UBI. Drop them from the configuration file. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Wolfgang Grandegger <wg@aries-embedded.de>
2019-12-04configs: remove MTD support from bcm11130 and M54418TWR defconfigsMiquel Raynal
While the right Kconfig entries were selected, because of the missing CMD_NAND symbol the raw NAND core was never compiled. Remove it from the defconfigs otherwise the build will fail. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> [trini: Also do this on bcm11130_nand] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-12-04configs: remove raw NAND core from k2g defconfigsMiquel Raynal
Due to previous Makefile organization, the raw NAND subdirectory was not compiled in if CMD_NAND was not enabled. Because the Denali driver does not compile with these boards (undefined environment offset), remove the dependency within the defconfig over the controller driver (was ignored anyway in the past). Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2019-12-04configs: move CONFIG_MTD in defconfigs when set in arch includesMiquel Raynal
Let's be consistent and always declare CONFIG_MTD from the defconfig file when needed. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-04mtd: ensure MTD is compiled when CMD_MTDPARTS is selectedMiquel Raynal
MTD support must be enabled when using mtdparts. Indeed, functions like get_mtd_info(), get_mtd_device() and put_mtd_device() are in drivers/mtd/mtd_uboot.c and are built only with CONFIG_MTD. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-04mtd: ensure CMD_NAND is compiled when its options are selectedMiquel Raynal
In some files, options of CMD_NAND are selected but not the command itself. Fix this inconsistency. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-04mtd: ensure MTD_RAW_NAND is compiled when ENV_IS_IN_NAND is selectedMiquel Raynal
Raw NAND support must be enabled when the environment is in NAND. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-04mtd: ensure UBI is compiled when ENV_IS_IN_UBI is selectedMiquel Raynal
UBI must be enabled when the environment is in UBI. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-04mtd: ensure UBI is compiled when using fastmapMiquel Raynal
UBI must be enabled when using fastmap, reflect this is defconfigs. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-04mtd: ensure MTD is compiled when there is a SPI NOR flash using MTDMiquel Raynal
MTD must be enabled when there is a SPI NOR flash using the SPI_FLASH_MTD config entry. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-04mtd: ensure MTD/the raw NAND core are compiled when there is a NAND flashMiquel Raynal
Both symbols must be enabled when there is a raw NAND driver selected. Also enable them when CONFIG_CMD_NAND is selected to avoid breaking things when we'll further rework the MTD dependency description. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com> [trini: Rebase and migrate a few more boards here] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-12-04ARM: rmobile: Convert M2N Gose to DM_SPI{,_FLASH}Marek Vasut
Enable DM_SPI and DM_SPI_FLASH in U-Boot on M2N Gose. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2019-12-04ARM: rmobile: Convert M2W Koelsch to DM_SPI{,_FLASH}Marek Vasut
Enable DM_SPI and DM_SPI_FLASH in U-Boot on M2W Koelsch. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2019-12-04ARM: rmobile: Convert H2 Lager to DM_SPI{,_FLASH}Marek Vasut
Enable DM_SPI and DM_SPI_FLASH in U-Boot on H2 Lager. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2019-12-03mtd: rename CONFIG_MTD_DEVICE -> CONFIG_MTDMiquel Raynal
Like in Linux, just use CONFIG_MTD to compile the MTD stack. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-03mtd: rename CONFIG_MTD -> CONFIG_DM_MTDMiquel Raynal
CONFIG_MTD must be reserved for the MTD core. Like any other subsystem, prefix the symbol by DM when it comes to DM support. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com> [trini: Add Kconfig files] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-12-03mtd: rename CONFIG_NAND -> CONFIG_MTD_RAW_NANDMiquel Raynal
Add more clarity by changing the Kconfig entry name. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> [trini: Re-run migration, update a few more cases] Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-03Merge tag 'efi-2020-01-rc5' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2020-01-rc5 A type error in the implementation of the efidebug command is fixed.
2019-12-03Merge tag 'dm-pull-3dec19' of https://gitlab.denx.de/u-boot/custodians/u-boot-dmTom Rini
Fix stdout-path handling
2019-12-03Merge branch '2019-12-03-master-imports'Tom Rini
- omapl138_lcdk fixes - MediaTek MT8518 support - VxWorks standard DTB support - Assorted bug fixes
2019-12-03cmd: efidebug: fix a build error in show_efi_boot_opt()AKASHI Takahiro
I detected the following error in sandbox with Clang on Travis CI: +cmd/efidebug.c:703:15: error: result of comparison of constant 9223372036854775822 with expression of type 'int' is always false [-Werror,-Wtautological-constant-out-of-range-compare] + else if (ret == EFI_NOT_FOUND) + ~~~ ^ ~~~~~~~~~~~~~ Simply changing a type of 'ret' to efi_status_t will fix this error. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-12-03arm64: zynqmp: Point zcu216 defconfig to correct dts fileMichal Simek
Defconfig is pointing to incorrect DT file which needs to be fix. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-12-03ARM: MediaTek: add basic support for MT8518 boardsmingming lee
This adds a general board file based on MT8518 SoCs from MediaTek. Apart from the generic parts (cpu) we add some low level init codes and initialize the early clocks. This commit is adding the basic boot support for the MT8518 eMMC board. Signed-off-by: mingming lee <mingming.lee@mediatek.com> [trini: Migrate env location to defconfig, set ENV_IS_IN_MMC] Signeed-off-by: Tom Rini <trini@konsulko.com>