summaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* get_maintainer: fix perl 5.22/5.24 deprecated/incompatible "\C" useHeiko Schocher2016-01-081-11/+11
| | | | | | | | | | | | | from linux commit ce8155f7a3d5: Perl 5.22 emits a deprecated message when "\C" is used in a regex. Perl 5.24 will disallow it altogether. Fix it by using [A-Z] instead of \C. >From linux adapted to U-Boot by: Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
* checkpatch: fix left brace warningHeiko Schocher2016-01-041-5/+5
| | | | | | | | | | | | | | | | | | | | | | using checkpatch with Perl 5.22.0 generates a warning, this is fixed in linux through commit: commit 4e5d56bdf892e18832a6540b63ebf709966bce2a Author: Eddie Kovsky <ewk@edkovsky.org> Date: Wed Sep 9 15:37:52 2015 -0700 checkpatch: fix left brace warning Using checkpatch.pl with Perl 5.22.0 generates the following warning: Unescaped left brace in regex is deprecated, passed through in regex; This patch fixes the warnings by escaping occurrences of the left brace inside the regular expression. Adapt it for U-Boot. Signed-off-by: Heiko Schocher <hs@denx.de>
* ARM: zynq: Add target for building bootable SPL image for ZynqNathan Rossi2015-11-191-0/+11
| | | | | | | | | | | | | | | | Add a build target to generate 'boot.bin' which includes SPL. This is used by the platforms BootROM to load SPL directly. This change also conditionally changes what the 'boot.bin' target generates depending on the SoC. Leaving the behaviour unchanged for the AT91 targets. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Cc: Tom Rini <trini@konsulko.com> Cc: Andreas Bießmann <andreas.devel@googlemail.com> Cc: Heiko Schocher <hs@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
* spl: Add support for CONFIG_OF_EMBED=yMichal Simek2015-11-121-0/+1
| | | | | | | | | | | | | | | | | | | | CONFIG_OF_EMBED=y is the option which is here only for testing purpose and shouldn't be enabled by default as is describe at: "dts: Add a comment about CONFIG_OF_EMBED being for local use" (sha1: 3d3f60cb7a6bb6c338e00a9769fa918a8536096c) But still enabling this option locally shouldn't end up with compilation error when you build SPL. This patch fix it. Compilation error: lib/built-in.o: In function `fdtdec_setup': /mnt/disk/u-boot/lib/fdtdec.c:1246: undefined reference to `__dtb_dt_begin' Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reported-by: Tom Rini <trini@konsulko.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* Fix trini email in the get_maintainer.pl scriptAndy Fleming2015-11-121-1/+1
| | | | | | Looks like one spot got missed. Probably due to the backslash. Signed-off-by: Andy Fleming <afleming@gmail.com>
* Various Makefiles: Add SPDX-License-Identifier tagsTom Rini2015-11-103-0/+9
| | | | | | | | | | | After consulting with some of the SPDX team, the conclusion is that Makefiles are worth adding SPDX-License-Identifier tags too, and most of ours have one. This adds tags to ones that lack them and converts a few that had full (or in one case, very partial) license blobs into the equivalent tag. Cc: Kate Stewart <kstewart@linuxfoundation.org> Signed-off-by: Tom Rini <trini@konsulko.com>
* dm: spl: Generate u-boot-spl-dtb.bin only when enabledSimon Glass2015-11-041-0/+2
| | | | | | | | At present this file is generated even when device tree is not enabled in SPL. Avoid this, since this file serves no purpose in that case. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* Move board_init_f_mem() into a common locationSimon Glass2015-10-241-0/+1
| | | | | | | | | This function will be used by both SPL and U-Boot proper. So move it into a common place. Also change the #ifdef so that the early malloc() area is not set up in SPL if CONFIG_SYS_SPL_MALLOC_START is defined. In that case it would never actually be used, and just chews up stack space. Signed-off-by: Simon Glass <sjg@chromium.org>
* kbuild: fixdep: drop meaningless hash table initializationMasahiro Yamada2015-09-151-19/+0
| | | | | | | | | | | The clear_config() is called just once at the beginning of this program, but the global variable hashtab[] is already zero-filled at the start-up. [ Linux commit: d179e22762fd38414c4108acedd5feca4cf7e0d8 ] Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Michal Marek <mmarek@suse.com>
* x86: Generate a valid ACPI tableSaket Sinha2015-08-261-0/+11
| | | | | | | | | | | | | | | | | Implement write_acpi_table() to create a minimal working ACPI table. This includes writing FACS, XSDT, RSDP, FADT, MCFG, MADT, DSDT & SSDT ACPI table entries. Use a Kconfig option GENERATE_ACPI_TABLE to tell U-Boot whether we need actually write the APCI table just like we did for PIRQ routing, MP table and SFI tables. With ACPI table existence, linux kernel gets control of power management, thermal management, configuration management and monitoring in hardware. Signed-off-by: Saket Sinha <saket.sinha89@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tidied up whitespace and aligned some tabs: Signed-off-by: Simon Glass <sjg@chromium.org>
* of: clean up OF_CONTROL ifdef conditionalsMasahiro Yamada2015-08-181-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We have flipped CONFIG_SPL_DISABLE_OF_CONTROL. We have cleansing devices, $(SPL_) and CONFIG_IS_ENABLED(), so we are ready to clear away the ugly logic in include/fdtdec.h: #ifdef CONFIG_OF_CONTROL # if defined(CONFIG_SPL_BUILD) && !defined(SPL_OF_CONTROL) # define OF_CONTROL 0 # else # define OF_CONTROL 1 # endif #else # define OF_CONTROL 0 #endif Now CONFIG_IS_ENABLED(OF_CONTROL) is the substitute. It refers to CONFIG_OF_CONTROL for U-boot proper and CONFIG_SPL_OF_CONTROL for SPL. Also, we no longer have to cancel CONFIG_OF_CONTROL in include/config_uncmd_spl.h and scripts/Makefile.spl. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
* of: flip CONFIG_SPL_DISABLE_OF_CONTROL into CONFIG_SPL_OF_CONTROLMasahiro Yamada2015-08-181-1/+1
| | | | | | | | | | | | | | | | | | | As we discussed a couple of times, negative CONFIG options make our life difficult; CONFIG_SYS_NO_FLASH, CONFIG_SYS_DCACHE_OFF, ... and here is another one. Now, there are three boards enabling OF_CONTROL on SPL: - socfpga_arria5_defconfig - socfpga_cyclone5_defconfig - socfpga_socrates_defconfig This commit adds CONFIG_SPL_OF_CONTROL for them and deletes CONFIG_SPL_DISABLE_OF_CONTROL from the other boards to invert the logic. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* dm: drop CONFIG_DM_DEVICE_REMOVE from uncmd listMasahiro Yamada2015-08-181-2/+0
| | | | | | | | | | | | | | | We do not want to compile the DM remove code for SPL. Currently, we undef it in include/config_uncmd_spl.h (for C files) and in scripts/Makefile.uncmd_spl (for Makefiles). This is really ugly. This commit demonstrates how we can deprecate those two files. Use $(SPL_) for the entry in the Makfile and CONFIG_IS_ENABLED() in C files. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* spl: move SPL driver entries to driver/MakefileMasahiro Yamada2015-08-181-30/+1
| | | | | | | | | | | | | Just preparing for upcoming cleaning. The board-specific linker script board/vpac270/u-boot-spl.lds has been touched to avoid build error. It does not change the size of spl/u-boot-spl.bin for this board, so it should be OK. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Stefano Babic <sbabic@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* linux/kconfig.h: add CPP macros useful for per-image config optionsMasahiro Yamada2015-08-181-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous commit introduced a useful macro used in makefiles, in order to reference to different variables (CONFIG_... or CONFIG_SPL_...) depending on the build context. Per-image config option control is a PITA in C sources, too. Here are some macros useful in C/CPP expressions. CONFIG_IS_ENABLED(FOO) can be used as a shorthand for (!defined(CONFIG_SPL_BUILD) && defined(CONFIG_FOO)) || \ (defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_FOO)) For example, it is useful to describe C code as follows, #if CONFIG_IS_ENABLED(OF_CONTROL) (device tree code) #else (board file code) #endif The ifdef conditional above is switched by CONFIG_OF_CONTROL during the U-Boot proper building (CONFIG_SPL_BUILD is not defined), and by CONFIG_SPL_OF_CONTROL during SPL building (CONFIG_SPL_BUILD is defined). The macro can be used in C context as well, so you can also write the equivalent code as follows: if (CONFIG_IS_ENABLED(OF_CONTROL)) { (device tree code) } else { (board file code) } Another useful macro is CONFIG_VALUE(). CONFIG_VALUE(FOO) is expanded into CONFIG_FOO if CONFIG_SPL_BUILD is undefined, and into CONFIG_SPL_FOO if CONFIG_SPL_BUILD is defined. You can write as follows: text_base = CONFIG_VALUE(TEXT_BASE); instead of: #ifdef CONFIG_SPL_BUILD text_base = CONFIG_SPL_TEXT_BASE; #else text_base = CONFIG_TEXT_BASE; #endif This commit also adds slight hacking on fixdep so that it can output a correct list of fixed dependencies. If the fixdep finds CONFIG_IS_ENABLED(FOO) in a source file, we want $(wildcard include/config/foo.h) in the U-boot proper building context, while we want $(wildcard include/config/spl/foo.h) in the SPL build context. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* kbuild: add a makefile macro useful with per-image config optionsMasahiro Yamada2015-08-181-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit e02ee2548afe ("kconfig: switch to single .config configuration") made the configuration itself pretty simple, instead, we lost the way to systematically enable/disable config options for each image independently. Our current strategy is, put entries into Makefile.spl for options we need separate enabling, or once enable the options globally in Kconfig and then undef them in Makefile.uncmd_spl if we do not want to compile the features for SPL at all. Things are getting really messy. Besides, "ifdef CONFIG_SPL_BUILD" are sprinkled everywhere in makefiles. This commit adds a variable to help describe makefile simpler. $(SPL_) evaluates to "SPL_" during the SPL build, while to an empty string during building U-boot proper. So, you can write obj-$(CONFIG_$(SPL_)FOO) += foo.o instead of ifdef CONFIG_SPL_BUILD obj-$(CONFIG_SPL_FOO) += foo.o else obj-$(CONFIG_FOO) += foo.o endif If CONFIG_SPL_FOO does not exist in Kconfig, it is equivalent to ifndef CONFIG_SPL_BUILD obj-$(CONFIG_SPL_FOO) += foo.o endif This is the pattern we often see in our current makefiles. To take advantage of this macro, we should prefix SPL_ for the SPL version of the option when we need independent control between U-boot and SPL. With this naming scheme, I hope our makefiles will be much simplified. It means we want to rename existing config options as follows in the long run: CONFIG_SPL_SERIAL_SUPPORT -> CONFIG_SPL_SERIAL CONFIG_SPL_I2C_SUPPORT -> CONFIG_SPL_I2C CONFIG_SPL_GPIO_SUPPORT -> CONFIG_SPL_GPIO CONFIG_SPL_SPI_SUPPORT -> CONFIG_SPL_SPI CONFIG_SPL_DISABLE_OF_CONTROL -> CONFIG_SPL_OF_CONTROL (inverting the logic) Then drivers/Makefile would be re-worked as follows: obj-$(CONFIG_$(SPL_)SERIAL) += serial/ obj-$(CONFIG_$(SPL_)I2C) += i2c/ obj-$(CONFIG_$(SPL_)GPIO) += gpio/ obj-$(CONFIG_$(SPL_)SPI) += spi/ ... Eventually, SPL-specialized entries in Makefile.spl would go away. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* kbuild: fixdep: optimize code slightlyMasahiro Yamada2015-08-181-3/+4
| | | | | | | | | If the target string matches "CONFIG_", move the pointer p forward. This saves several 7-chars adjustments. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* Makefile: Add target for building bootable SPL image for SoCFPGAMarek Vasut2015-08-081-0/+10
| | | | | | | | | | | | Add build target for generating boot partition images recognised by the SoCFPGA BootROM. The SoCFPGA BootROM expects four copies of the u-boot-spl-dtb.sfp at the beginning of boot partition. Those are u-boot-spl-dtb.bin augmented by a header with which the BootROM can work. The u-boot-dtb.img uImage is appended to this to produce a full boot partition image, the u-boot-with-spl-dtb.sfp . This is the name of the final target. Signed-off-by: Marek Vasut <marex@denx.de>
* driver/ddr/altera: Add DDR driver for Altera's SDRAM controllerDinh Nguyen2015-08-081-0/+1
| | | | | | | | This patch enables the SDRAM controller that is used on Altera's SoCFPGA family. This patch configures the SDRAM controller based on a configuration file that is generated from the Quartus tool, sdram_config.h. Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
* Support removing default assembler flagsSimon Glass2015-08-051-1/+2
| | | | | | | | | | The CFLAGS_REMOVE_<file> feature allows default C compiler flags to be removed for particular files. Add the same feature for assembler, using AFLAGS_REMOVE_<file>. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* kbuild: create symbolic link only for ARM, AVR32, SPARC, PowerPC, x86Masahiro Yamada2015-07-271-0/+2
| | | | | | | | | | | | | The symbolic link to SoC/CPU specific header directory is created during the build, while it is only necessary for ARM, AVR32, SPARC, x86, and some CPUs of PowerPC. For the other architectures, it just results in a broken symbolic link. Introduce CONFIG_CREATE_ARCH_SYMLINK to not create unneeded symbolic links. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* kbuild: sync with Linux 4.1Masahiro Yamada2015-07-274-40/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update some build scripts to match Linux 4.1. Commit-based syncing was done so as not to break U-Boot specific changes. The previous big sync was from Linux 3.18-rc1 by commit 176d09827725 (kbuild: sync misc scripts with Linux 3.18-rc1). The commits imported from Linux (some with adjustments) are: [1] commit 9fb5e5372208973984a23ee6f5f025c05d364633 Author: Robert Richter <rrichter@cavium.com> dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst [2] commit 371fdc77af44f4cb32475fd499e1d912ccc30890 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: collect shorthands into scripts/Kbuild.include [3] commit a29b82326ed4eb5567b03c85b52c6891578d5a03 Author: Michal Marek <mmarek@suse.cz> kbuild: Remove duplicate $(cmd) definition in Makefile.clean [4] commit 1846dfbde3e8a53f3673dcb1c1b79fd9b3f8d40d Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: remove redundant -rR flag of hdr-inst [5] commit 34948e0bbf98640fc1821751b01d2f0cd17d84d5 Author: Michal Marek <mmarek@suse.cz> kbuild: Drop support for clean-rule [6] commit a16c5f99a28c9945165c46da27fff8e6f26f8736 Author: Michal Marek <mmarek@suse.cz> kbuild: Fix removal of the debian/ directory [7] commit d0d38cd9e853db11e0242b3df4c9c3c4a663fbb4 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: use mixed-targets when two or more config targets are given [8] commit dd33c03b18b3f2db791eb6a17c37d2de66e4de18 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: fix cc-ifversion macro [9] commit 665d92e38f65d70796aad2b8e49e42e80815d4a4 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: do not add $(call ...) to invoke cc-version or cc-fullversion [10] commit 6dcb4e5edf39e3b65a75ca76f087b2fdbee8a808 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: allow cc-ifversion to have the argument for false condition [11] commit c0a80c0c27e5e65b180a25e6c4c2f7ef9e386cd3 Author: Heiko Carstens <heiko.carstens@de.ibm.com> ftrace: allow architectures to specify ftrace compile options [12] commit 0b24becc810dc3be6e3f94103a866f214c282394 Author: Andrey Ryabinin <a.ryabinin@samsung.com> kasan: add kernel address sanitizer infrastructure [13] commit 4218affdf57f938c04e3a916a9685ee27079f377 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: remove warning about "make depend" [14] commit 77479b38e2f58890eb221a0418357502a5b41cd6 Author: Nathan Rossi <nathan.rossi@xilinx.com> kbuild: Create directory for target DTB Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Robert Richter <rrichter@cavium.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com> Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* kconfig: sync with Linux 4.1Masahiro Yamada2015-07-2717-203/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the files under scripts/kconfig/ to match Linux 4.1. Some Kconfig sources have diverged from those in the kernel, so commit-base syncing was done not to lose U-Boot specific updates. The commits cherry-picked from Linux are: [1] commit be8af2d54a66911693eddc556e4f7a866670082b Author: Bjørn Forsman <bjorn.forsman@gmail.com> kconfig/lxdialog: get ncurses CFLAGS with pkg-config [2] commit 3943f42c11896ce82ad3da132c8a5630313bdd0e Author: Andrey Utkin <andrey.krieger.utkin@gmail.com> Replace mentions of "list_struct" to "list_head" [3] commit e4e458b45c5861808674eebfea94cee2258bb2ea Author: Arjun Sreedharan <arjun024@gmail.com> calloc/xcalloc: Fix argument order [4] commit 09950bc256e3628d275f90e016e6f5a039fbdcab Author: Olof Johansson <olof@lixom.net> merge_config.sh: Display usage if given too few arguments [5] commit b6a2ab2cd4739a9573ed41677e53171987b8da34 Author: Colin Ian King <colin.king@canonical.com> kconfig: use va_end to match corresponding va_start [6] commit 70529b1a1784503169416df19ce3d68746401340 Author: Michal Marek <mmarek@suse.cz> kconfig: Get rid of the P() macro in headers [7] commit 463157444e377bf9b279101b1f16a94c4648c03a Author: Michal Marek <mmarek@suse.cz> kconfig: Remove dead code [8] commit ad8d40cda3ad22ad9e8863d55a5c88f85c0173f0 Author: Michal Marek <mmarek@suse.cz> kconfig: Remove unnecessary prototypes from headers [9] commit de4619937229378e81f95e99c9866acc8e207d34 Author: Masahiro Yamada <yamada.masahiro@socionext.com> kbuild: mergeconfig: fix "jobserver unavailable" warning [10] commit b9fe99c5b994c6ddc57780993966b18899526c0b Author: Masahiro Yamada <yamada.masahiro@socionext.com> kbuild: mergeconfig: move an error check to merge_config.sh [11] commit 371cfd4ff0611d8bc5d18bbb9cc6a2bc3d56cd3d Author: Masahiro Yamada <yamada.masahiro@socionext.com> kbuild: mergeconfig: remove redundant $(objtree) [12] commit 3a975b8cfcbe026b535f83bde9a3c009bae214f9 Author: Masahiro Yamada <yamada.masahiro@socionext.com> merge_config.sh: improve indentation [13] commit bc8f8f5fc47cd02c2c5f3580dac2fe6695af1edd Author: Masahiro Yamada <yamada.masahiro@socionext.com> merge_config.sh: rename MAKE to RUNMAKE [14] commit 63a91033d52e64a22e571fe84924c0b7f21c280d Author: Masahiro Yamada <yamada.masahiro@socionext.com> kbuild: add generic mergeconfig target, %.config [15] commit 1cba0c305758c3c1786ecaceb03e142c95a4edc9 Author: Michal Marek <mmarek@suse.cz> kconfig: Simplify Makefile [16] commit 0a1f00a1c86421cc07cec87011c7cf4df68ee54b Author: Michal Marek <mmarek@suse.cz> kconfig: Do not print status messages in make -s mode Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Arjun Sreedharan <arjun024@gmail.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
* Merge git://git.denx.de/u-boot-marvellTom Rini2015-07-231-1/+2
|\
| * arm: mvebu: Add Armada 38x DDR3 training code from Marvell bin_hdrStefan Roese2015-07-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the DDR3 setup and training code taken from the Marvell U-Boot repository. This code used to be included as a binary (bin_hdr) into the Armada A38x boot image. Not linked with the main U-Boot. With this code addition and the serdes/PHY setup code, the Armada A38x support in mainline U-Boot is finally self-contained. So the complete image for booting can be built from mainline U-Boot. Without any additional external inclusion. Note: This code has undergone many hours (days!) of coding-style cleanup and refactoring. It still is not checkpatch clean though, I'm afraid. As the factoring of the code has so many levels of indentation that many lines are longer than 80 chars. Signed-off-by: Stefan Roese <sr@denx.de>
| * arm: mvebu: drivers/ddr: Move Armada XP DDR init code into new directoryStefan Roese2015-07-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the upcoming addition of the Armada 38x DDR support, which is not compatible to the Armada XP DDR init code, we need to introduce a new directory infrastructure. To support multiple Marvell DDR controller. This will be the new structure: drivers/ddr/marvell/axp Supporting Armada XP (AXP) devices (and perhaps Armada 370) drivers/ddr/marvell/a38x Supporting Armada 38x devices (and perhaps Armada 39x) Signed-off-by: Stefan Roese <sr@denx.de>
* | dm: Add a clock uclassSimon Glass2015-07-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clocks are an important feature of platforms and have become increasing complex with time. Most modern SoCs have multiple PLLs and dozens of clock dividers which distribute clocks to on-chip peripherals. Some SoC implementations have a clock API which is private to that SoC family, e.g. Tegra and Exynos. This is useful but it would be better to have a common API that can be understood and used throughout U-Boot. Add a simple clock API as a starting point. It supports querying and setting the rate of a clock. Each clock is a device. To reduce memory and processing overhead the concept of peripheral clocks is provided. These do not need to be explicit devices - it is possible to write a driver that can adjust the I2C clock (for example) without an explicit I2C clock device. This can dramatically reduce the number of devices (and associated overhead) in a complex SoC. Clocks are referenced by a number, and it is expected that SoCs will define that numbering themselves via an enum. Signed-off-by: Simon Glass <sjg@chromium.org>
* | dm: Add support for RAM driversSimon Glass2015-07-211-0/+1
| | | | | | | | | | | | | | | | Add support for a driver which sets up DRAM and can return information about the amount of RAM available. This is a first step towards moving RAM init to driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
* | dm: power: Allow use of regulators in SPLSimon Glass2015-07-211-0/+1
| | | | | | | | | | | | | | This functionality may be useful for setting up regulators early during boot. Signed-off-by: Simon Glass <sjg@chromium.org>
* | dm: Add support for LEDsSimon Glass2015-07-211-0/+1
| | | | | | | | | | | | | | | | | | Add a simple uclass for LEDs, so that these can be controlled by the device tree and activated when needed. LEDs are referred to by their label. This implementation requires a driver for each type of LED (e.g GPIO, I2C). Signed-off-by: Simon Glass <sjg@chromium.org>
* | dm: Reduce SPL device tree sizeSimon Glass2015-07-211-0/+28
|/ | | | | | | | | The SPL device tree size must be minimised to save memory. Only include properties that are needed by SPL - this is determined by the presence of the "u-boot,dm-pre-reloc" property. Also remove a predefined list of unused properties from the nodes that remain. Signed-off-by: Simon Glass <sjg@chromium.org>
* Remove SPL undefine of CONFIG_OF_CONTROLSimon Glass2015-06-101-0/+2
| | | | | | | Allow SPL to be built with this option so that we can support device tree control. Disable the simple bus for now in SPL. It may be needed later. Signed-off-by: Simon Glass <sjg@chromium.org>
* Kconfig: Enable usage of escape char '\' in string valuesStefan Roese2015-06-082-54/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I might have missed something, but I failed to use the escape char '\' in strings. To pass a printf format string like "foo %d bar\n" via Kconfig to the code. Right now its not possible to use the escape character '\' in Kconfig string values correctly to e.g. set this string value "test output\n". The '\n' will be converted to 'n'. The current implementation removes some of the '\' chars from the input string in conf_set_sym_val(). Examples: '\' -> '' '\\' -> '\' '\\\' -> '\' '\\\\' -> '\\' ... And then doubles the backslash chars in the output string in sym_escape_string_value(). Example: '\' -> '' -> '' '\\' -> '\' -> '\\' '\\\' -> '\' -> '\\' '\\\\' -> '\\' -> '\\\\' ... As you see in these examples, its impossible to generate a single '\' charater in the output string as its needed for something like '\n'. This patch now changes this behavior to not drop some backslashes in conf_set_sym_val() and to not add new backslashes in the resulting output string. Removing the function sym_escape_string_value() completely as its not needed anymore. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com>
* kbuild: define DO_DEPS_ONLY for u-boot.cfg to fix build errorMasahiro Yamada2015-05-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 741e58e0fc8e (Create a .cfg file containing the CONFIG options used to build), all the Blackfin boards fail to build if the parallel (-j) option is passed. $ make -s bf506f-ezkit_defconfig # # configuration written to .config # $ make -j8 CROSS_COMPILE=bfin-elf- scripts/kconfig/conf --silentoldconfig Kconfig CHK include/config.h UPD include/config.h GEN include/autoconf.mk GEN include/autoconf.mk.dep CHK include/config/uboot.release CHK include/generated/timestamp_autogenerated.h UPD include/generated/timestamp_autogenerated.h CFG u-boot.cfg include/asm-offsets.h:3:43: fatal error: generated/generic-asm-offsets.h: No such file or directory compilation terminated. make: *** [u-boot.cfg] Error 1 When parsing header files for defined CONFIG options, DO_DEPS_ONLY must be defined to exclude generated headers that might not have been available yet. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* moveconfig: Ignore duplicate configs when movingJoe Hershberger2015-05-271-1/+2
| | | | | | | | | | | | | | | | | When moving configs, it is important to know what was defined in the config header even if it duplicates the configs coming from Kconfig. This is specifically needed for the case where a config is set to default 'y' in the Kconfig. This would previously cause the actual value from the include config to be filtered out, and moveconfig.py would think that it was 'n'... This means that the value that should be 'y' is now (in every defconfig) set to 'not set'. tools/moveconfig.py now defines KCONFIG_IGNORE_DUPLICATES to prevent the filtering from happening and selecting wrong values for the defconfig. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* Create a .cfg file containing the CONFIG options used to buildSimon Glass2015-04-181-1/+8
| | | | | | | | | | At present CONFIG options are split across Kconfig and board config headers files. Also we have multiple files containing these CONFIG options. In order to see exactly what is being used for building, create a .cfg file which holds these options as reported by the C preprocessor. Signed-off-by: Simon Glass <sjg@chromium.org>
* fix makefiles to respect DTC settingPavel Machek2015-04-071-1/+1
| | | | | | | Top-level Makefile has option to select dtc binary, but it is ignored due to bug in Makefile.lib. Fix it. Signed-off-by: Pavel Machek <pavel@denx.de>
* kbuild: remove scripts/multiconfig.shMasahiro Yamada2015-03-282-90/+10
| | | | | | | | | | | | We have switched to the single .config configuration system, the same one as used in Linux Kernel. The necessary glue code is small enough now, so move it to the top-level Makefile and scripts/kconfig/Makefile, and then delete scripts/multiconfig.sh. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* kbuild: remove "*_felconfig" targetMasahiro Yamada2015-03-281-12/+0
| | | | | | | | | | | | | | | | | | This target was added by commit cbdd9a9737cc (sunxi: kconfig: Add %_felconfig rule to enable FEL build of sunxi platforms.). At that time, U-Boot used separate .config files for U-Boot proper and SPL. I understood the pain to modify both .config and spl/.config. Now, we have switched to single .config configuration. It seems acceptable to run "make menuconfig" or friends to enable CONFIG_SPL_FEL, as we do for other CONFIGs. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Ian Campbell <ijc@hellion.org.uk> Cc: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* fixdep: remove multiple .config support codeMasahiro Yamada2015-03-051-5/+1
| | | | | | | | | | Since commit e02ee2548afe (kconfig: switch to single .config configuration), the ".*.cmd" files are not correctly created for SPL/TPL. The U-Boot extension code in fixdep, which was introduced to support the multiple .config, must be removed. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* scripts/checkstack.pl: update to get AArch64 port from LinuxKim Phillips2015-03-051-11/+16
| | | | | | | | | | | | | | Bring checkstack.pl up to date from its upstream Linux development. Effectively, the following linux commits: 208ad00 checkstack.pl: port to AArch64 fda9f99 scripts/checkstack.pl: automatically handle 32-bit and 64-bit mode for ARCH=x86 7eb6e34 kbuild: trivial - remove trailing empty lines 690998b scripts/checkstack.pl: Add metag support Reported-by: York Sun <yorksun@freescale.com> Cc: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
* kconfig: remove unneeded U-Boot extension codeMasahiro Yamada2015-03-021-8/+0
| | | | | | | This code was introduced to support the multiple .config configuration in U-Boot. We do not need it any more. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* kconfig: remove unneeded dependency on !SPL_BUILDMasahiro Yamada2015-02-241-0/+2
| | | | | | | Now CONFIG_SPL_BUILD is not defined in Kconfig, so "!depends on SPL_BUILD" and "if !SPL_BUILD" are redundant. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* kconfig: switch to single .config configurationMasahiro Yamada2015-02-245-269/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When Kconfig for U-boot was examined, one of the biggest issues was how to support multiple images (Normal, SPL, TPL). There were actually two options, "single .config" and "multiple .config". After some discussions and thought experiments, I chose the latter, i.e. to create ".config", "spl/.config", "tpl/.config" for Normal, SPL, TPL, respectively. It is true that the "multiple .config" strategy provided us the maximum flexibility and helped to avoid duplicating CONFIGs among Normal, SPL, TPL, but I have noticed some fatal problems: [1] It is impossible to share CONFIG options across the images. If you change the configuration of Main image, you often have to adjust some SPL configurations correspondingly. Currently, we cannot handle the dependencies between them. It means one of the biggest advantages of Kconfig is lost. [2] It is too painful to change both ".config" and "spl/.config". Sunxi guys started to work around this problem by creating a new configuration target. Commit cbdd9a9737cc (sunxi: kconfig: Add %_felconfig rule to enable FEL build of sunxi platforms.) added "make *_felconfig" to enable CONFIG_SPL_FEL on both images. Changing the configuration of multiple images in one command is a generic demand. The current implementation cannot propose any good solution about this. [3] Kconfig files are getting ugly and difficult to understand. Commit b724bd7d6349 (dm: Kconfig: Move CONFIG_SYS_MALLOC_F_LEN to Kconfig) has sprinkled "if !SPL_BUILD" over the Kconfig files. [4] The build system got more complicated than it should be. To adjust Linux-originated Kconfig to U-Boot, the helper script "scripts/multiconfig.sh" was introduced. Writing a complicated text processor is a shell script sometimes caused problems. Now I believe the "single .config" will serve us better. With it, all the problems above would go away. Instead, we will have to add some CONFIG_SPL_* (and CONFIG_TPL_*) options such as CONFIG_SPL_DM, but we will not have much. Anyway, this is what we do now in scripts/Makefile.spl. I admit my mistake with my apology and this commit switches to the single .config configuration. It is not so difficult to do that: - Remove unnecessary processings from scripts/multiconfig.sh This file will remain for a while to support the current defconfig format. It will be removed after more cleanups are done. - Adjust some makefiles and Kconfigs - Add some entries to include/config_uncmd_spl.h and the new file scripts/Makefile.uncmd_spl. Some CONFIG options that are not supported on SPL must be disabled because one .config is shared between SPL and U-Boot proper going forward. I know this is not a beautiful solution and I think we can do better, but let's see how much we will have to describe them. - update doc/README.kconfig More cleaning up patches will follow this. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* kbuild: prepare for moving headers into mach-*/include/machMasahiro Yamada2015-02-211-4/+15
| | | | | | | | | | | | | | | | | | | | | In U-Boot, SoC-specific headers are placed in arch/$(ARCH)/include/asm/arch-$(SOC) and a symbolic link to that directory is created at the early stage of the build process. Creating and removing a symbolic link during the build is not preferred. In fact, Linux Kernel did away with include/asm-$(ARCH) directories a long time time ago. As for ARM, now it is possible to collect SoC sources into arch/arm/mach-$(SOC). It is also reasonable to move SoC headers into arch/arm/mach-$(SOC)/include/mach. This commit prepares for that. If the directory arch/$(ARCH)/mach-$(SOC)/include/mach exists, a symbolic to that directory is created. Otherwise, a symbolic link to arch/$(ARCH)/include/asm/arch-$(SOC) or arch-$(CPU) is created. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* sunxi: Normalise FEL supportSimon Glass2015-02-161-2/+0
| | | | | | | | | | | | Make sunxi's FEL code fit with the normal U-Boot boot sequence instead of creating its own. There are some #ifdefs required in start.S. Future work will hopefully remove these. This series is available at u-boot-dm, branch sunxi-working. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* scripts/Makefile.spl: Add MVEBU DDR code to SPLStefan Roese2015-02-061-0/+1
| | | | | Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Luka Perkov <luka.perkov@sartura.hr>
* scripts: add a utility to fill blank fields of doc/README.scrapyardMasahiro Yamada2015-01-141-0/+166
| | | | | | | | | | We are removing bunch of non-generic boards these days. Updating doc/README.scrapyard is a really tedious task, but it can be automated. I hope this tool will make our life easier. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* sunxi: Fix CONFIG_UART0_PORT_F build and add it to menuconfigSiarhei Siamashka2015-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The CONFIG_UART0_PORT_F option has been supported since http://git.denx.de/?p=u-boot.git;a=commit;h=ff2b47f6a9cc1025 This option is primarily useful only for low level u-boot debugging on tablets, where normal UART0 is difficult to access and requires device disassembly and/or soldering. This patch now allows it to be selected from menuconfig. A dependency on SPL_FEL is added because u-boot does not support booting from NAND yet and also booting from SD card is impossible when a MicroSD breakout board is plugged into the SD slot. Additionally a compilation problem is fixed: common/spl/built-in.o: In function `spl_mmc_load_image': /tmp/u-boot-sunxi/common/spl/spl_mmc.c:94: undefined reference to `mmc_initialize' /tmp/u-boot-sunxi/common/spl/spl_mmc.c:96: undefined reference to `find_mmc_device' /tmp/u-boot-sunxi/common/spl/spl_mmc.c:104: undefined reference to `mmc_init' scripts/Makefile.spl:206: recipe for target 'spl/u-boot-spl' failed Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* scripts: fix binutils-version.sh for 'as' without a package.Bill Pringlemeir2015-01-081-1/+2
| | | | | | | | | | | | | Commit 73c25753 fixed the common issue that binutil packages (tool/organization that packaged or built the bin-utils) are included in brackets and this may falsely be recognized as a version. However, some tools do not provide a 'package' and previously we add the 'Gnu assembler..' to the version. Strip out the '(package version text)' and then look for a ##.## string. Signed-off-by: Bill Pringlemeir <bpringlemeir@nbsps.com> Tested-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Tested-by: Hans de Goede <hdegoede@redhat.com>
OpenPOWER on IntegriCloud