summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge git://git.denx.de/u-boot-dmTom Rini2016-03-14121-1021/+1737
|\
| * buildman: Allow the toolchain architecture to be specifiedSimon Glass2016-03-141-5/+12
| | | | | | | | | | | | | | | | At present the architecture is deduced from the toolchain filename. Allow it to be specified by the caller. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com
| * buildman: Allow the toolchain priority to be specifiedSimon Glass2016-03-141-8/+22
| | | | | | | | | | | | | | | | | | | | At present the priority of a toolchain is calculated from its filename based on hard-coded rules. Allow it to be specified by the caller. We will use this in a later patch. Also display the priority and provide a message when it is overriden by another toolchain of higher priority. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
| * buildman: Fix up a few code inconsistencies in toolchain.pySimon Glass2016-03-141-5/+6
| | | | | | | | | | | | | | | | | | Normally we use a single quote for strings unless there is a reason not to (such as an embedded single quote). Fix a few counter-examples in this file. Also add a missing function-argument comment. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
| * buildman: patman: Fix -H when installed as a symlinkSimon Glass2016-03-142-2/+4
| | | | | | | | | | | | | | | | | | | | It is convenient to install symlinks to buildman and patman in the search patch, such as /usr/local/bin. But when this is done, the -H option fails to work because it looks in the directory containing the symlink instead of its target. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
| * patman: Add a missing space in GetMetaDataForList()Simon Glass2016-03-141-1/+1
| | | | | | | | | | | | | | Fix this nit to keep the code consistent. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
| * fdtgrep: Improve error handling with invalid device treeSimon Glass2016-03-141-4/+10
| | | | | | | | | | | | | | | | | | | | This tool requires that the aliases node be the first node in the tree. But when it is not, it does not handle things gracefully. In fact it crashes. Fix this, and add a more helpful error message. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * dm: serial: Remove duplicated carriage return characterAlison Wang2016-03-142-9/+0
| | | | | | | | | | | | | | | | | | As the handling for carriage return and line feed is done in the common DM driver serial-uclass.c, such handling in some serial DM drivers is duplicated and need to be removed. Signed-off-by: Alison Wang <alison.wang@nxp.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * serial: Move carriage return before line feed for some serial driversAlison Wang2016-03-144-15/+16
| | | | | | | | | | | | | | | | | | In general, a carriage return needs to execute before a line feed. The patch is to change some serial drivers based on this rule, such as serial_mxc.c, serial_pxa.c, serial_s3c24x0.c and usbtty.c. Signed-off-by: Alison Wang <alison.wang@nxp.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * dm: serial-uclass: Move a carriage return before a line feedAlison Wang2016-03-141-2/+3
| | | | | | | | | | | | | | | | In general, a carriage return needs to execute before a line feed. The patch is to change serial DM driver serial-uclass.c based on this rule. Signed-off-by: Alison Wang <alison.wang@nxp.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * Drop CONFIG_CRAMFS_CMDLINESimon Glass2016-03-144-8/+0
| | | | | | | | | | | | | | This option doesn't do anything. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Bin Meng <bmeng.cn@gmail.com>
| * part: Rename test_part_xx() and print_part_xx()Simon Glass2016-03-145-27/+27
| | | | | | | | | | | | | | Rename these functions so that part_ is at the start. This more clearly identifies these functions as partition functions. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: usb: Clean up USB after each testSimon Glass2016-03-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The USB subsystem has a few counters that need to be reset since they are stored in static variables rather than driver-model data. An example is usb_max_devs. Ultimately we should move this data into the USB uclass. For now, make sure that USB is reset after each test, so that the counters go back to zero. Note: this is not a perfect solution: It a USB test fails it will exit immediately and leave USB un-reset. The impact here is that it may cause subsequence test failures in the same run. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: usb: Convert USB storage to use driver-model for block devsSimon Glass2016-03-141-6/+135
| | | | | | | | | | | | | | | | | | | | Update this code to support CONFIG_BLK. Each USB storage device can have one or more block devices as children, each one representing a LUN (logical unit) of the USB device. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de> Tested-by: Stephen Warren <swarren@nvidia.com>
| * dm: sandbox: Add driver-model block-device support for sandboxSimon Glass2016-03-143-2/+127
| | | | | | | | | | | | | | | | | | Update the host driver to support driver model for block devices. A future commit will remove the old code, but for now it is useful to be able to use it both with and without CONFIG_BLK. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com>
| * dm: sandbox: Prepare block driver for driver-model conversionSimon Glass2016-03-141-16/+14
| | | | | | | | | | | | | | Make a few minor changes to make it easier to add driver-model support. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com>
| * dm: blk: Add a block-device uclassSimon Glass2016-03-145-0/+334
| | | | | | | | | | | | | | | | | | Add a uclass for block devices. These provide block-oriented data access, supporting reading, writing and erasing of whole blocks. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
| * dm: usb: Tidy up storage code ready for driver model conversionSimon Glass2016-03-141-56/+61
| | | | | | | | | | | | | | | | | | | | Adjust a few things so that the addition of driver-models support involved adding code rather than also changing it. This makes the patches easier to review. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de> Tested-by: Stephen Warren <swarren@nvidia.com>
| * dm: usb: Avoid exceeding available array size for storage devicesSimon Glass2016-03-141-7/+7
| | | | | | | | | | | | | | | | | | | | The limit on storage devices is USB_MAX_STOR_DEV but we use one extra element while probing to see if a device is a storage device. Avoid this, since it causes memory corruption. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de> Tested-by: Stephen Warren <swarren@nvidia.com>
| * dm: block: Adjust device calls to go through helpers functionSimon Glass2016-03-1416-87/+94
| | | | | | | | | | | | | | | | | | | | | | | | To ease conversion to driver model, add helper functions which deal with calling each block device method. With driver model we can reimplement these functions with the same arguments. Use inline functions to avoid increasing code size on some boards. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
| * dm: block: Rename device number member dev to devnumSimon Glass2016-03-1428-109/+111
| | | | | | | | | | | | | | | | | | This is a device number, and we want to use 'dev' to mean a driver model device. Rename the member. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
| * dm: sandbox: Enable cbfs and cramfsSimon Glass2016-03-141-0/+3
| | | | | | | | | | | | | | | | Enable these two filesystems to provide better build coverage in sandbox. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
| * dm: cbfs: Fix handling of invalid typeSimon Glass2016-03-141-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | The comment for file_cbfs_type() says that it returns 0 for an invalid type. The code appears to check for -1, except that it uses an unsigned variable to store the type. This results in a warning on 64-bit machines. Adjust it to make the meaning clearer. Continue to handle the -1 case since it may be needed. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com>
| * dm: part: Rename some partition functionsSimon Glass2016-03-1425-79/+76
| | | | | | | | | | | | | | | | Rename three partition functions so that they start with part_. This makes it clear what they relate to. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com>
| * dm: part: Convert partition API use to linker listsSimon Glass2016-03-147-173/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can use linker lists instead of explicitly declaring each function. This makes the code shorter by avoiding switch() statements and lots of header file declarations. While this does clean up the code it introduces a few code issues with SPL. SPL never needs to print partition information since this all happens from commands. SPL mostly doesn't need to obtain information about a partition either, except in a few cases. Add these cases so that the code will be dropped from each partition driver when not needed. This avoids code bloat. I think this is still a win, since it is not a bad thing to be explicit about which features are used in SPL. But others may like to weigh in. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Tested-by: Stephen Warren <swarren@nvidia.com>
| * dm: sandbox: Enable all partition typesSimon Glass2016-03-141-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | It is useful to have sandbox build as much code as possible to avoid having to build every board to detect build errors. Also we may add tests for some more partition types at some point. Enable all partition types in sandbox. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
| * dm: part: Add a cast to avoid a compiler warningSimon Glass2016-03-141-1/+1
| | | | | | | | | | | | | | | | | | In part_amiga.c the name is unsigned but bcpl_strcpy() requires a signed pointer. Add a cast to fix the warning. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
| * dm: blk: Rename get_device_and_partition()Simon Glass2016-03-1410-17/+51
| | | | | | | | | | | | | | | | | | | | Rename this function to blk_get_device_part_str(). This is a better name because it makes it clear that the function returns a block device and parses a string. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
| * dm: blk: Rename get_device() to blk_get_device_by_str()Simon Glass2016-03-146-13/+39
| | | | | | | | | | | | | | | | | | | | The current name is too generic. The function returns a block device based on a provided string. Rename it to aid searching and make its purpose clearer. Also add a few comments. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
| * dm: blk: Rename get_dev() to blk_get_dev()Simon Glass2016-03-146-14/+16
| | | | | | | | | | | | | | | | | | The current name is too generic. Add a 'blk_' prefix to aid searching and make its purpose clearer. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
| * dm: blk: Add comments to a few functionsSimon Glass2016-03-141-0/+30
| | | | | | | | | | | | | | | | | | The block interface is not well documented in the code. Pick two important functions and add comments. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
| * dm: blk: Convert interface type to an enumSimon Glass2016-03-141-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | Since these are sequentially numbered it makes sense to use an enum. It avoids having to maintain the maximum value, and provides a type we can use if it is useful. In fact the maximum value is not used. Rename it to COUNT, since MAX suggests it is the maximum valid value, but it is not. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com>
| * dm: Add a new header for block devicesSimon Glass2016-03-143-58/+74
| | | | | | | | | | | | | | | | | | | | | | At present block devices are tied up with partitions. But not all block devices have partitions within them. They are in fact separate concepts. Create a separate blk.h header file for block devices. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
| * dm: part: Drop the common.h headerSimon Glass2016-03-141-1/+0
| | | | | | | | | | | | | | | | | | We should not include <common.h> in header files. Each C file should include it if needed. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
| * dm: fdtdec: Correct a sandbox build warningSimon Glass2016-03-141-2/+3
| | | | | | | | | | | | | | Adjust the cast to avoid a warning when stdint.h is used. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com>
| * dm: part: Correct a sandbox build warningSimon Glass2016-03-141-4/+6
| | | | | | | | | | | | | | Adjust the cast to avoid a warning when stdint.h is used. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com>
| * dm: pci: Break out the common region display codeSimon Glass2016-03-141-34/+17
| | | | | | | | | | | | | | | | Each region is displayed in almost the same way. Break out this common code into its own function. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com>
| * dm: Drop the block_dev_desc_t typedefSimon Glass2016-03-1466-331/+338
| | | | | | | | | | | | | | | | | | Use 'struct' instead of a typdef. Also since 'struct block_dev_desc' is long and causes 80-column violations, rename it to struct blk_desc. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
| * debug_uart: output CR along with LFMasahiro Yamada2016-03-141-1/+3
| | | | | | | | | | | | | | | | | | The serial output from the debug UART carries on going far to the right in the console. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
| * dm: core: make simple-bus compatible to simple-mfdMasahiro Yamada2016-03-141-0/+1
| | | | | | | | | | | | | | | | Simple MFD devices can bind children without special bus configuration. Like Linux, let's handle "simple-mfd" in the same way as "simple-bus". Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
| * dm: Use uclass_first_device_err() where it is usefulSimon Glass2016-03-1417-54/+30
| | | | | | | | | | | | Use this new function in places where it simplifies the code. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: core: Add uclass_first_device_err() to return a valid deviceSimon Glass2016-03-142-2/+26
| | | | | | | | | | | | | | | | A common pattern is to call uclass_first_device() and then check if it actually returns a device. Add a new function which does this, returning an error if there are no devices in that uclass. Signed-off-by: Simon Glass <sjg@chromium.org>
* | Merge git://git.denx.de/u-boot-marvellTom Rini2016-03-141-3/+3
|\ \
| * | ARM: sheevaplug: drop unneded 'usb start' from boot commandPeter Korsgaard2016-03-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The default bootcommand executes x_bootcmd_usb AFTER loading a kernel from nand and just before executing it, which only slows down boot without adding any functionality - So drop it. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
| * | ARM: sheevaplug: unbreak kernel bootargs / mtdparts command by dropping ↵Peter Korsgaard2016-03-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | double mtdparts= Commit 1e3d640316 (ARM: sheevaplug: redefine MTDPARTS) prepended mtdparts= to the flash partition information in CONFIG_MTDPARTS, but it is used like "mtdparts=" CONFIG_MTDPARTS - So we end up passing mtdparts=mtdparts=.. to the kernel, confusing the cmdline partition parser. Fix it by dropping the double 'mtdparts='. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
| * | ARM: sheevaplug: unbreak default environmentPeter Korsgaard2016-03-141-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | Commit 1e3d640316 (ARM: sheevaplug: redefine MTDPARTS) changed the mtdparts part of the default environment, but dropped the trailing zero termination - So the definition of x_bootcmd_kernel becomes part of the x_bootargs variable. Fix it by reintroducing the zero termination. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* | arm64: define _image_binary_end to fix SPL_OF_CONTROLMasahiro Yamada2016-03-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To make SPL_OF_CONTROL work on ARM64 SoCs, _image_binary_end must be defined in the linker script. LD spl/u-boot-spl lib/built-in.o: In function `fdtdec_setup': lib/fdtdec.c:1186: undefined reference to `_image_binary_end' lib/fdtdec.c:1186: undefined reference to `_image_binary_end' make[1]: *** [spl/u-boot-spl] Error 1 make: *** [spl/u-boot-spl] Error 2 Note: CONFIG_SPL_SEPARATE_BSS must be defined as well on ARM64 SoCs. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* | ARM: DRA72-evm: Update mux and VIRTUAL/MANUAL mode timingsLokesh Vutla2016-03-142-134/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | All the mux configurations needs to be done as part of the IODelay sequence to avoid glitch. Adding all the mux configuration, MANUAL/VIRTUAL mode configuration as needed for DRA72-evm. Also update the mux for SD card detect on DRA74-evm. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Vignesh R <vigneshr@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* | ARM: DRA7-evm: Update memory info in banksLokesh Vutla2016-03-141-0/+14
| | | | | | | | | | | | | | | | | | | | Updating the memory banks properly so that DT is populated accordingly. And updating this only after DDR is properly detected by eeprom, so that git bisect is still maintained. Acked-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* | ARM: DRA7: EMIF: Add 4GB DDR settingsLokesh Vutla2016-03-141-3/+80
| | | | | | | | | | | | | | | | | | | | The REVH and later versions of DRA7-evm uses MICRON MT41K512M16HA-125 memory chips which is of size 4GB(2GB on EMIF1 and 2GB on EMIF2). Add support for the same. Acked-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
OpenPOWER on IntegriCloud