- Dec 15, 2015
-
-
York Sun authored
Secure memory is at the end of memory, separated and reserved from OS, tracked by gd->secure_ram. Secure memory can host MMU tables, security monitor, etc. This is different from PRAM used to reserve private memory. PRAM offers memory at the top of u-boot memory, not necessarily the real end of memory for systems with very large DDR. Using the end of memory simplifies MMU setup and avoid memory fragmentation. "bdinfo" command shows gd->secure_ram value if this memory is marked as secured. Signed-off-by:
York Sun <yorksun@freescale.com>
-
- Dec 09, 2015
-
-
Bin Meng authored
With driver model timer support, there should not be an explict call to timer_init(). Remove this call for x86. Signed-off-by:
Bin Meng <bmeng.cn@gmail.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Bin Meng authored
Currently OF_BAD_ADDR is always -1ULL. When using OF_BAD_ADDR as the return value of dev_get_addr(), it creates potential size mismatch as dev_get_addr() uses FDT_ADDR_T_NONE as the return value which can be either -1U or -1ULL depending on CONFIG_PHYS_64BIT. Now we change OF_BAD_ADDR to FDT_ADDR_T_NONE to avoid such case. Signed-off-by:
Bin Meng <bmeng.cn@gmail.com> Acked-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Stefan Roese <sr@denx.de>
-
- Dec 07, 2015
-
-
Tom Rini authored
Now that we may compile (but not link) code calling fixup_cmdtable when this is not set, we need to always have the declaration available. We should also make sure that anyone calling the function includes <command.h> as that's where the function declaration is. Signed-off-by:
Tom Rini <trini@konsulko.com>
-
Michal Simek authored
Subcommands contain pointers to functions which are not updated when MANUAL_RELOC is enabled. This patch fix it. Signed-off-by:
Michal Simek <michal.simek@xilinx.com> Acked-by:
Heiko Schocher <hs@denx.de> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- Dec 05, 2015
-
-
Siva Durga Prasad Paladugu authored
Don't relocate fdt in case of CONFIG_OF EMBED as the fdt is already embedded with u-boot image. Update fdt_blob after relocation as the fdt will be copied during u-boot relocation. Signed-off-by:
Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by:
Michal Simek <michal.simek@xilinx.com> Reviewed-by:
Alexey Brodkin <abrodkin@synopsys.com> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> (QEMU x86) Tested-by: Thomas Chou <thomas@wytron.com.tw> (Nios2) Acked-by:
Thomas Chou <thomas@wytron.com.tw> Acked-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
It is risky to have two different functions with much the same code. Future authors may update one but not the other. It is hard to see which parts are the same and which are different. Unify the functions and drop the differences that are not really needed. Note that one puts() becomes printf() as Tom mentioned that this does not affect image size: https://patchwork.ozlabs.org/patch/537276/ Note: It would be better to have an empty printf() and avoid the #ifdef for CONFIG_SPL_LIBCOMMON_SUPPORT. Signed-off-by:
Simon Glass <sjg@chromium.org> Tested-by:
Michal Simek <michal.simek@xilinx.com>
-
Simon Glass authored
The 'p' suffix makes it more obvious that we are dealing with a pointer to a (pointer) value that will be returned to its caller. Signed-off-by:
Simon Glass <sjg@chromium.org> Acked-by:
Nikita Kiryanov <nikita@compulab.co.il> Tested-by:
Michal Simek <michal.simek@xilinx.com>
-
Simon Glass authored
Since commit 4188ba32 we get the following warning on rockchip boards: common/spl/spl_mmc.c:31:24: warning: ‘mmc’ may be used uninitialized in this function [-Wmaybe-uninitialized] count = mmc->block_dev.block_read(0, sector, 1, header); ^ common/spl/spl_mmc.c:251:14: note: ‘mmc’ was declared here struct mmc *mmc; Correct this by move the variable init earlier. Signed-off-by:
Simon Glass <sjg@chromium.org> Tested-by:
Michal Simek <michal.simek@xilinx.com> Acked-by:
Nikita Kiryanov <nikita@compulab.co.il>
-
Peng Fan authored
Need to free memory avoid memory leak, when error. Signed-off-by:
Peng Fan <Peng.Fan@freescale.com> Reviewed-by:
Simon Glass <sjg@chromium.org> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com>
-
Stefan Roese authored
When CONFIG_SPL_OF_TRANSLATE is enabled fdt_support.c needs to get compiled. Otherwise fdt_translate_address() is missing which is needed in dev_get_addr(). Signed-off-by:
Stefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Acked-by:
Simon Glass <sjg@chromium.org>
-
Peng Fan authored
The following code will alloc memory for new_dev and ldev: " new_dev = mdio_alloc(); ldev = malloc(sizeof(*ldev)); " Either new_dev or ldev is NULL, directly return, but this may leak memory. So before return, using free(ldev) and mdio_free(new_dev) to avoid leaking memory, also free can handle NULL pointer. Signed-off-by:
Peng Fan <Peng.Fan@freescale.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Acked-by:
Joe Hershberger <joe.hershberger@ni.com>
-
Peng Fan authored
"enable" is unsigned char type and its value will not be negative, so discard "enable < 0". Signed-off-by:
Peng Fan <Peng.Fan@freescale.com> Cc: Diego Santa Cruz <Diego.SantaCruz@spinetix.com> Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Cc: Andrew Gabbasov <andrew_gabbasov@mentor.com> Cc: Simon Glass <sjg@chromium.org> Cc: Stefano Babic <sbabic@denx.de> Cc: Tom Rini <trini@konsulko.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Peng Fan authored
The entry name of mii_dev is an array not pointer, so no need to check. Signed-off-by:
Peng Fan <Peng.Fan@freescale.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org> Acked-by:
Joe Hershberger <joe.hershberger@ni.com> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Peng Fan authored
If condition of "(load == image_start || load == image_data)" is true, should use "fdt_addr = load;", but not "fdt_blob = (char *)image_data;", or fdt_blob will be overridden by "fdt_blob = map_sysmem(fdt_addr, 0);" at the end of the switch case. Signed-off-by:
Peng Fan <Peng.Fan@freescale.com> Cc: Simon Glass <sjg@chromium.org> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Max Krummenacher <max.krummenacher@toradex.com> Cc: Marek Vasut <marex@denx.de> Cc: Suriyan Ramasami <suriyan.r@gmail.com> Cc: Paul Kocialkowski <contact@paulk.fr> Cc: Tom Rini <trini@konsulko.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Peng Fan authored
Condition "(value == NULL && ++value == NULL)" actully will always return false. Instead, use condition "(value == NULL || *(value + 1) == 0)" to detect such expression "c=". To "c=", *(value + 1) is 0, so directly return -1, but not continue. Signed-off-by:
Peng Fan <Peng.Fan@freescale.com> Cc: Rabin Vincent <rabin@rab.in> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- Dec 03, 2015
-
-
Francois Retief authored
Fixed the prom_relocate() function in start.S file by reserving memory in the board_init_f sequence and saving the offset to the __prom_start_reloc variable. This value is used as the destination when relocating the PROM. Add the prom_init() function to the end of the board_init_r sequence. Signed-off-by:
Francois Retief <fgretief@spaceteq.co.za>
-
Francois Retief authored
Introduce the CONFIG_SYS_TIMER_* macros in include/asm/config.h to make use of the generic timer infrastructure in lib/time.c. Created a timer_init() function to initialize the timer hardware and update the #ifdef in board_init_f to allow this function to be called during the start-up sequence. Signed-off-by:
Francois Retief <fgretief@spaceteq.co.za>
-
Francois Retief authored
Initial ground work in preperation for generic board initialization code for the SPARC architecture. Signed-off-by:
Francois Retief <fgretief@spaceteq.co.za>
-
- Dec 02, 2015
-
-
Anatolij Gustschin authored
This reverts commit 05bfe132. As discussed on the list, we already have the needed functionality by defining CONFIG_SYS_CONSOLE_IS_IN_ENV, CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE and adding custom overwrite_console() in the board code. Signed-off-by:
Anatolij Gustschin <agust@denx.de>
-
- Dec 01, 2015
-
-
Simon Glass authored
Adjust this command to use the correct PCI functions, instead of the compatibility layer. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Tested-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
We want to share this code with the driver model version, so put it in a separate function. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
In the 'pci' command, add a separate variable to hold the PCI device. When this code is converted to driver model, this variable will be used to hold a struct udevice instead. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
Currently we use switch() and access PCI configuration via several functions, one for each data size. Adjust the code to use generic functions, where the data size is a parameter. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Tested-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
The function comments use an old style and some are incorrect. Update them. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
Before converting this to driver model, reorder the code to avoid forward function declarations. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
This function uses macros to output data. It seems better to use a table of registers rather than macro-based code generation. It also reduces the code/data size by 2KB on ARM. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Tested-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
At present in do_pci(), bdf can either mean a bus number or a PCI bus number. Use separate variables instead to reduce confusion. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
Adjust the commands to return from the same place. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
This is not supported with driver model, so print a message instead of generating a build error. Rescanning PCI is not yet implemented. This function will be implemented later once some additional PCI driver model improvements are merged. It was confirmed on the mailing list that no one on the tegra side will miss this feature, so it is disabled for tegra. Signed-off-by:
Simon Glass <sjg@chromium.org> Tested-by:
Stephen Warren <swarren@nvidia.com>
-
Simon Glass authored
At present bootstage will try to read the timer very early after relocation. When driver model is used to provide the timer, we cannot read it until driver model is ready. Correct this by adding a separate stage for the post-relocation bootstage init. This fixes booting on chromebook_link. Signed-off-by:
Simon Glass <sjg@chromium.org> Acked-by:
Thomas Chou <thomas@wytron.com.tw> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Mugunthan V N <mugunthanvnm@ti.com>
-
- Nov 23, 2015
-
-
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
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
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>
-
- Nov 22, 2015
-
-
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>
-