summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' of git://git.denx.de/u-boot-niosTom Rini2015-11-062-4/+9
|\
| * nios2: use common sequence for reserve_ubootThomas Chou2015-11-061-2/+2
| | | | | | | | | | | | | | Use common sequence for reserve_uboot, as the result is the same. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
| * nios2: use dram bank in board infoThomas Chou2015-11-061-2/+7
| | | | | | | | | | | | | | | | Use dram bank in board info, so that it displays correct memory values in bdinfo command. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Marek Vasut <marex@denx.de>
* | Merge branch 'master' of git://git.denx.de/u-boot-mipsTom Rini2015-11-061-2/+6
|\ \
| * | common/board_f: enable setup_board_part1() for MIPSDaniel Schwierzeck2015-11-061-2/+6
| |/ | | | | | | | | | | | | | | | | | | | | | | The variables bd_t:bi_memstart and bd_t:bi_memsize have to be initialized also on MIPS. Otherwise LMB and cmd_bdinfo do not correctly work. This currently breaks the booting of FIT images on MIPS. Enable the board_init_f hook setup_board_part1() for MIPS to fix this. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | sf: Add SPI NOR protection mechanismFabio Estevam2015-11-051-0/+35
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | Many SPI flashes have protection bits (BP2, BP1 and BP0) in the status register that can protect selected regions of the SPI NOR. Take these bits into account when performing erase operations, making sure that the protected areas are skipped. Tested on a mx6qsabresd: => sf probe SF: Detected M25P32 with page size 256 Bytes, erase size 64 KiB, total 4 MiB => sf protect lock 0x3f0000 0x10000 => sf erase 0x3f0000 0x10000 offset 0x3f0000 is protected and cannot be erased SF: 65536 bytes @ 0x3f0000 Erased: ERROR => sf protect unlock 0x3f0000 0x10000 => sf erase 0x3f0000 0x10000 SF: 65536 bytes @ 0x3f0000 Erased: OK Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> [re-worked to fit the lock common to dm and non-dm] Signed-off-by: Jagan Teki <jteki@openedev.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Jagan Teki <jteki@openedev.com>
* Merge branch 'master' of git://git.denx.de/u-boot-videoTom Rini2015-11-053-5/+4
|\
| * video: Drop DEV_FLAGS_SYSTEM flagBin Meng2015-11-053-5/+4
| | | | | | | | | | | | DEV_FLAGS_SYSTEM does not have any actual meaning, hence drop it. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
* | common/usb_storage.c: Clean up usb_storage_probe()Tom Rini2015-11-031-27/+2
|/ | | | | | | | | | We have the protocol and subclass variables which are used only in disabled debug code. This code dates back to the initial git import and seemingly dead code so remove it. This was detected by Coverity (CID 131117) Signed-off-by: Tom Rini <trini@konsulko.com>
* Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriqTom Rini2015-10-302-4/+9
|\
| * common/board_f.c: change the macro name and remove it for PPC platformsGong Qianyu2015-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | For most PPC platforms, they will call the first get_clocks() in init_sequence_f[] as they define CONFIG_PPC. CONFIG_SYS_FSL_CLK is then defined to call the second get_clocks(), which should be redundant for PPC. Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
| * fdt_support: Don't panic if stdout alias is missingScott Wood2015-10-261-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, using fdt_fixup_stdout() on a device tree that is missing the relevant alias results in this: WARNING: could not set linux,stdout-path FDT_ERR_NOTFOUND. ERROR: /chosen node create failed - must RESET the board to recover. FDT creation failed! hanging...### ERROR ### Please RESET the board ### There is no reason for this to be a fatal error rather than a warning, and removing this allows for a smooth transition on a platform where the device tree currently lacks the correct aliases but will have them in the future. Signed-off-by: Scott Wood <scottwood@freescale.com> Cc: Kumar Gala <galak@kernel.crashing.org> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: York Sun <yorksun@freescale.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-netTom Rini2015-10-291-0/+19
|\ \
| * | net: mdio: Add mdio_free() and mdio_unregister() APIBin Meng2015-10-291-0/+19
| |/ | | | | | | | | | | | | Currently there is no API to uninitialize mdio. Add two APIs for this. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | Merge git://git.denx.de/u-boot-dmTom Rini2015-10-275-20/+12
|\ \
| * | env: export fdt_blob to the environment variableThomas Chou2015-10-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Export fdt_blob to the environment variable. So that we may use it to boot Linux. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Simon Glass <sjg@chromium.org>
| * | dm: tpm: Remove every compilation switch for TPM driver modelChristophe Ricard2015-10-231-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As every TPM drivers support UCLASS_TPM, we can only rely on DM_TPM functions. This simplify a bit the code. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Simon Glass <sjg@chromium.org>
| * | dm: Rename dev_get_parentdata() to dev_get_parent_priv()Simon Glass2015-10-233-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | The current name is inconsistent with other driver model data access functions. Rename it and fix up all users. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
* | | image.c: Fix non-Android booting with ramdisk and/or device treeTom Rini2015-10-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 1fec3c5 I added a check that if we had an Android image we default to trying the kernel address for a ramdisk. However when we don't have an Android image buf is NULL and we oops here. Ensure that we have 'buf' to check first. Reported-by: elipe Balbi <balbi@ti.com> Signed-off-by: Tom Rini <trini@konsulko.com>
* | | ubi,ubifs: sync with linux v4.2Heiko Schocher2015-10-261-3/+3
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sync with linux v4.2 commit 64291f7db5bd8150a74ad2036f1037e6a0428df2 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Sun Aug 30 11:34:09 2015 -0700 Linux 4.2 This update is needed, as it turned out, that fastmap was in experimental/broken state in kernel v3.15, which was the last base for U-Boot. Signed-off-by: Heiko Schocher <hs@denx.de> Tested-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
* | common/board_f.c: modify the macro to use get_clocks() more commonGong Qianyu2015-10-241-1/+1
| | | | | | | | | | | | get_clocks() should not be limited by ESDHC. Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
* | board_init_f_mem(): Don't create an unused early malloc() areaSimon Glass2015-10-241-1/+2
| | | | | | | | | | | | | | | | | | 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> Tested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | board_init_f_mem(): Don't require memset()Simon Glass2015-10-241-0/+18
| | | | | | | | | | | | | | Unfortunately memset() is not always available, so provide a substitute when needed. Signed-off-by: Simon Glass <sjg@chromium.org>
* | Move board_init_f_mem() into a common locationSimon Glass2015-10-244-29/+49
| | | | | | | | | | | | | | | | | | 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>
* | itest: make memory access work under sandboxStephen Warren2015-10-241-5/+16
| | | | | | | | | | | | | | | | itest accesses memory, and hence must map/unmap it. Without doing so, it accesses invalid addresses and crashes. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* | ubifs: Modify ubifs u-boot wrapper function prototypes for generic fs useHans de Goede2015-10-241-10/+2
| | | | | | | | | | | | | | | | | | | | | | Modify the ubifs u-boot wrapper function prototypes for generic fs use, and give them their own header file. This is a preparation patch for adding ubifs support to the generic fs code from fs/fs.c. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Heiko Schocher <hs@denx.de>
* | Allow imxtract to extract part of script image.Pierre Aubert2015-10-241-1/+2
| | | | | | | | | | | | | | Scripts are multi-file images, the imxtract command should handle them in the same manner. Signed-off-by: Pierre Aubert <p.aubert@staubli.com>
* | allow LED initialization without STATUS_LED_BOOTBernhard Nortmann2015-10-241-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For current U-Boot to initialize status LEDs via status_led_init(), it is required to have both CONFIG_STATUS_LED and STATUS_LED_BOOT defined. This may be a particular concern with GPIO LEDs, where __led_init() is required to correctly set up the GPIO (gpio_request and gpio_direction_output). Without STATUS_LED_BOOT the initialization isn't called, which could leave the user with a non-functional "led" command - due to the fact that the LED routines in gpio_led.c use gpio_set_value() just fine, but the GPIO never got set up properly in the first place. I think having CONFIG_STATUS_LED is sufficient to justify a corresponding call to status_led_init(), even with no STATUS_LED_BOOT defined. To do so, common/board_r.c needs call that routine, so it now is exposed via status_led.h. Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de> [trini: Add dummy __led_init to pca9551_led.c] Signed-off-by: Tom Rini <trini@konsulko.com>
* | nios2: convert altera timer to driver modelThomas Chou2015-10-231-2/+1
| | | | | | | | | | | | | | Convert altera timer to driver model. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Chin Liang See <clsee@altera.com>
* | timer: start a new timer after relocationThomas Chou2015-10-231-0/+3
| | | | | | | | | | | | | | | | Start a new timer after relocation, just in case the timer has been used in per-relocation. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Simon Glass <sjg@chromium.org>
* | nios2: Switch to generic timerThomas Chou2015-10-231-1/+2
|/ | | | | | | | Zap almost all of the ad-hoc timer code from interrupts.c and use the code in lib/time.c instead. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* drivers: Introduce a simplified remoteproc frameworkNishanth Menon2015-10-223-0/+287
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many System on Chip(SoC) solutions are complex with multiple processors on the same die dedicated to either general purpose of specialized functions. Many examples do exist in today's SoCs from various vendors. Typical examples are micro controllers such as an ARM M3/M0 doing a offload of specific function such as event integration or power management or controlling camera etc. Traditionally, the responsibility of loading up such a processor with a firmware and communication has been with a High Level Operating System(HLOS) such as Linux. However, there exists classes of products where Linux would need to expect services from such a processor or the delay of Linux and operating system being able to load up such a firmware is unacceptable. To address these needs, we need some minimal capability to load such a system and ensure it is started prior to an Operating System(Linux or any other) is started up. NOTE: This is NOT meant to be a solve-all solution, instead, it tries to address certain class of SoCs and products that need such a solution. A very simple model is introduced here as part of the initial support that supports microcontrollers with internal memory (no MMU, no execution from external memory, or specific image format needs). This basic framework can then (hopefully) be extensible to other complex SoC processor support as need be. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Nishanth Menon <nm@ti.com> Acked-by: Simon Glass <sjg@chromium.org>
* Merge git://git.denx.de/u-boot-x86Tom Rini2015-10-213-186/+230
|\
| * cmd: bootvx: Add asmlinkage to the VxWorks x86 entryBin Meng2015-10-211-0/+6
| | | | | | | | | | | | | | | | VxWorks on x86 uses stack to pass parameters. Reported-by: Jian Luo <jian.luo4@boschrexroth.de> Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
| * cmd: bootvx: Pass E820 information to an x86 VxWorks kernelBin Meng2015-10-211-0/+30
| | | | | | | | | | | | | | | | | | | | E820 is critical to the kernel as it provides system memory map information. Pass it to an x86 VxWorks kernel. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Tested-by: Jian Luo <jian.luo4@boschrexroth.de>
| * cmd: bootvx: Always get VxWorks bootline from envBin Meng2015-10-211-53/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far VxWorks bootline can be contructed from various environment variables, but when these variables do not exist we get these from corresponding config macros. This is not helpful as it requires rebuilding U-Boot, and to make sure these config macros take effect we should not have these environment variables. This is a little bit complex and confusing. Now we change the logic to always contruct the bootline from environments (the only single source), by adding two new variables "bootdev" and "othbootargs", and adding some comments about network related settings mentioning they are optional. The doc about the bootline handling is also updated. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Tested-by: Hannes Schmelzer <oe5hpm@oevsv.at>
| * cmd: bootvx: Pass netmask and gatewayip to VxWorks bootlineBin Meng2015-10-211-2/+15
| | | | | | | | | | | | | | | | | | There are fields in VxWorks bootline for netmask and gatewayip. We can get these from U-Boot environment variables and pass them to VxWorks, just like ipaddr and serverip. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * cmd: bootvx: Avoid strlen() calls when constructing VxWorks bootlineBin Meng2015-10-211-10/+10
| | | | | | | | | | | | | | | | Remember the position in the VxWorks bootline buffer to avoid the call to strlen() each time. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * cmd: elf: Reorder load_elf_image_phdr() and load_elf_image_shdr()Bin Meng2015-10-211-82/+79
| | | | | | | | | | | | | | | | Move load_elf_image_phdr() and load_elf_image_shdr() to the beginning of the cmd_elf.c so that forward declaration is not needed. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * cmd: Clean up cmd_elf a little bitBin Meng2015-10-211-98/+73
| | | | | | | | | | | | | | | | | | This commit cleans up cmd_elf.c per U-Boot coding convention, and removes the unnecessary DECLARE_GLOBAL_DATA_PTR and out-of-date powerpc comments (it actually supports not only powerpc targets). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * cmd: Convert CONFIG_CMD_ELF to KconfigBin Meng2015-10-211-0/+6
| | | | | | | | | | | | Convert CONFIG_CMD_ELF to Kconfig and tidy up affected boards. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
| * malloc_simple: Add debug() informationSimon Glass2015-10-211-0/+4
| | | | | | | | | | | | | | | | | | It's useful to get a a trace of memory allocations in early init. Add a debug() call to provide that. It can be enabled by adding '#define DEBUG' to the top of the file. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* | malloc_simple: Add support for switching to DRAM heapHans de Goede2015-10-201-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | malloc_simple uses a part of the stack as heap, initially it uses SYS_MALLOC_F_LEN bytes which typically is quite small as the initial stacks sits in SRAM and we do not have that much SRAM to work with. When DRAM becomes available we may switch the stack from SRAM to DRAM to give use more room. This commit adds support for also switching to a new bigger malloc_simple heap located in the new stack. Note that this requires spl_init to be called before spl_relocate_stack_gd which in practice means that spl_init must be called from board_init_f. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Simon Glass <sjg@chromium.org>
* | malloc_simple: Add Kconfig option for using only malloc_simple in the SPLHans de Goede2015-10-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | common/dlmalloc.c is quite big, both in .text and .data usage, therefor on some boards the SPL is build to use only malloc_simple.c and not the dlmalloc.c code. This is done in various include/configs/foo.h with the following construct: #ifdef CONFIG_SPL_BUILD #define CONFIG_SYS_MALLOC_SIMPLE #endif This commit introduces a SPL_MALLOC_SIMPLE Kconfig bool which allows selecting this functionality through Kconfig instead. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
* | spl: spl_relocate_stack_gd: Do not unnecessarily clear bssHans de Goede2015-10-201-3/+0
|/ | | | | | | | | spl_relocate_stack_gd only gets called from arch/arm/lib/crt0.S which clears the bss directly after calling it, so there is no need to clear it from spl_relocate_stack_gd. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* image-fit: Fix signature checkingAndrej Rosano2015-10-191-1/+3
| | | | | | | On signature verification failures fit_image_verify() should exit with error. Signed-off-by: Andrej Rosano <andrej@inversepath.com>
* env_eeprom.c: Correct using saved environmentLudger Dreier2015-10-121-89/+77
| | | | | | | | | The changes in ed6a5d4 unintentionally broke support for reading the environment saved to eeprom back. To correct this the crc-check and decision on which environment to use is now moved to env_relocate_spec. This is done for both the "redundant env" and the "single env" case. Signed-off-by: Ludger Dreier <ludger.dreier@keymile.com>
* common/image.c: Make boot_get_ramdisk() perform a check for Android imagesTom Rini2015-10-111-0/+9
| | | | | | | | | | | | | | | In 2dd4632 the check for where a ramdisk is found on an Android image was got moved into the "normal" loop here, causing people to have to pass the kernel address in the ramdisk address location in order to have Android boot still. This changed previous behavior so perform a check early in the function to see if we have an Android image and if so use that as where to look for the ramdisk (which is what the rest of the code here expects). We allow for this to still be overridden with an explicit ramdisk address to be passed as normal. Cc: Rob Herring <robh@kernel.org> Reported-by: Paul Kocialkowski <contact@paulk.fr> Signed-off-by: Tom Rini <trini@konsulko.com>
* image: fix support for Android boot images with no ramdiskRob Herring2015-10-111-1/+3
| | | | | | | | If an Android boot image does not contain a ramdisk, make sure rd_len and rd_data are returned to indicate no ramdisk rather than just relying on returning an error. Signed-off-by: Rob Herring <robh@kernel.org>
* Add support for LZ4 decompression algorithmJulius Werner2015-10-112-0/+10
| | | | | | | | | | | | | | | This patch adds support for LZ4-compressed FIT image contents. This algorithm has a slightly worse compression ration than LZO while being nearly twice as fast to decompress. When loading images from a fast storage medium this usually results in a boot time win. Sandbox-tested only since I don't have a U-Boot development system set up right now. The code was imported unchanged from coreboot where it's proven to work, though. I'm mostly interested in getting this recognized by mkImage for use in a downstream project. Signed-off-by: Julius Werner <jwerner@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
OpenPOWER on IntegriCloud