- Feb 27, 2017
-
-
Jonathan Golder authored
Passing NULL to fs_read() for actread value results in hanging U-Boot at least on our ARM plattform (TI AM335x). Since fs_read() and following functions do not catch nullpointers, writing to 0x0 occurs. Passing a local dummy var instead of NULL solves this issue. Signed-off-by:
Jonathan Golder <jonathan.golder@kurz-elektronik.de> Cc: Anatolij Gustschin <agust@denx.de>
-
- Feb 17, 2017
-
-
Dalon Westergreen authored
Added SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION and SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION to Kconfig. Due to SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION being moved to Kconfig the board defconfigs for db-88f6820-gp_defconfig kc1_defconfig and sniper_defconfig need to be updated. Signed-off-by:
Dalon Westergreen <dwesterg@gmail.com>
-
Dalon Westergreen authored
the socfpga bootrom supports mmc booting from either a raw image starting at 0x0, or from a partition of type 0xa2. This patch adds support for locating the boot image in the first type 0xa2 partition found. Assigned a partition number of -1 will cause a search for a partition of type CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE and use it to find the u-boot image Signed-off-by:
Dalon Westergreen <dwesterg@gmail.com>
-
- Feb 12, 2017
-
-
Masahiro Yamada authored
The whole of common/flash.c is guarded by #if defined() ... #endif. Move the conditional to common/Makefile. Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com>
-
Masahiro Yamada authored
We repeated partial moves for CONFIG_SYS_NO_FLASH, but this is not completed. Finish this work by the tool. During this move, let's rename it to CONFIG_MTD_NOR_FLASH. Actually, we have more instances of "#ifndef CONFIG_SYS_NO_FLASH" than those of "#ifdef CONFIG_SYS_NO_FLASH". Flipping the logic will make the code more readable. Besides, negative meaning symbols do not fit in obj-$(CONFIG_...) style Makefiles. This commit was created as follows: [1] Edit "default n" to "default y" in the config entry in common/Kconfig. [2] Run "tools/moveconfig.py -y -r HEAD SYS_NO_FLASH" [3] Rename the instances in defconfigs by the following: find . -path './configs/*_defconfig' | xargs sed -i \ -e '/CONFIG_SYS_NO_FLASH=y/d' \ -e 's/# CONFIG_SYS_NO_FLASH is not set/CONFIG_MTD_NOR_FLASH=y/' [4] Change the conditionals by the following: find . -name '*.[ch]' | xargs sed -i \ -e 's/ifndef CONFIG_SYS_NO_FLASH/ifdef CONFIG_MTD_NOR_FLASH/' \ -e 's/ifdef CONFIG_SYS_NO_FLASH/ifndef CONFIG_MTD_NOR_FLASH/' \ -e 's/!defined(CONFIG_SYS_NO_FLASH)/defined(CONFIG_MTD_NOR_FLASH)/' \ -e 's/defined(CONFIG_SYS_NO_FLASH)/!defined(CONFIG_MTD_NOR_FLASH)/' [5] Modify the following manually - Rename the rest of instances - Remove the description from README - Create the new Kconfig entry in drivers/mtd/Kconfig - Remove the old Kconfig entry from common/Kconfig - Remove the garbage comments from include/configs/*.h Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com>
-
- Feb 08, 2017
-
-
Jean-Jacques Hiblot authored
The default values for the configuration defines CONFIG_ENV_SPI_xxx are arbitrary values. It makes more sense to set them to the values used by the sf command. Signed-off-by:
Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by:
Tom Rini <trini@konsulko.com>
-
Ladislav Michl authored
fdt_fixup_mtdparts currently does nothing when partition info is runtime-generated or compiled-in defaults are used. Signed-off-by:
Ladislav Michl <ladis@linux-mips.org> Fix nits in commit message: Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Feb 07, 2017
-
-
oliver@schinagl.nl authored
Commit 674bb249 ("net: cosmetic: Replace magic numbers in arp.c with constants") introduced a nice define to replace the magic value 6 for the ethernet hardware address. Replace more hardcoded instances of 6 which really reference the ARP_HLEN (iow the MAC/Hardware/Ethernet address). Signed-off-by:
Olliver Schinagl <oliver@schinagl.nl> Acked-by:
Joe Hershberger <joe.hershberger@ni.com>
-
- Feb 06, 2017
-
-
Simon Glass authored
The BSS region may overlap with relocations. If we clear BSS we will overwrite the start of the relocation area. This doesn't matter when running from SPI flash, since it is read-only. But when relocating 64-bit U-Boot from one place in RAM to another, relocation will fail because some of its relocations have been zeroed. To fix this, put the ELF fixup call before the BSS clearing call. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
Since 'gd' is just a normal variable on 64-bit x86, it is relocated by the time we get to board_init_r(). The old 'gd' variable is passed in as parameter to board_init_r(), presumably for this situation. Assign it on 64-bit x86 so that gd points to the correct data. Options to improve this: - Make gd a fixed register and remove the board_init_r() parameter - Make all archs use this board_init_r() parameter The second has a TODO in the code. The first has a TODO in a future commit ('x86: Support global_data on x86_64') Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
These tables should be declared static const. Unfortunately the table in board_r is updated on machines with manual relocation. Update them. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
Adjust the code so that 64-bit startup works. Since we don't need to do CAR changes in U-Boot proper anymore (they are done in SPL) we can simplify the flow and return normally from board_init_f(). Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
Add an option for building Platorm Controller Hub drivers in SPL. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
Add a new Kconfig option to allow timer drivers to be used in SPL. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
Add a new Kconfig option to allow RTC drivers to be used in SPL. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
Add a new Kconfig option to allow PCI drivers to be used in SPL. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
Add a new Kconfig option to allow CPU drivers to be used in SPL. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
This currently fails silently. Add a debug message to aid debugging. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
CONFIG_CONSOLE_MUX and CONFIG_SYS_CONSOLE_IS_IN_ENV are not applicable for SPL. Update the console code to use CONFIG_IS_ENABLED(), so that these options will be inactive in SPL. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
- Jan 29, 2017
-
-
Masahiro Yamada authored
The Boot ROM supports authentication feature to prevent malformed software from being run on products. The signature is added at the tail of the second stage loader (= SPL in U-boot terminology). The size of the second stage loader was 64KB, and it was consistent across SoCs. The situation changed when LD20 SoC appeared; it loads 80KB second stage loader, and it is the only exception. Currently, CONFIG_SPL_PAD_TO is set to 64KB and U-Boot proper is loaded from the 64KB offset of non-volatile devices. This means the signature of LD20 SoC (located at 80KB offset) corrupts the U-Boot proper image. Let's move the U-Boot proper image to 128KB offset. It uses 48KB for nothing but padding, and we could actually locate the U-Boot proper at 80KB offset. However, the power of 2 generally seems a better choice for the offset address. Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com>
-
- Jan 28, 2017
-
-
Masahiro Yamada authored
This reverts commit 8c36e99f. There is misunderstanding in commit 8c36e99f ("armv8: release slave cores from CPU_RELEASE_ADDR"). How to bring the slave cores into U-Boot proper is platform-specific. So, it should be cared in SoC/board files instead of common/spl/spl.c. As you see SPL is the acronym of Secondary Program Loader, there is generally something that runs before SPL (the First one is usually Boot ROM). How to wake up slave cores from the Boot ROM is really SoC specific. So, the intention for the spin table support is to bring the slave cores into U-Boot proper in an SoC specific manner. (this must be done after relocation. see below.) If you bring the slaves into SPL, it is SoC own code responsibility to transfer them to U-Boot proper. The Spin Table defines the interface between a boot-loader and Linux kernel. It is unrelated to the interface between SPL and U-Boot proper. One more thing is missing in the commit; spl_image->entry_point points to the entry address of U-Boot *before* relocation. U-Boot relocates itself between board_init_f() and board_init_r(). This means the master CPU sees the different copy of the spin code than the slave CPUs enter. The spin_table_update_dt() protects the code *after* relocation. As a result, the slave CPUs spin in unprotected code, which leads to unstable behavior. Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Andrew F. Davis authored
spl_init on some boards is called after stack and heap relocation, on some platforms spl_relocate_stack_gd is called to handle setting the limit to its value CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN when simple SPL malloc is enabled during relocation. spl_init should then not re-assign the old pre-relocation limit when this is defined. Signed-off-by:
Andrew F. Davis <afd@ti.com> Reviewed-by:
Tom Rini <trini@konsulko.com>
-
Andrew F. Davis authored
Add debug statements to memalign_simple to match malloc_simple. Signed-off-by:
Andrew F. Davis <afd@ti.com> Reviewed-by:
Tom Rini <trini@konsulko.com>
-
Patrick Delaunay authored
Signed-off-by:
Patrick Delaunay <patrick.delaunay@st.com> Signed-off-by:
Patrick Delaunay <patrick.delaunay73@gmail.com>
-
Patrick Delaunay authored
Signed-off-by:
Patrick Delaunay <patrick.delaunay@st.com> Signed-off-by:
Patrick Delaunay <patrick.delaunay73@gmail.com>
-
- Jan 25, 2017
-
-
Simon Glass authored
This is not used in U-Boot, and the only usage calls a non-existent function. Drop it. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Rather than having an arch-specific function, use the existing generic one. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
This is only called from one place and the function cannot be inlined. Convert it to a normal function. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
This is not used in U-Boot. Drop this option and associated dead code. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
This is not defined anywhere in U-Boot. Drop this dead code. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
To avoid an unnecessary arch-specific call in board_init_f(), rename this function. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
This converts the following to Kconfig: CONFIG_ARCH_MISC_INIT Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
This converts the following to Kconfig: CONFIG_BOARD_EARLY_INIT_F Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
This converts the following to Kconfig: CONFIG_ARCH_EARLY_INIT_R Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Jan 24, 2017
-
-
Tom Rini authored
This option should not really be user selectable. Note that on PowerPC we currently only need BOARD_LATE_INIT when CHAIN_OF_TRUST is enabled so be conditional on that. Signed-off-by:
Tom Rini <trini@konsulko.com> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com> (for UniPhier)
-
- Jan 21, 2017
-
-
Uri Mashiach authored
Move all of the status LED feature to drivers/led/Kconfig. The LED status definitions were moved from the board configuration files to the defconfig files. TBD: Move all of the definitions in the include/status_led.h to the relevant board's defconfig files. Tested boards: CL-SOM-AM57x, CM-T335 Signed-off-by:
Uri Mashiach <uri.mashiach@compulab.co.il>
-
Jagan Teki authored
This patch add Kconfig entry for CONFIG_BOARD_LATE_INIT Cc: Tom Rini <trini@konsulko.com> Signed-off-by:
Jagan Teki <jagan@openedev.com>
-
- Jan 20, 2017
-
-
Emmanuel Vadot authored
Instead of disabling the data cache in the bootelf command, disabling it in the do_bootm_qnxelf function. Some ELF binary might want the cache enabled. Signed-off-by:
Emmanuel Vadot <manu@bidouilliste.com>
-
Tom Rini authored
We can make the code read more easily here by simply using memset() always as when we don't have an optimized version of the function we will still have a version of this function around anyhow. Cc: Simon Glass <sjg@chromium.org> Signed-off-by:
Tom Rini <trini@konsulko.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Tom Rini authored
We have long had available optimized versions of the memset and memcpy functions that are borrowed from the Linux kernel. We should use these in normal conditions as the speed wins in many workflows outweigh the relatively minor size increase. However, we have a number of places where we're simply too close to size limits in SPL and must be able to make the size vs performance trade-off in those cases. Cc: Philippe Reynes <tremyfr@yahoo.fr> Cc: Eric Jarrige <eric.jarrige@armadeus.org> Cc: Heiko Schocher <hs@denx.de> Cc: Magnus Lilja <lilja.magnus@gmail.com> Cc: Lokesh Vutla <lokeshvutla@ti.com> Cc: Chander Kashyap <k.chander@samsung.com> Cc: Akshay Saraswat <akshay.s@samsung.com> Cc: Simon Glass <sjg@chromium.org> Cc: Stefan Roese <sr@denx.de> Signed-off-by:
Tom Rini <trini@konsulko.com> Acked-by:
Stefan Roese <sr@denx.de> Reviewed-by:
Simon Glass <sjg@chromium.org>
-