- Nov 23, 2015
-
-
Vignesh R authored
serial_init() reads global_data, since global_data is not yet initialized, this can cause unwanted behaviour leading to QSPI XIP boot hang. Also, since serial_init() is anyways called later from boar_init_f(), it does not make sense to do the same in s_init(). Tested on AM437x IDK EVM with QSPI XIP boot. Signed-off-by:
Vignesh R <vigneshr@ti.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Thomas Fitzsimmons authored
If the ext3 journal gets out of sync with what is written on disk, for example because of an unexpected power cut, ext4fs_read_file can return an all-zero directory entry. In that case, ext4fs_iterate_dir would infinite loop. This patch detects when a directory entry's direntlen member is 0 and returns a failure status, which breaks out of the infinite loop. As a result, U-Boot will not find files that may subsequently be recovered when the journal is replayed. This is better behaviour than hanging in an infinite loop, but as a further improvement maybe U-Boot could interpret the ext3 journal and actually find the unsynced entries. Signed-off-by:
Thomas Fitzsimmons <fitzsim@cisco.com> Reviewed-by:
Stefan Roese <sr@denx.de>
-
Marcel Ziswiler authored
The address range check may overflow if the memory region is located at the top of the 32-bit address space. This can e.g. be seen on TK1 if using the E1000 gigabit Ethernet driver where start and size are both 0x80000000 leading to the following messages: Apalis TK1 # tftpboot $loadaddr test_file Using e1000#0 device TFTP from server 192.168.10.1; our IP address is 192.168.10.2 Filename 'test_file'. Load address: 0x80408000 Loading: pci_hose_phys_to_bus: invalid physical address This patch fixes this by changing the order of the addition vs. subtraction in the range check just like already done in __pci_hose_bus_to_phys(). Reported-by:
Ivan Mercier <ivan.mercier@nexvision.fr> Signed-off-by:
Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Stephen Warren <swarren@nvidia.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Patrick Delaunay authored
The optional parameter bootable is added in gpt command to set the partition attribute flag "Legacy BIOS bootable" This flag is used in extlinux and so in with distro to select the boot partition where is located the configuration file (please check out doc/README.distro for details). With this parameter, U-Boot can be used to create the boot partition needed for device using distro. example of use: setenv partitions "name=u-boot,size=60MiB;name=boot,size=60Mib,bootable;\ name=rootfs,size=0" > gpt write mmc 0 $partitions > part list mmc 0 Partition Map for MMC device 0 -- Partition Type: EFI Part Start LBA End LBA Name Attributes Type GUID Partition GUID 1 0x00000022 0x0001e021 "u-boot" attrs: 0x0000000000000000 type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 guid: cceb0b18-39cb-d547-9db7-03b405fa77d4 2 0x0001e022 0x0003c021 "boot" attrs: 0x0000000000000004 type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 guid: d4981a2b-0478-544e-9607-7fd3c651068d 3 0x0003c022 0x003a9fde "rootfs" attrs: 0x0000000000000000 type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 guid: 6d6c9a36-e919-264d-a9ee-bd00379686c7 > part list mmc 0 -bootable devplist > printenv devplist devplist=2 Then the distro scripts will search extlinux in partition 2 and not in the first partition. Signed-off-by:
Patrick Delaunay <patrick.delaunay73@gmail.com>
-
Lukasz Majewski authored
This commit adds support for "gpt verify" command, which verifies correctness of on-board stored GPT partition table. As the optional parameter one can provide '$partitons' environment variable to check if partition data (size, offset, name) is correct. This command should be regarded as complementary one to "gpt restore". Signed-off-by:
Lukasz Majewski <l.majewski@majess.pl> Reviewed-by:
Tom Rini <trini@konsulko.com> Reviewed-by:
Przemyslaw Marczak <p.marczak@samsung.com>
-
Lukasz Majewski authored
This commit provides definition and declaration of GPT verification functions - namely gpt_verify_headers() and gpt_verify_partitions(). The former is used to only check CRC32 of GPT's header and PTEs. The latter examines each partition entry and compare attributes such as: name, start offset and size with ones provided at '$partitions' env variable. Signed-off-by:
Lukasz Majewski <l.majewski@majess.pl> Reviewed-by:
Tom Rini <trini@konsulko.com> Reviewed-by:
Przemyslaw Marczak <p.marczak@samsung.com>
-
Lukasz Majewski authored
Signed-off-by:
Lukasz Majewski <l.majewski@majess.pl> Reviewed-by:
Tom Rini <trini@konsulko.com>
-
Lukasz Majewski authored
./doc/README.gpt entry has been updated to explain usage of "gpt verify" command. Signed-off-by:
Lukasz Majewski <l.majewski@majess.pl> Reviewed-by:
Tom Rini <trini@konsulko.com>
-
Lukasz Majewski authored
Exactly the same check is performed in set_gpt_info() function executed just after this check. Signed-off-by:
Lukasz Majewski <l.majewski@majess.pl> Reviewed-by:
Tom Rini <trini@konsulko.com>
-
Stefan Roese authored
With this patch now, the tiny printf() function also supports numbers bigger than 0xffff. Additionally the code is simplified a bit and some static variables are moved to function parameters. Also the upper case hex variable output support is removed, as its not really needed in this simple printf version. And removing it reduces the complexity and the code size again a bit. Here the new numbers, again on the db-mv784mp-gp (Armada XP): Without this patch: 56542 18536 1956 77034 12cea ./spl/u-boot-spl With this patch: 56446 18536 1936 76918 12c76 ./spl/u-boot-spl Signed-off-by:
Stefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Tom Rini <trini@konsulko.com> Cc: Albert Aribaud <albert.u.boot@aribaud.net>
-
Stefan Roese authored
This patch adds a small printf() version that supports all basic formats. Its intented to be used in U-Boot SPL versions on platforms with very limited internal RAM sizes. To enable it, just define CONFIG_USE_TINY_PRINTF in your defconfig. This will result in the SPL using this tiny function and the main U-Boot still using the full-blown printf() function. This code was copied from: http://www.sparetimelabs.com/printfrevisited With mostly only coding style related changes so that its checkpatch clean. The size reduction is about 2.5KiB. Here a comparison for the db-mv784mp-gp (Marvell AXP) SPL: Without this patch: 58963 18536 1928 79427 13643 ./spl/u-boot-spl With this patch: 56542 18536 1956 77034 12cea ./spl/u-boot-spl Note: To make it possible to compile tiny-printf.c instead of vsprintf.c when CONFIG_USE_TINY_PRINTF is defined, the functions printf() and vprintf() are moved from common/console.c into vsprintf.c in this patch. Signed-off-by:
Stefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Tom Rini <trini@konsulko.com> Cc: Albert Aribaud <albert.u.boot@aribaud.net>
-
Stefan Roese authored
Change some comments to match the U-Boot coding style rules. Signed-off-by:
Stefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Acked-by:
Simon Glass <sjg@chromium.org>
-
Stefan Roese authored
As done in commit da229e4e [sandbox: Drop special-case sandbox console code], this patch drops the sandbox special-case code in vprintf() that was missed by Simon at that time. Signed-off-by:
Stefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Acked-by:
Simon Glass <sjg@chromium.org>
-
Heiko Schocher authored
compiling U-Boot for avr32 boards shows since commit 3d1957f0 "dm: i2c: Add support for multiplexed I2C buses" this warning: Building current source for 4 boards (4 threads, 8 jobs per thread) avr32: + atstk1002 +(atstk1002) drivers/i2c/built-in.o: warning: input is not relaxable avr32: + grasshopper +(grasshopper) drivers/i2c/built-in.o: warning: input is not relaxable avr32: + atngw100 +(atngw100) drivers/i2c/built-in.o: warning: input is not relaxable avr32: + atngw100mkii +(atngw100mkii) drivers/i2c/built-in.o: warning: input is not relaxable 0 4 0 /4 0:00:16 : atngw100mkii Fix it. Signed-off-by:
Heiko Schocher <hs@denx.de> Reviewed-by:
Roger Meier <r.meier@siemens.com> Reviewed-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Andreas Bießmann <andreas.devel@googlemail.com>
-
- Nov 22, 2015
-
-
Tom Rini authored
After introduction of CONFIG_SYS_NS16550 these defconfig files were added and need to be updated. Signed-off-by:
Tom Rini <trini@konsulko.com>
-
http://git.denx.de/u-boot-sunxiTom Rini authored
-
Jelle de Jong authored
The lamobo-r1 board, sometimes called the BPI-R1 but not labelled as such on the PCB, is meant as a A20 based router board. As such the board comes with a built-in switch chip giving it 5 gigabit ethernet ports, and it has a large empty area on the pcb with mounting holes which will fit a 2.5 inch harddisk. To complete its networking features it has a Realtek RTL8192CU for WiFi 802.11 b/g/n. The dts file is identical to the one submitted upstream. Signed-off-by:
Jelle de Jong <jelledejong@powercraft.nl> Reviewed-by:
Hans de Goede <hdegoede@redhat.com> Signed-off-by:
Hans de Goede <hdegoede@redhat.com>
-
Hans de Goede authored
Add defconfig files for the Orangepi Plus and Orangepi PC. Signed-off-by:
Hans de Goede <hdegoede@redhat.com>
-
Hans de Goede authored
These files are based on the current latest upstream kernel work. The bus_gates bindings may still change, but for u-boot that does not matter as we do not (yet) use any clock info from devicetree for sunxi u-boot. Signed-off-by:
Hans de Goede <hdegoede@redhat.com>
-
Siarhei Siamashka authored
The 3.4 kernel from the Allwinner SDK is clocking AHB1 at 200MHz on Allwinner H3 and using PLL6 as the clock source (PLL6/3). This can be verified by reading the value of the AHB1_APB1_CFG_REG register via /dev/mem. It always reads as 0x3180 regardless of the current cpufreq operating point. So this configuration should be safe for use in U-Boot too. PLL6 also needs to be configured before it is used as the clock source, according to the "CCU / Programming Guidelines" section of the Allwinner manual. The current low AHB1 clock speed is limiting the USB transfer speed when booting via FEL. This patch can increase the FEL USB transfer speed from ~510 KB/s to ~950 KB/s. Signed-off-by:
Siarhei Siamashka <siarhei.siamashka@gmail.com> Reviewed-by:
Hans de Goede <hdegoede@redhat.com> Signed-off-by:
Hans de Goede <hdegoede@redhat.com>
-
Jens Kuske authored
Based on existing A23/A33 code and the original H3 boot0. Signed-off-by:
Jens Kuske <jenskuske@gmail.com> Reviewed-by:
Hans de Goede <hdegoede@redhat.com> Signed-off-by:
Hans de Goede <hdegoede@redhat.com>
-
Jens Kuske authored
Add initial sun8i H3 support, only uart + mmc are supported for now. Signed-off-by:
Jens Kuske <jenskuske@gmail.com> Reviewed-by:
Hans de Goede <hdegoede@redhat.com> Signed-off-by:
Hans de Goede <hdegoede@redhat.com>
-
Siarhei Siamashka authored
This is necessary to distinguish between the "dfu-util --detach" and the "dfu-util --reset" requests. The default weak implementation of dfu_usb_get_reset() unconditionally reboots the device, but we want to be able to continue the boot.scr execution after writing the kernel, fdt and ramdisk to RAM via DFU. Signed-off-by:
Siarhei Siamashka <siarhei.siamashka@gmail.com> Reviewed-by:
Hans de Goede <hdegoede@redhat.com> Signed-off-by:
Hans de Goede <hdegoede@redhat.com>
-
Siarhei Siamashka authored
The DFU protocol implementation in U-Boot is much faster than the FEL protocol implementation in the boot ROM on Allwinner devices. Using DFU instead of FEL improves the USB transfer speed from 500-900 KB/s to 3.2-3.7 MB/s. This is particularly useful for reducing the time needed for booting systems with large initrd images. FEL is still useful for loading the U-Boot bootloader and a boot script, which may then activate DFU in the following way: setenv dfu_alt_info ${dfu_alt_info_ram} dfu 0 ram 0 bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r} The rest of the files can be transferred to the device using the "dfu-util" tool. Signed-off-by:
Siarhei Siamashka <siarhei.siamashka@gmail.com> Reviewed-by:
Hans de Goede <hdegoede@redhat.com> Signed-off-by:
Hans de Goede <hdegoede@redhat.com>
-
Ryan Harkin authored
Add support for storing the environment in CFI NOR flash on Juno and FVP models. I also removed some config values that are not used by CFI flash parts. Juno has 1 flash part with 259 sectors. The first 255 sectors are 0x40000 (256kb) and are followed by 4 sectors of 0x10000 (64KB). FVP models simulate a 64MB NOR flash part at base address 0x0FFC0000. This part has 256 x 256kb sectors. We use the last sector to store the environment. To save the NOR flash to a file, the following parameters should be passed to the model: -C bp.flashloader1.fname=${FILENAME} -C bp.flashloader1.fnameWrite=${FILENAME} Foundation models don't simulate the NOR flash, but having NOR support in the u-boot binary does not harm: attempting to write to the NOR will fail gracefully. Signed-off-by:
Ryan Harkin <ryan.harkin@linaro.org> Acked-by:
Linus Walleij <linus.walleij@linaro.org>
-
Ryan Harkin authored
This patch allows vexpress64 targets to be compiled when CONFIG_SYS_FLASH_CFI is enabled. I considered using #warning instead of #error, but this just clutters up the build output and hides real warnings. Without this patch, you see errors during compilation like this: include/configs/vexpress_aemv8a.h:42:2: error: #error "Unknown board variant" #error "Unknown board variant" include/configs/vexpress_aemv8a.h:115:2: error: #error "Unknown board variant" #error "Unknown board variant" include/configs/vexpress_aemv8a.h:280:2: error: #error "Unknown board variant" #error "Unknown board variant" make[1]: *** [tools/envcrc.o] Error 1 make: *** [tools] Error 2 In file included from include/config.h:5:0, from tools/envcrc.c:19: Signed-off-by:
Ryan Harkin <ryan.harkin@linaro.org> Acked-by:
Linus Walleij <linus.walleij@linaro.org>
-
Ryan Harkin authored
This patch makes the 2nd DRAM bank available on Juno only and not on other vexpress64 targets, eg. the FVP models. The commit below added a 2nd bank of NOR flash for Juno, but also for all vexpress64 targets: commit 2d0cee1c Author: Liviu Dudau <Liviu.Dudau@foss.arm.com> Date: Mon Oct 19 11:08:31 2015 +0100 vexpress64: Juno: Declare all 8GB of RAM and make them visible to the kernel. Juno comes with 8GB RAM, but U-Boot only passes 2GB to the kernel. Declare a secondary memory bank and set the sizes correctly. Signed-off-by:
Liviu Dudau <Liviu.Dudau@foss.arm.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Reviewed-by:
Ryan Harkin <ryan.harkin@linaro.org> Tested-by:
Ryan Harkin <ryan.harkin@linaro.org> Unfortunately, I only fully tested on Juno R0, R1 and the FVP Foundation model. Whilst FVP Base AEMV8 models run U-Boot OK, they fail to boot the kernel. Signed-off-by:
Ryan Harkin <ryan.harkin@linaro.org> Acked-by:
Liviu Dudau <liviu.dudau@foss.arm.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org>
-
Ryan Harkin authored
Only compile in PCIe support if the board really uses it. Provide a __weak stub for the init function if e.g. FVP is being built. Signed-off-by:
Ryan Harkin <ryan.harkin@linaro.org> Acked-by:
Linus Walleij <linus.walleij@linaro.org>
-
Andre Przywara authored
On a Juno r1 the PCI controller init routine outputs the rather boring ATR entry information. Do this only with DEBUG defined to avoid cluttering the user's terminal. Signed-off-by:
Andre Przywara <andre.przywara@arm.com> Acked-by:
Ryan Harkin <ryan.harkin@linaro.org>
-
Marek Vasut authored
Cosmetic fixes to the file, make it checkpatch clean. Signed-off-by:
Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Heiko Schocher <hs@denx.de> Reviewed-by:
Heiko Schocher <hs@denx.de>
-
Marek Vasut authored
Add additional parameter into the eeprom command to select the I2C bus on which the eeprom resides. Signed-off-by:
Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Heiko Schocher <hs@denx.de> Reviewed-by:
Heiko Schocher <hs@denx.de>
-
Marek Vasut authored
Add bus argument to eeprom_init(), so that it can select the I2C bus number on which the eeprom resides. Any negative value of the $bus argument will preserve the old behavior. This is in place so that old code does not randomly break. Signed-off-by:
Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Heiko Schocher <hs@denx.de> Reviewed-by:
Heiko Schocher <hs@denx.de> [trini: Wrap i2c_set_bus_num() call with CONFIG_SYS_I2C test] Signed-off-by:
Tom Rini <trini@konsulko.com>
-
Marek Vasut authored
Unify the code for doing read/write into single function, since the code for both the read and write is almost identical. This again trims down the code duplication. Signed-off-by:
Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Heiko Schocher <hs@denx.de> Reviewed-by:
Heiko Schocher <hs@denx.de>
-
Marek Vasut authored
Pull out the code which computes the length of the transfer into separate code and clean it up a little. This again trims down the code duplication. Signed-off-by:
Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Heiko Schocher <hs@denx.de> Reviewed-by:
Heiko Schocher <hs@denx.de>
-
Marek Vasut authored
Implement default value of 8 for this macro and pull out all of this macro out of the code. The default value of 8 actually does implement exactly the same behavior as the previous code which was in the #else clause of the ifdef. Signed-off-by:
Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Heiko Schocher <hs@denx.de> Reviewed-by:
Heiko Schocher <hs@denx.de>
-
Marek Vasut authored
Just suck the ugly ifdef around eeprom_init() call into eeprom_init() function itself. This puts all of the ifdef mess into one place. Signed-off-by:
Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Heiko Schocher <hs@denx.de> Reviewed-by:
Heiko Schocher <hs@denx.de>
-
Marek Vasut authored
Pull this macro to the beginning of the cmd_eeprom.c and remove another nasty ifdef from the code. Note that this is legal, since udelay(0) changes the behavior only such that it pings the WDT if WDT is enabled and otherwise does not wait. Signed-off-by:
Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Heiko Schocher <hs@denx.de> Reviewed-by:
Heiko Schocher <hs@denx.de>
-
Marek Vasut authored
Make this function weak and implement it's weak implementation so that the boards can just reimplement it. This zaps the horrid CONFIG_SYS_EEPROM_WREN macro. Signed-off-by:
Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Heiko Schocher <hs@denx.de> Reviewed-by:
Heiko Schocher <hs@denx.de>
-
Marek Vasut authored
Pull out the code computing the EEPROM address into separate function so that it's not duplicated. Signed-off-by:
Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Heiko Schocher <hs@denx.de> Reviewed-by:
Heiko Schocher <hs@denx.de>
-
Marek Vasut authored
Pull out the code which does the I2C or SPI read/write, so that the beefy ifdef around it is contained in a single function. Signed-off-by:
Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Heiko Schocher <hs@denx.de> Reviewed-by:
Heiko Schocher <hs@denx.de>
-