summaryrefslogtreecommitdiff
path: root/common
AgeCommit message (Collapse)Author
2014-10-14Merge tag 'v2014.10' into 2014.10-toradex-nextMarcel Ziswiler
Prepare v2014.10
2014-10-11ARM: Implement non-cached memory supportThierry Reding
Implement an API that can be used by drivers to allocate memory from a pool that is mapped uncached. This is useful if drivers would otherwise need to do extensive cache maintenance (or explicitly maintaining the cache isn't safe). The API is protected using the new CONFIG_SYS_NONCACHED_MEMORY setting. Boards can set this to the size to be used for the non-cached area. The area will typically be right below the malloc() area, but architectures should take care of aligning the beginning and end of the area to honor any mapping restrictions. Architectures must also ensure that mappings established for this area do not overlap with the malloc() area (which should remain cached for improved performance). While the API is currently only implemented for ARM v7, it should be generic enough to allow other architectures to implement it as well. Signed-off-by: Thierry Reding <treding@nvidia.com> Conflicts: README
2014-10-11malloc: Output region when debuggingThierry Reding
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>
2014-10-11pci: Honour pci_skip_dev()Thierry Reding
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>
2014-10-11pci: Abort early if bus does not existThierry Reding
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>
2014-10-10common/board_r: remove warning in initr_mem for 64-bit phys_size_tValentin Longchamp
Since on powerpc phys_size_t can be unsigned long long, this printout line can result in a not nice compile warning. Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> Acked-by: Simon Glass <sjg@chromium.org>
2014-10-10common: spl_sata: perform SCSI scan before getting deviceRoger Quadros
At least on OMAP, init_sata() no longer performs scsi_scan() so we must do it explicitly here. Cc: Dan Murphy <dmurphy@ti.com> Signed-off-by: Roger Quadros <rogerq@ti.com>
2014-10-10common/board_r: Fix booting issue on T4240QDSYork Sun
Commit 294b91a5817147d4b7f47be2ac69bac2a1f26491 moved initr_malloc earlier than initr_unlock_ram_in_cache. This causes issue on T4240. It may be related to locked L1 d-cache and unlocked L2 cache. D- cache could and should be unlock earlier for normal operation. This patch moves initr_unlock_ram_in_cache before initr_malloc. It has been verified on the following boards, in which only T4240QDS suffered and has been since fixed: T4240QDS, T2080QDS, P5040DS, P4080DS, MPC8572DS, MPC8536DS, MPC8641HPCN, B4860QDS. Signed-off-by: York Sun <yorksun@freescale.com> CC: Scott Wood <scottwood@freescale.com> CC: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
2014-10-10pxe: Ensure we don't overflow bootargsIan Campbell
On a couple of platforms I've tripped over long PXE append lines overflowing this array, due to having CONFIG_SYS_CBSIZE == 256. When doing preseeded Debian installs it's pretty trivial to exceed that. Since the symptom can be a silent hang or a crash add a check. Of course the affected boards would also need an increased CBSIZE to actually work. Note that due to the printing of the final bootargs string CONFIG_SYS_PBSIZE also needs to be sufficiently large. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> [trini: Use %zd not %d in printf for all args] Signed-off-by: Tom Rini <trini@ti.com>
2014-10-06Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini
2014-10-06Merge branch 'topic/arm/socfpga-20141006' of git://git.denx.de/u-boot-socfpgaTom Rini
Fix a trivial conflict in dw_mmc.c after talking with Marek. Conflicts: drivers/mmc/dw_mmc.c Signed-off-by: Tom Rini <trini@ti.com>
2014-10-06tools: socfpga: Add socfpga preloader signing to mkimageCharles Manning
Like many platforms, the Altera socfpga platform requires that the preloader be "signed" in a certain way or the built-in boot ROM will not boot the code. This change automatically creates an appropriately signed preloader from an SPL image. The signed image includes a CRC which must, of course, be generated with a CRC generator that the SoCFPGA boot ROM agrees with otherwise the boot ROM will reject the image. Unfortunately the CRC used in this boot ROM is not the same as the Adler CRC in lib/crc32.c. Indeed the Adler code is not technically a CRC but is more correctly described as a checksum. Thus, the appropriate CRC generator is added to lib/ as crc32_alt.c. Signed-off-by: Charles Manning <cdhmanning@gmail.com> Signed-off-by: Marek Vasut <marex@denx.de> Cc: Chin Liang See <clsee@altera.com> Cc: Dinh Nguyen <dinguyen@altera.com> Cc: Albert Aribaud <albert.u.boot@aribaud.net> Cc: Tom Rini <trini@ti.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Pavel Machek <pavel@denx.de> Acked-by: Pavel Machek <pavel@denx.de> V2: - Zap unused constant - Explicitly print an error message in case of error - Rework the hdr_checksum() function to take the *header directly instead of a plan buffer pointer
2014-10-06usb: kbd: Allow "usb reset" to continue when an usb kbd is usedHans de Goede
Use the new force parameter to make the stdio_deregister succeed, replacing stdin with a nulldev, and assume that the usb keyboard will come back after the reset. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2014-10-06stdio: Add force parameter to stdio_deregisterHans de Goede
In some cases we really want to move forward with a deregister, add a force parameter to allow this, and replace the dev with a nulldev in this case. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2014-10-06usb: kbd: Remove check for already being registeredHans de Goede
We now always properly deregister the keyboard before calling drv_usb_kbd_init(), so we can drop the check for already being registered. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2014-10-06usb: kbd: On a "usb reset" call usb_kbd_deregister() before calling usb_stop()Hans de Goede
We need to call usb_kbd_deregister() before calling usb_stop(). usbkbd's stdio_dev->priv points to the usb_device, and usb_kbd_testc dereferences usb_device->privptr. usb_stop zeros usb_device, leaving usb_device->privptr NULL, causing bad things (tm) to happen once control returns to the main loop and usb_kbd_testc gets called. Calling usb_kbd_deregister() avoids this. Note that we do not allow the "usb reset" to continue when the deregister fails. This will be fixed in a later patch. For the same reasons always fail "usb stop" if the usb_kbd_deregister() fails, even in the force path. This can happen when CONFIG_SYS_STDIO_DEREGISTER is not set. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2014-10-06usb: kbd: Do not treat -ENODEV as an error for usb_kbd_deregisterHans de Goede
ENODEV menas no usb keyboard was registered, threat this as a successful usb_kbd_deregister. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2014-10-06usb: kbd: Fix unaligned buffer usage in usb_kbd_setled()Hans de Goede
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2014-10-03cmd_mmc: fix bootpart-resize maxarg to 4Wally Yeh
sub-command 'bootpart-resize' check for argc == 4, it will retrun CMD_RET_FAILURE when argc value not matched. but bootpart-resize's maxarg is 3, which means you never execute this sub-command successfully. fix it by change bootpart-resize maxarg to 4. Signed-off-by: wally.yeh <wally.yeh@atrustcorp.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Pierre Aubert <p.aubert@staubli.com> Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
2014-10-03env_mmc: correct fini partition to match init partitionPeter Bigot
The code to set the MMC partition uses an weak function to obtain the correct partition number. Use that instead of the compile-time default when deciding whether it needs to switch back. Fixes: 6e7b7df4df43574 ("env_mmc: support env partition setup in runtime") Signed-off-by: Peter A. Bigot <pab@pabigot.com> Acked-by: Dmitry Lifshitz <lifshitz@compulab.co.il> Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
2014-09-26Merge branch 'for-tom' of git://git.denx.de/u-boot-dmTom Rini
2014-09-26dm: spi: Move cmd device code into its own functionSimon Glass
In preparation for changing the error handling in this code for driver model, move it into its own function. Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2014-09-26Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriqTom Rini
2014-09-25fdt_support: Make of_bus_default_count_cells non staticArnab Basu
of_bus_default_count_cells can be used to get the #address-cells and #size-cells defined by the current node's parent node. This is required when using of_read_number to read from FDT nodes that can be 32 or 64 bytes depending on values defined by the parent. Signed-off-by: Arnab Basu <arnab.basu@freescale.com> CC: Scott Wood <scottwood@freescale.com>
2014-09-25fdt_support: Move of_read_number to fdt_support.hArnab Basu
This is being done so that it can be used outside 'fdt_support.c'. Making life more convenient when reading device node properties that can be 32 or 64 bits long. Signed-off-by: Arnab Basu <arnab.basu@freescale.com> Cc: Scott Wood <scottwood@freescale.com>
2014-09-24kbuild: refactor some makefilesMasahiro Yamada
[1] Move driver/core/, driver/input/ and drivers/input/ entries from the top Makefile to drivers/Makefile [2] Remove the conditional by CONFIG_DM in drivers/core/Makefile because the whole drivers/core directory is already selected by CONFIG_DM in the upper level [3] Likewise for CONFIG_DM_DEMO in drivers/demo/Makefile [4] Simplify common/Makefile - both CONFIG_DDR_SPD and CONFIG_SPD_EEPROM are boolean macros so they can directly select objects Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Marek Vasut <marex@denx.de>
2014-09-24cmd_nand: Update (nand_info_t*)nand after arg_off(_size) callRostislav Lisovy
The arg_off() and arg_off_size() update the 'current NAND device' variable (dev). This is then used when assigning the (nand_info_t*)nand value. Place the assignment after the arg_off(_size) calls to prevent using incorrect (nand_info_t*) nand value. Signed-off-by: Rostislav Lisovy <lisovy@merica.cz>
2014-09-24kconfig: move CONFIG_CMD_IMPORTENV to KconfigMasahiro Yamada
Since CONFIG_CMD_IMPORTENV is defined in config_cmd_defaults.h, it should be enabled for all the boards except bf506f-ezkit that undefs it explicitely. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2014-09-24kconfig: move CONFIG_CMD_GO to KconfigMasahiro Yamada
Since CONFIG_CMD_GO is defined in config_cmd_defaults.h (and no board undefs it its own header), it can be moved to Kconfig with the default value "y". Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2014-09-24kconfig: move CONFIG_CMD_EXPORTENV to KconfigMasahiro Yamada
Since CONFIG_CMD_EXPORTENV is defined in config_cmd_defaults.h, it should be enabled for all the boards except bf506f-ezkit that undefs it explicitely. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2014-09-24kconfig: move CONFIG_CMD_CRC32 to KconfigMasahiro Yamada
Since CONFIG_CMD_CRC32 is defined in config_cmd_defaults.h, it is enabled for all the boards except the ones undefining it explicitly: kwb tseries_mmc tseries_nand tseries_spi vct_platinum_onenand_small vct_platinum_small vct_platinumavc_onenand_small vct_platinumavc_small vct_premium_onenand_small vct_premium_small The default value of this config option should be "y" and "# CONFIG_CMD_CRC32 is not set" should be added for those exceptions. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
2014-09-24kconfig: move CONFIG_CMD_BOOTM to KconfigMasahiro Yamada
CONFIG_CMD_BOOTM is defined in config_cmd_defaults.h which is forcebly included from each board. So, the default value of "config CMD_BOOTM" should be "y". For some boards undefining it (bf506f-ezkit, controlcenterd_TRAILBLA, controlcenterd_TRAILBLAZER_DEVELOP, controlcenterd_TRAILBLAZER), "# CONFIG_CMD_BOOTM is not set" should be added to their defconfig. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
2014-09-24kconfig: add blank Kconfig filesMasahiro Yamada
This would be useful to start moving various config options. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2014-09-24sandbox: Disable Ctrl-CSimon Glass
This is not supported properly on sandbox, and interferes with running tests, since when a test script is piped in, some commands will call ctrlc() which will drop characters from the test script. Signed-off-by: Simon Glass <sjg@chromium.org>
2014-09-24usb/gadget: fastboot: implement sparse formatSteve Rae
- add capability to "fastboot flash" with sparse format images Signed-off-by: Steve Rae <srae@broadcom.com> Acked-by: Lukasz Majewski <l.majewski@samsung.com>
2014-09-24usb/gadget: fastboot: minor cleanupSteve Rae
- update static function - additional debugging statements - update "fastboot command" information - add missing include file - update spelling Signed-off-by: Steve Rae <srae@broadcom.com>
2014-09-24usb/gadget: fastboot: add eMMC support for flash commandSteve Rae
- add support for 'fastboot flash' command for eMMC devices Signed-off-by: Steve Rae <srae@broadcom.com>
2014-09-24spl: replace CONFIG_SPL_SPI_* with CONFIG_SF_DEFAULT_*Nikita Kiryanov
Currently, CONFIG_SPL_SPI_* #defines are used for controlling SPI boot in SPL. These #defines do not allow the user to select SPI mode for the SPI flash (there's no CONFIG_SPL_SPI_MODE, so the SPI mode is hardcoded in spi_spl_load.c), and duplicate information already provided by CONFIG_SF_DEFAULT_* #defines. Kill CONFIG_SPL_SPI_*, and use CONFIG_SF_DEFAULT_* instead. Cc: Tom Rini <trini@ti.com> Cc: Marek Vasut <marex@denx.de> Cc: Sudhakar Rajashekhara <sudhakar.raj@ti.com> Cc: Lokesh Vutla <lokeshvutla@ti.com> Cc: Vitaly Andrianov <vitalya@ti.com> Cc: Lars Poeschel <poeschel@lemonage.de> Cc: Bo Shen <voice.shen@atmel.com> Cc: Hannes Petermaier <hannes.petermaier@br-automation.com> Cc: Michal Simek <monstr@monstr.eu> Acked-by: Marek Vasut <marex@denx.de> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
2014-09-16generic_board: do not set gd->fdt_blob unless CONFIG_OF_CONTROL=yMasahiro Yamada
gd->fdt_blob is used for FDT control of U-Boot. If CONFIG_OF_CONTROL is not defined, it is useless. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
2014-09-16common: fix include guards for CONFIG_MPGabriel Huau
This was breaking the build for some boards: MPC8536DS MPC8536DS_36BIT MPC8536DS_SDCARD MPC8536DS_SPIFLASH qemu-ppce500 Include only these features for some PPC boards if the configuration for MultiProcessor is enabled. Signed-off-by: Gabriel Huau <contact@huau-gabriel.fr> Cc: Tom Rini <trini@ti.com> Cc: York Sun <yorksun@freescale.com> Acked-by: York Sun <yorksun@freescale.com>
2014-09-16implement the Android sparse image formatSteve Rae
update to provide usable implementation to U-Boot Signed-off-by: Steve Rae <srae@broadcom.com>
2014-09-16cleanup code which handles the Android sparse image formatSteve Rae
- port dprintf() to debug() - update formatting Signed-off-by: Steve Rae <srae@broadcom.com>
2014-09-16update code which handles Android sparse image formatSteve Rae
- remove unnecessary functions Signed-off-by: Steve Rae <srae@broadcom.com>
2014-09-16add code to handle Android sparse image formatSteve Rae
Add original file (pristine) from : https://www.codeaurora.org/cgit/quic/la/kernel/lk/plain/app/aboot/aboot.c?h=master [3b5092d20bd15a7a2879c13e9f64acc48d04af2d] Signed-off-by: Steve Rae <srae@broadcom.com>
2014-09-16cmd_mem: add static to internally used functionsMasahiro Yamada
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
2014-09-16kgdb: Remove first_entry for kgdbPeng Fan
There are two ways to run into handle_exception, run command 'kgdb' and encounter a breakpoint which triggers exception handling. The origin source code only saves regs when first run command 'kgdb'. Take the following for example, When run 'kgdb', regs is saved to entry_regs. When run 'bootz', regs is not saved. However, if we set a breakpoint, then continue. When breakpoint is reached, run `quit`, and Now return to the instruction which follows kgdb, but not bootz.This may cause errors. So, save regs for each handle_exception call to return to the correct place. Example: Target | Host =>kgdb | (gdb)b bootz | (gdb)c =>bootz | | (gdb)Here stop because of breakpoint | (gdb)q Signed-off-by: Peng Fan <van.freenix@gmail.com>
2014-09-15Fix a few printf argument verification warningsVasili Galka
The parameters of size_t type shall be formatted using "%zu" and not using "%d". Precision argument for the "%.*s" parameters shall be of int type. Signed-off-by: Vasili Galka <vvv444@gmail.com>
2014-09-13Merge branch 'master' of git://git.denx.de/u-boot-dmTom Rini
2014-09-10dm: Make driver model available before board_init()Simon Glass
For some boards board_init() will change GPIOs, so we need to have driver model available before then. Adjust the board init to arrange this, but enable it for driver model only, just to be safe. This does create additional #ifdef logic, but it is safer than trying to make a pervasive change which may cause some boards to break. Signed-off-by: Simon Glass <sjg@chromium.org>
2014-09-10Set up stdio earlier when using driver modelSimon Glass
Since driver model registers itself with the stdio subsystem, and we want to avoid delayed registration and other complexity associated with the current serial console, move the stdio subsystem init earlier when driver model is used for serial. This simplifies the implementation. Should there be any problems with this approach they can be dealt with as boards are converted over to use driver model for serial. Signed-off-by: Simon Glass <sjg@chromium.org>