summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* spl: Fix SPL EXT supportGuillaume GARDET2014-11-261-5/+5
| | | | | | | | | | | | Commit 9f12cd0e062614e19734b2ab37842d387457c5e5 has broken SPL EXT support. This patch update error code check to get SPL EXT support working again. Tested on a Pandaboard (rev. A3). Reviewed-by: Suriyan Ramasami <suriyan.r@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr> Cc: Tom Rini <trini@ti.com>
* Merge branch 'master' of http://git.denx.de/u-boot-sunxiTom Rini2014-11-262-42/+67
|\
| * common/lcd: Make lcd_dt_simplefb_configure_node use fdt_setup_simplefb_nodeHans de Goede2014-11-251-42/+5
| | | | | | | | | | | | | | | | | | Change lcd_dt_simplefb_configure_node into a wrapper around the new generic fdt_setup_simplefb_node helper function. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Tested-by: Stephen Warren <swarren@wwwdotorg.org> Acked-by: Simon Glass <sjg@chromium.org>
| * fdt_support: Add a fdt_setup_simplefb_node helper functionHans de Goede2014-11-251-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a generic helper to fill and enable simplefb nodes. The first user of this will be the sunxi display code. lcd_dt_simplefb_configure_node is also a good candidate to be converted to use this, but that requires someone to run some tests first, as lcd_dt_simplefb_configure_node does not honor #address-cells and #size-cells, but simply assumes 1 and 1 for both. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Tested-by: Stephen Warren <swarren@wwwdotorg.org> Acked-by: Simon Glass <sjg@chromium.org>
* | Merge git://git.denx.de/u-boot-fdtTom Rini2014-11-263-50/+64
|\ \
| * | fdt: Try to use fdt_address_cells()/fdt_size_cells()Simon Glass2014-11-211-33/+8
| | | | | | | | | | | | | | | | | | | | | | | | Use these new functions where possible. They default to a value of 2 so we cannot use them in some places where we need a default value of 1. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@ti.com>
| * | fdt: Change fdt_pack_reg() to static and fix typesSimon Glass2014-11-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This function is only called within this file so make it static. Also fix its argument types to be consistent with its caller. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Reviewed-by: Tom Rini <trini@ti.com>
| * | fdt: Add ft_system_setup() function for system device tree additionsSimon Glass2014-11-212-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add an additional function for adding information to the device tree before booting. This permits additions which are not board-specific. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Reviewed-by: Tom Rini <trini@ti.com>
| * | fdt: Tidy up error handling in image_setup_libfdt()Simon Glass2014-11-211-10/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | The message about needing to reset should be printed no matter what error is printed. Also, an error should always be printed. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Reviewed-by: Tom Rini <trini@ti.com>
| * | fdt: Export the fdt_find_or_add_subnode() functionSimon Glass2014-11-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This function is useful for ensuring that a node exists. Export it so it can be used more widely. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Reviewed-by: Tom Rini <trini@ti.com>
| * | fdt: Report failure of ft_board_setup()Simon Glass2014-11-211-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | Since this function can fail, print a message when it does. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Reviewed-by: Tom Rini <trini@ti.com>
* | | Revert "common/board_f: add setup of initial stack frame for MIPS"Tom Rini2014-11-241-7/+1
| |/ |/| | | | | | | | | | | | | | | Daniel discovered a better solution to the problem this was solving, so don't do what this patch was doing anymore. This reverts commit 666ba8444e81c3785a427ae6922e2feededab9a3. Signed-off-by: Tom Rini <trini@ti.com>
* | Revert "hush: fix segfault on syntax error"Rabin Vincent2014-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | 128059b92 ("hush: fix segfault on syntax error") attempted to fix a segfault on syntax errors, but it broke Ctrl-C handling, and the assumption that it made, that rcode could not be -1, is incorrect. Revert this change. Reported-by: Stephen Warren <swarren@wwwdotorg.org> Reported-by: Przemyslaw Marczak <p.marczak@samsung.com> Signed-off-by: Rabin Vincent <rabin@rab.in>
* | Merge branch 'master' of git://www.denx.de/git/u-boot-imxTom Rini2014-11-241-1/+23
|\ \
| * | cmd_sata: implement sata stop commandNikita Kiryanov2014-11-241-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement sata stop command. This introduces the __sata_stop() weak function, which mirrors the weak __sata_initialize() function, giving users the option of undoing the custom steps performed in overrides of sata_initialize(). Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Cc: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@ti.com>
* | | Merge git://git.denx.de/u-boot-dmTom Rini2014-11-246-26/+86
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/serial/serial-uclass.c Signed-off-by: Tom Rini <trini@ti.com>
| * | | dm: i2c: Move error reporting into a common functionSimon Glass2014-11-211-10/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Factor out the common code to make it easier to adjust it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@ti.com> Acked-by: Heiko Schocher <hs@denx.de>
| * | | dm: spl: Allow driver model to be usedSimon Glass2014-11-211-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When enabled, set up driver model for SPL. This allows SPL to use the same drivers as the main U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Tom Rini <trini@ti.com>
| * | | dm: spl: Make simple malloc() available when enabledSimon Glass2014-11-211-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Set up the simple malloc() implementation when requested, in preference to the full malloc(). Signed-off-by: Simon Glass <sjg@chromium.org>
| * | | dm: Split the simple malloc() implementation into its own fileSimon Glass2014-11-214-15/+49
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The simple malloc() implementation is used when memory is tight. It provides a simple buffer with an incrementing pointer. At present the implementation is inside dlmalloc. Move it into its own file so that it is easier to find. Rather than using relocation as a signal that the full malloc() is available, add a special GD_FLG_FULL_MALLOC_INIT flag. This signals that the simple malloc() should no longer be used. In some cases, such as SPL, even the code space used by the full malloc() is wasteful. Add a CONFIG_SYS_MALLOC_SIMPLE option to provide only the simple malloc. In this case the full malloc is not available at all. It saves about 1KB of code space and about 0.5KB of data on Thumb 2. Acked-by: Tom Rini <trini@ti.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* | | Merge git://git.denx.de/u-boot-x86Tom Rini2014-11-241-12/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: arch/x86/cpu/Makefile Signed-off-by: Tom Rini <trini@ti.com>
| * | | x86: Remove unnecessary find_fdt(), prepare_fdt() functionsSimon Glass2014-11-211-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These are no-longer needed so drop them. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | | Move early malloc() to before arch_cpu_init()Simon Glass2014-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some CPUs, having malloc() available very early is useful. There is no reason to delay this since early malloc is allocated before board_init_f() is called. Move early malloc() init nearer to the start of the init sequence. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | | x86: Use the standard arch_cpu_init() functionSimon Glass2014-11-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of an x86-specific cpu_init_f() function, use the normal U-Boot one for this purpose. Also remove a useless/misleading comment. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | | x86: Use the standard dram_init() functionSimon Glass2014-11-211-5/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | Instead of having an x86-specific DRAM init function, adjust things so we can use the normal one. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* | | fs: API changes enabling extra parameter to return size of type loff_tSuriyan Ramasami2014-11-231-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sandbox/ext4/fat/generic fs commands do not gracefully deal with files greater than 2GB. Negative values are returned in such cases. To handle this, the fs functions have been modified to take an additional parameter of type "* loff_t" which is then populated. The return value of the fs functions are used only for error conditions. Signed-off-by: Suriyan Ramasami <suriyan.r@gmail.com> Acked-by: Simon Glass <sjg@chromium.org> [trini: Update board/gdsys/p1022/controlcenterd-id.c, drivers/fpga/zynqpl.c for changes] Signed-off-by: Tom Rini <trini@ti.com>
* | | sandbox: Prepare API change for files greater than 2GBSuriyan Ramasami2014-11-231-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Change the internal sandbox functions to use loff_t for file offsets. Signed-off-by: Suriyan Ramasami <suriyan.r@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* | | ext4: Prepare API change for files greater than 2GBSuriyan Ramasami2014-11-232-62/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | Change the internal EXT4 functions to use loff_t for offsets. Signed-off-by: Suriyan Ramasami <suriyan.r@gmail.com> Acked-by: Simon Glass <sjg@chromium.org> [trini: Update common/spl/spl_ext.c] Signed-off-by: Tom Rini <trini@ti.com>
* | | fat: Prepare API change for files greater than 2GBSuriyan Ramasami2014-11-232-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Change the internal FAT functions to use loff_t for offsets. Signed-off-by: Suriyan Ramasami <suriyan.r@gmail.com> Acked-by: Simon Glass <sjg@chromium.org> [trini: Fix fs/fat/fat.c for min3 updates] Signed-off-by: Tom Rini <trini@ti.com>
* | | sandbox: Use md5sum and fatwrite to enable testing of fs commandsSuriyan Ramasami2014-11-231-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable md5sum to obtain the MD5 of the read and written files to check their contents for validity. Use map_sysmem() to map buffer in a sandbox environment. Signed-off-by: Suriyan Ramasami <suriyan.r@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* | | common/board_f: fix gcc warning on MIPS64Daniel Schwierzeck2014-11-231-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes following warning when compiled with MIPS64 common/board_f.c: In function 'display_text_info': common/board_f.c:150:2: warning: format '%X' expects argument i of type 'unsigned int', but argument 2 has type 'long unsigned int' [-Wformat=] debug("U-Boot code: %08X -> %08lX BSS: -> %08lX\n", Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* | | common/board_f: add setup of initial stack frame for MIPSDaniel Schwierzeck2014-11-231-1/+7
| | | | | | | | | | | | | | | | | | | | | The MIPS specific setup of the initial stack frame was not ported to generic board_f. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
* | | commands: add more command entries in KconfigMasahiro Yamada2014-11-231-9/+274
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds some of command entries (CONFIG_CMD_*) to cover include/config_cmd_default.h and a little extra. Because U-Boot supports lots of commands, they should be categorized according to their usage. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | | hush: add CONFIG_HUSH_PARSER to KconfigMasahiro Yamada2014-11-231-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The README file states that the macros beginning with "CONFIG_SYS_" depend on the hardware etc. and should not be meddled with if you do not what you're doing. We have already screwed up with this policy; we have given the prefix "CONFIG_SYS_" to many user-selectable configurations. Here, "CONFIG_SYS_HUSH_PARSER" is one of them. Users can enable it if they want to use a more powerful command line parser, or disable it if they only need a simple one. This commit attempts to rename CONFIG_SYS_HUSH_PARSER to CONFIG_HUSH_PARSER and move it to Kconfig. Every board maintainer is expected to enable CONFIG_HUSH_PARSER (= add "CONFIG_HUSH_PARSER=y" to his defconfig file) and remove "#define CONFIG_SYS_HUSH_PARSER" from his header file. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | | pci: Honour pci_skip_dev()Thierry Reding2014-11-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When enumerating devices, honour the pci_skip_dev() function. This can be used by PCI controller drivers to restrict which devices will be probed. This is required by the NVIDIA Tegra PCIe controller driver, which will fail with a data abort exception if an access is attempted to a device number larger than 0 outside of bus 0. pci_skip_dev() is therefore implemented to prevent any such accesses. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* | | pci: Abort early if bus does not existThierry Reding2014-11-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When listing the devices on a PCI bus, the current code will blindly try to access all devices. Internally this causes pci_bus_to_hose() to be repeatedly called and output an error message every time. Prevent this by calling pci_bus_to_hose() once and abort early if no bus was found. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* | | fs: make it possible to read the filesystem UUIDChristian Gmeiner2014-11-232-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some filesystems have a UUID stored in its superblock. To allow using root=UUID=... for the kernel command line we need a way to read-out the filesystem UUID. changes rfc -> v1: - make the environment variable an option parameter. If not given, the UUID is printed out. If given, it is stored in the env variable. - corrected typos - return error codes changes v1 -> v2: - fix return code of do_fs_uuid(..) - document do_fs_uuid(..) - implement fs_uuid_unsuported(..) be more consistent with the way other optional functionality works changes v2 -> v3: - change ext4fs_uuid(..) to make use of #if .. #else .. #endif construct to get rid of unreachable code Hit any key to stop autoboot: 0 => fsuuid fsuuid - Look up a filesystem UUID Usage: fsuuid <interface> <dev>:<part> - print filesystem UUID fsuuid <interface> <dev>:<part> <varname> - set environment variable to filesystem UUID => fsuuid mmc 0:1 d9f9fc05-45ae-4a36-a616-fccce0e4f887 => fsuuid mmc 0:2 eb3db83c-7b28-499f-95ce-9e0bb21cda81 => fsuuid mmc 0:1 uuid1 => fsuuid mmc 0:2 uuid2 => printenv uuid1 uuid1=d9f9fc05-45ae-4a36-a616-fccce0e4f887 => printenv uuid2 uuid2=eb3db83c-7b28-499f-95ce-9e0bb21cda81 => Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Acked-by: Stephen Warren <swarren@nvidia.com>
* | | spl: Change debug to printf for "Unsupported boot-device"Stefan Roese2014-11-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We had the problem on an AM33xx platform, that SPL detected an unsupported boot-device. But since this message is a debug message it took a bit of time to really know, where the hangup in SPL resulted from. So let's change this debug message to a printf and also print the detected boot-device that is not supported. This makes debugging of such cases much easier. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Tom Rini <trini@ti.com> Acked-by: Heiko Schocher <hs@denx.de>
* | | linux/kernel.h: sync min, max, min3, max3 macros with LinuxMasahiro Yamada2014-11-236-20/+24
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | U-Boot has never cared about the type when we get max/min of two values, but Linux Kernel does. This commit gets min, max, min3, max3 macros synced with the kernel introducing type checks. Many of references of those macros must be fixed to suppress warnings. We have two options: - Use min, max, min3, max3 only when the arguments have the same type (or add casts to the arguments) - Use min_t/max_t instead with the appropriate type for the first argument Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Pavel Machek <pavel@denx.de> Acked-by: Lukasz Majewski <l.majewski@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com> [trini: Fixup arch/blackfin/lib/string.c] Signed-off-by: Tom Rini <trini@ti.com>
* | common: Fix cmd_fpgad addressingDirk Eibach2014-11-191-8/+24
|/ | | | | | | Addressing was completely broken for cmd_fpgad. Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
* spl, nand: add option to boot raw u-boot.bin image onlyHeiko Schocher2014-11-172-5/+23
| | | | | | | | | | | enable to boot only a raw u-boot.bin image from nand with the CONFIG_SPL_NAND_RAW_ONLY define. This option saves space on boards where spl space is low. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com> Reviewed-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
* Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2014-11-131-0/+3
|\
| * malloc: Output region when debuggingThierry Reding2014-11-121-0/+3
| | | | | | | | | | | | | | When DEBUG is set, output memory region used for malloc(). Signed-off-by: Thierry Reding <treding@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
* | powerpc: remove orphaned boards mcc200 and prs200Nikita Kiryanov2014-11-121-23/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | mcc200 and prs200 are old and have no maintainer. Remove the boards. This also removes the mcc200 specific 1bpp BMP support from common/lcd.c Cc: Wolfgang Denk <wd@denx.de> Cc: Anatolij Gustschin <agust@denx.de> Cc: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: York Sun <yorksun@freescale.com> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
* | Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini2014-11-111-2/+5
|\ \ | |/ |/|
| * usb_storage: blacklist Enclosure Service DevicesSoeren Moch2014-11-081-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Skip enclosure service devices when probing for usb storage devices. This avoids long timeouts when probing for external usb harddisks which provide "Enclosure Services". Signed-off-by: Soeren Moch <smoch@web.de> -- This is a new version of the patch "usb_storage: skip all unknown devices when probing" http://http://lists.denx.de/pipermail/u-boot/2014-November/194622.html Cc: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@ti.com>
* | common/cmd_fitupd.c: restore corrupted fileWolfgang Denk2014-11-071-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | This file got corrupted by the automatic editin of commit 1a45966 "Add GPL-2.0+ SPDX-License-Identifier to source files"; restore the opiginal content and manually insert the SPDX ID. The bug was detected by running cppcheck, which reported: [common/cmd_fitupd.c:8]: (error) Invalid number of character ({) when these macros are defined: 'CONFIG_UPDATE_TFTP'. Signed-off-by: Wolfgang Denk <wd@denx.de>
* | hush: make run_command() return an error on parsing failureRabin Vincent2014-11-071-1/+1
| | | | | | | | | | | | | | | | run_command() returns success even if the command had a syntax error; correct this behaviour. Signed-off-by: Rabin Vincent <rabin@rab.in> Acked-by: Simon Glass <sjg@chromium.org)
* | hush: fix segfault on syntax errorRabin Vincent2014-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hush segfaults if it sees a syntax error while attempting to parse a command: $ ./u-boot -c "'" ... syntax error Segmentation fault (core dumped) This is due to a NULL pointer dereference of in_str->p in static_peek(). The problem is that the exit condition for the loop in parse_stream_outer() checks for rcode not being -1, but rcode is only ever 0 or 1. Signed-off-by: Rabin Vincent <rabin@rab.in> Acked-by: Simon Glass <sjg@chromium.org) Tested-by: Simon Glass <sjg@chromium.org)
* | hush: return consistent codes from run_command()Rabin Vincent2014-11-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Attempting to run: - an empty string - a string with just spaces returns different error codes, 1 for the empty string and 0 for the string with just spaces. Make both of them return 0 for consistency. Signed-off-by: Rabin Vincent <rabin@rab.in> Acked-by: Simon Glass <sjg@chromium.org)
OpenPOWER on IntegriCloud