summaryrefslogtreecommitdiff
path: root/common
Commit message (Collapse)AuthorAgeLines
* fastboot: add support for continue commandRob Herring2014-12-18-0/+4
| | | | | | | | | | | | The fastboot continue command is defined to exit fastboot and continue autoboot. This commit implements the continue command and the exiting of fastboot only. Subsequent u-boot commands can be processed after exiting fastboot. Autoboot should implement a boot script such as "fastboot; mmc read <...>; bootm" to fully implement the fastboot continue function. Signed-off-by: Rob Herring <robh@kernel.org> Tested-by: Lukasz Majewski <l.majewski@samsung.com> [TestHW: Exynos4412-Trats2]
* usb, g_dnl: generalize DFU detach functionsRob Herring2014-12-18-3/+3
| | | | | | | | | In order to add detach functions for fastboot, make the DFU detach related functions common so they can be shared. Signed-off-by: Rob Herring <robh@kernel.org> Tested-by: Lukasz Majewski <l.majewski@samsung.com> [TestHW: Exynos4412-Trats2]
* Merge branch 'master' of git://git.denx.de/u-boot-mmcTom Rini2014-12-12-1/+2
|\
| * mmc: Fix handling of bus widths and DDR card capabilitiesAndrew Gabbasov2014-12-12-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the MMC_MODE_DDR_52MHz flag is set in card capabilities bitmask, it is never cleared, even if switching to DDR mode fails, and if the controller driver uses this flag to check the DDR mode, it can take incorrect actions. Also, DDR related checks in mmc_startup() incorrectly handle the case when the host controller does not support some bus widths (e.g. can't support 8 bits), since the host_caps is checked for DDR bit, but not bus width bits. This fix clearly separates using of card_caps bitmask, having there the flags for the capabilities, that the card can support, and actual operation mode, described outside of card_caps (i.e. bus_width and ddr_mode fields in mmc structure). Separate host controller drivers may need to be updated to use the actual flags. Respectively, the capabilities checks in mmc_startup are made more correct and clear. Also, some clean up is made with errors handling and code syntax layout. Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
* | dm: i2c: Implement driver model support in the i2c commandSimon Glass2014-12-11-53/+323
|/ | | | | | | | | | | The concept of a 'current bus' is now implemented in the command line rather than in the uclass. Also the address length does not need to be specified with each command - really we should consider dropping this from most commands but it works OK for now. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de> Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* Merge git://git.denx.de/u-boot-mpc85xxTom Rini2014-12-08-10/+10
|\
| * common: spl: Add interactive DDR debugger support for SPL imageAlison Wang2014-12-05-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To support interactive DDR debugger, cli_simple.o, cli.o, cli_readline.o, command.o, s_record.o, xyzModem.o and cmd_disk.o are all needed for drivers/ddr/fsl/interactive.c. In current common/Makefile, the above .o files are only produced when CONFIG_SPL_BUILD is disabled. For LS102xA, interactive DDR debugger is needed in SD/NAND boot too, and I enabled CONFIG_FSL_DDR_INTERACTIVE. But according to the current common/Makfile, all the above .o files are not produced in SPL part because CONFIG_SPL_BUILD is enabled in SPL part, the following error will be shown, drivers/ddr/fsl/built-in.o: In function `fsl_ddr_interactive': /home/wangh/layerscape/u-boot/drivers/ddr/fsl/interactive.c:1871: undefined reference to `cli_readline_into_buffer' /home/wangh/layerscape/u-boot/drivers/ddr/fsl/interactive.c:1873: undefined reference to `cli_simple_parse_line' make[1]: *** [spl/u-boot-spl] Error 1 make: *** [spl/u-boot-spl] Error 2 So this patch fixed this issue and the above .o files will be produced no matter CONFIG_SPL_BUILD is enabled or disabled. Signed-off-by: Alison Wang <alison.wang@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-uniphierTom Rini2014-12-08-15/+3
|\ \
| * | flash: do not fail even if flash_size is zeroMasahiro Yamada2014-12-08-15/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CONFIG_SYS_MAX_FLASH_BANKS_DETECT allows to determine the number of flash banks at run-time, that is, there is a possibility that no flash bank is found. Even in such cases, it makes sense to continue the boot process without any flash device. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Stefan Roese <sr@denx.de>
* | | fdt: Allow non-FDT kernels to boot when CONFIG_OF_LIBFDT is definedSuriyan Ramasami2014-12-08-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The boot commands - bootz/bootm mandate a third argument which is the address to the FDT blob. In cases where this argument is not specified, boot fails with a message indicating a missing FDT. This causes non-FDT kernels to fail to boot. This patch allows both FDT and non-FDT kernels to boot by making the third parameter to the bootm/bootz optional. Signed-off-by: Suriyan Ramasami <suriyan.r@gmail.com> Acked-by: Simon Glass <sjg@chromium.org> [trini: Update again for covering appended DTB case after last revert in this area] Signed-off-by: Tom Rini <trini@ti.com>
* | | Replace <compiler.h> with <linux/compiler.h>Masahiro Yamada2014-12-08-1/+0
| | | | | | | | | | | | | | | | | | Including <linux/compiler.h> is enough for general use. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | | powerpc: mpc8xx: remove hermes board supportMasahiro Yamada2014-12-08-27/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This board sprinkles #ifdef(CONFIG_HERMES) over various global files such as include/common.h, common/board_r.c, common/cmd_bdinfo.c. Let's zap such an ill-behaved board. It has not been converted to generic board yet and mpc8xx is old enough. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Wolfgang Denk <wd@denx.de> Acked-by: Wolfgang Denk <wd@denx.de>
* | | cmd_fuse: return CMD_RET_FAILURE on errorHector Palacios2014-12-08-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fuse drivers, like the mxs_ocotp.c, may return negative error codes but the commands are only allowed to return CMD_RET_* enum values to the shell, otherwise the following error appears: "exit not allowed from main input shell." Signed-off-by: Hector Palacios <hector.palacios@digi.com> Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
* | | ARM: rpi: rename rpi_b to rpiStephen Warren2014-12-08-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The U-Boot port runs on a variety of RPi models, not just the B. So, rename the port to something slightly more generic. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
* | | spl: if MMCSD_MODE_RAW fails, try MMCSD_MODE_FS, if availableGuillaume GARDET2014-12-08-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In SPL MMC, boot modes are exclusive. So, if MMCSD_MODE_RAW fails, the board hangs. This patch allows to try MMCSD_MODE_FS then, if available. It has been tested on a pandaboard (rev. A3). Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr> Cc: Tom Rini <trini@ti.com>
* | | Fix console functions for U-Boot APISimon Glass2014-12-08-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 709ea54 made a subtle change to the way the U-Boot API jump table is set up. So at present putc(), getc(), tstc() and puts() do not work correctly from functions that use the U-Boot API. Previously these were set to the stdio functions, but these now take a parameter specifying which stdio device to use. Instead, we should change them to use the global functions which do not have a parameter. This is a slight change in behaviour. The functions will now output to all selected stdio devices - for example putc() will output a character to all devices selected by stdout. However in most cases there is only one, and it isn't necessarily incorrect behaviour anyway. The API version is not changed since it is compatible with what was there before. Reported-by: Martin Dorwig <dorwig@tektronik.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* | | spl: MMC U-Boot image load from raw partitionPaul Kocialkowski2014-12-08-4/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Raw images of U-Boot can be stored inside MMC partitions, so it makes sense to read the partition table, looking for a partition number instead of using a fixed sector address. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-by: Tom Rini <trini@ti.com> [trini: Only add mmc_load_image_raw_partition() when CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION to avoid warning, add missing conversion in spl_mmc_load_image()] Signed-off-by: Tom Rini <trini@ti.com>
* | | MMC SD fs boot partition config coding style and proper descriptionPaul Kocialkowski2014-12-04-4/+4
|/ / | | | | | | | | | | | | | | | | | | | | CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION ought to be called CONFIG_SYS_MMCSD_FS_BOOT_PARTITION to keep it consistent with other config options such as: CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR. In addition, it is not related to raw mode booting but to fs mode instead. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-by: Tom Rini <trini@ti.com>
* | Merge branch 'sandbox' of git://git.denx.de/u-boot-x86Tom Rini2014-12-04-10/+11
|\ \
| * | sandbox: Fix warnings due to 64-bit printf() stringsSimon Glass2014-11-26-10/+11
| |/ | | | | | | | | | | | | Now that we have inttypes.h, use it in a few more places to avoid compiler warnings on sandbox when building on 64-bit machines. Signed-off-by: Simon Glass <sjg@chromium.org>
* | Revert "image-fdt: boot_get_fdt() return value when no DTB exists"Tom Rini2014-12-03-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | It has been found that this change breaks the case of an appended device tree file, so for the problem in question some other solution must be found. This reverts commit c6150aaf2f2745141a7c2ceded58d7efbfeace7d. Reported-by: Bill Pringlemeir <bpringlemeir@nbsps.com> Reported-by: Pantelis Antoniou <panto@antoniou-consulting.com> Confirmed-by: Bill Pringlemeir <bpringlemeir@nbsps.com> Signed-off-by: Tom Rini <trini@ti.com>
* | Merge git://git.denx.de/u-boot-fdtTom Rini2014-12-01-6/+6
|\ \
| * | fdt: Fix regression in fdt_pack_reg()Hans de Goede2014-12-01-6/+6
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After commit 933cdbb479: "fdt: Try to use fdt_address_cells()/fdt_size_cells()" I noticed that allwinner boards would no longer boot. Switching to fdt_address_cells / fdt_size_cells changes the result from bytes to 32 bit words, so when we increment pointers into the blob, we must do so by 32 bit words now. This commit makes allwinner boards boot again. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Tested-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Roese <sr@denx.de> Tested-by: Vince Hsu <vinceh@nvidia.com>
* | Merge git://git.denx.de/u-boot-x86Tom Rini2014-12-01-5/+2
|\ \ | |/ |/|
| * x86: Remove unnecessary call to initr_enable_interrupts()Bin Meng2014-11-25-1/+1
| | | | | | | | | | | | | | | | | | Actually initr_enable_interrupts() was never called in an x86 build due to it was wrapped by CONFIG_x86 (typo of X86). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
| * x86: Remove cpu_init_r() for x86Bin Meng2014-11-25-1/+1
| | | | | | | | | | | | | | | | | | Since cpu_init_interrupts() was moved out of cpu_init_r(), it is useless to keep cpu_init_r() for x86, thus remove it. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
| * x86: Remove board_early_init_r()Simon Glass2014-11-25-3/+0
| | | | | | | | | | | | | | | | This function is not needed. Remove it to improve the generic init sequence slightly. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* | spl: Fix SPL EXT supportGuillaume GARDET2014-11-26-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-26-42/+67
|\ \
| * | common/lcd: Make lcd_dt_simplefb_configure_node use fdt_setup_simplefb_nodeHans de Goede2014-11-25-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-25-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-26-50/+64
|\ \
| * | fdt: Try to use fdt_address_cells()/fdt_size_cells()Simon Glass2014-11-21-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-21-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-21-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-21-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-21-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-21-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-24-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-24-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-24-1/+23
|\ \
| * | cmd_sata: implement sata stop commandNikita Kiryanov2014-11-24-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-24-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-21-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-21-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-21-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-21-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-24-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-21-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-21-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>