summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* lib/crc16.c: Coding-style cleanupStefan Roese2016-03-141-41/+40
| | | | | | | lib/crc16.c is changed to match the common U-Boot coding-style. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
* common: image-fit: Fix load and entry addresses in FIT imageYork Sun2016-03-141-5/+17
| | | | | | | | FIT image supports more than 32 bits in addresses by using #address-cell field. Fixing 64-bit support by using this field. Signed-off-by: York Sun <york.sun@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* common: image-fit: Use a common function to get addressYork Sun2016-03-141-23/+19
| | | | | | | | FIT image supports load address and entry address. Getting these addresses can use a common function. Signed-off-by: York Sun <york.sun@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* arm: Add support for LEGO MINDSTORMS EV3David Lechner2016-03-1410-0/+518
| | | | | | | | | | | | This is based on the davinci da850evm. It can boot from either the on-board 16MB flash or from a microSD card. It also reads board information from an I2C EEPROM. The EV3 itself initally boots from write-protected EEPROM, so no u-boot SPL is needed. Signed-off-by: David Lechner <david@lechnology.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* configs: k2g_evm: Add TI power processor supportNishanth Menon2016-03-143-0/+23
| | | | | | | | | | Enable support for PMMC the TI power processor on K2G. This processor manages all power management related activities on the SoC and and allows the Operating Systems on compute processors such as ARM, DSP to offload the power logic away into the power processor. Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: dts: k2g: Add support for PMMCNishanth Menon2016-03-141-0/+7
| | | | | | | | | | | | | | Enable support for PMMC the TI power processor on K2G. This processor manages all power management related activities on the SoC and and allows the Operating Systems on compute processors such as ARM, DSP to offload the power logic away into the power processor. U-boot just has a load responsibility, hence the view of the hardware from a bootloader perspective is different from the view of hardware from a Operating System perspective. While bootloader just loads up the firmware, Operating Systems look at the resultant system as "hardware". Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* remoteproc: Add support for TI power processorNishanth Menon2016-03-143-0/+191
| | | | | | | | | | | | | | | | | | Many TI System on Chip (SoC) solutions do have a dedicated microcontroller for doing power management functionality. These include the AM335x, AM437x, Keystone K2G SoCs. The functionality provided by these microcontrollers and the communication mechanisms vary very widely. However, we are able to consolidate some basic functionality to be generic enough starting with K2G SoC family. Introduce a basic remote proc driver to support these microcontrollers. In fact, on SoCs starting with K2G, basic power management functions are primarily accessible for the High Level Operating Systems(HLOS) via these microcontroller solutions. Hence, having these started at a bootloader level is pretty much mandatory. Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: keystone2: psc: introduce function to hold and release module in reset.Nishanth Menon2016-03-142-0/+108
| | | | | | | | | These are useful for modules that need to be held in reset and are enabled for data to be loaded on to them. Typically these are microcontrollers or other processing entities in the system. Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: keystone2: psc-defs: use adequate () for macrosNishanth Menon2016-03-141-3/+3
| | | | | | | | '#define X a | b' is better defined as '#define X (a | b)' for obvious reasons. Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: keystone2: psc: redo doc in kernel-doc formatNishanth Menon2016-03-141-44/+52
| | | | | | | | | | | u-boot coding style guidance in http://www.denx.de/wiki/U-Boot/CodingStyle clearly mentions that the kernel doc style shall be followed for documentation in u-boot. Current PSC documentation standard does not, so fix that. Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: keystone2: Get rid of unused clock filesNishanth Menon2016-03-143-299/+0
| | | | | | | | | | | With commit fe772ebd285b ("ARM: keystone2: Use common definition for clk_get_rate"), we have centralized the clock code into a common clock logic and the redundant files, unfortunately remained... Clean that up. Signed-off-by: Nishanth Menon <nm@ti.com> Acked-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* board: ti: AM57xx: Add detection logic for AM57xx-evmKipisz, Steven2016-03-145-1/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current AM57xx evm supports both BeagleBoard-X15 (http://beagleboard.org/x15) and AM57xx EVM (http://www.ti.com/tool/tmdxevm5728). The AM572x EValuation Module(EVM) provides an affordable platform to quickly start evaluation of Sitara. ARM Cortex-A15 AM57x Processors (AM5728, AM5726, AM5718, AM5716) and accelerate development for HMI, machine vision, networking, medical imaging and many other industrial applications. This EVM is based on the same BeagleBoard-X15 Chassis and adds mPCIe, mSATA, LCD, touchscreen, Camera, push button and TI's wlink8 offering. Since the EEPROM contents are compatible between the BeagleBoard-X15 and the AM57xx-evm, we add support for the detection logic to enable support for various user programmable scripting capability. NOTE: U-boot configuration is currently a superset of AM57xx evm and BeagleBoard-X15 and no additional configuration tweaking is needed. This change also sets up the stage for future support of TI AM57xx EVMs to the same base bootloader build. Signed-off-by: Steve Kipisz <s-kipisz2@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: OMAP4/5: Add generic board detection hookKipisz, Steven2016-03-143-0/+13
| | | | | | | | | | | | | | | | | | | Many TI EVMs have capability to store relevant board information such as DDR description in EEPROM. Further many pad configuration variations can occur as part of revision changes in the platform. In-order to support these at runtime, we for a board detection hook which is available for override from board files that may desire to do so. NOTE: All TI EVMs are capable of detecting board information based on early clocks that are configured. However, in case of additional needs this can be achieved within the override logic from within the board file. Signed-off-by: Steve Kipisz <s-kipisz2@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ti: AM437x: Use generic EEPROM detection logicNishanth Menon2016-03-145-89/+39
| | | | | | | | | | | | | | Now that we have a generic TI eeprom logic which can be reused across platforms, reuse the same. This revision also includes fixes identified by Dave Gerlach <d-gerlach@ti.com> Cc: Dave Gerlach <d-gerlach@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Steven Kipisz <s-kipisz2@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ti: AM335x: Use generic EEPROM detection logicNishanth Menon2016-03-145-120/+60
| | | | | | | | | | Use the generic EEPROM detection logic instead of duplicating the AM eeprom logic. Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Steven Kipisz <s-kipisz2@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: omap-common: Add standard access for board description EEPROMLokesh Vutla2016-03-145-1/+408
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several TI EVMs have EEPROM that can contain board description information such as revision, DDR definition, serial number, etc. In just about all cases, these EEPROM are on the I2C bus and provides us the opportunity to centralize the generic operations involved. The on-board EEPROM on the BeagleBone Black, BeagleBone, AM335x EVM, AM43x GP EVM, AM57xx-evm, BeagleBoard-X15 share the same format. However, DRA-7* EVMs, OMAP4SDP use a modified format. We hence introduce logic which is generic between these platforms without enforcing any specific format. This allows the boards to use the relevant format for operations that they might choose. This module will compile for all TI SoC based boards when CONFIG_TI_I2C_BOARD_DETECT is enabled to have optimal build times for platforms that require this support. It is important to note that this logic is fundamental to the board configuration process such as DDR configuration which is needed in SPL, hence cannot be part of the standard u-boot driver model (which is available later in the process). Hence, to aid efficiency, the eeprom contents are copied over to SRAM scratchpad memory area at the first invocation to retrieve data. To prevent churn with cases such as DRA7, where eeprom format maybe incompatible, we introduce a generic common format in eeprom which is made available over accessor functions for usage. Special handling for BBG1 EEPROM had to be introduced thanks to the weird eeprom rev contents used. The follow on patches introduce the use of this library for AM335x, AM437x, and AM57xx. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Steve Kipisz <s-kipisz2@ti.com> Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: OMAP4/5: Centralize gpi2c_initKipisz, Steven2016-03-143-2/+3
| | | | | | | | | | Centralize gpi2c_init into omap_common from the sys_proto header so that the information can be reused across SoCs. Signed-off-by: Steve Kipisz <s-kipisz2@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: OMAP4/5: Centralize early clock initializationKipisz, Steven2016-03-144-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | Early clock initialization is currently done in two stages for OMAP4/5 SoCs. The first stage is the initialization of console clocks and then we initialize basic clocks for functionality necessary for SoC initialization and basic board functionality. By splitting up prcm_init and centralizing this clock initialization, we setup the code for follow on patches that can do board specific initialization such as board detection which will depend on these basic clocks. As part of this change, since the early clock initialization is centralized, we no longer need to expose the console clock initialization. NOTE: we change the sequence slightly by initializing console clocks timer after the io settings are complete, but this is not expected to have any functioanlity impact since we setup the basic IO drive strength initialization as part of do_io_settings. Signed-off-by: Steve Kipisz <s-kipisz2@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* spl: Support loading a FIT from MMCSimon Glass2016-03-141-18/+57
| | | | | | | Detect a FIT when loading from MMC and handle it using the new FIT SPL support. Signed-off-by: Simon Glass <sjg@chromium.org>
* spl: Add a way to specify a list of device trees to includeSimon Glass2016-03-142-1/+19
| | | | | | | | | | | | | When building a FIT, more than one device tree can be included. The board can select (at run-time) the one that it wants. Add a Kconfig option to allow the list of devices trees (supported by the board) to be specified. When using SPL_LOAD_FIT, build u-boot.img in FIT format instead of the legacy image format. Include all the listed device tree files in this FIT. Signed-off-by: Simon Glass <sjg@chromium.org>
* spl: Add an option to load a FIT containing U-BootSimon Glass2016-03-145-1/+225
| | | | | | | | This provides a way to load a FIT containing U-Boot and a selection of device tree files. The board can select the correct device tree by probing the hardware. Then U-Boot is started with the selected device tree. Signed-off-by: Simon Glass <sjg@chromium.org>
* spl: Add a way for boards to select which device tree to loadSimon Glass2016-03-141-0/+13
| | | | | | | | SPL calls this function with each device tree it can find in the FIT. The board should implement this function, using whatever hardware detection it can muster to determine the correct device tree. Signed-off-by: Simon Glass <sjg@chromium.org>
* mkimage: Bring data into the FIT before processingSimon Glass2016-03-141-0/+97
| | | | | | | | Since we now support data outside the FIT image, bring it into the FIT image first before we do any processing. This avoids adding new functionality to the core FIT code for now. Signed-off-by: Simon Glass <sjg@chromium.org>
* mkimage: Support placing data outside the FITSimon Glass2016-03-145-2/+142
| | | | | | | | | | | | | | | | | | | One limitation of FIT is that all the data is 'inline' within it, using a 'data' property in each image node. This means that to find out what is in the FIT it is necessary to scan the entire file. Once loaded it can be scanned and then the images can be copied to the correct place in memory. In SPL it can take a significant amount of time to copy images around in memory. Also loading data that does not end up being used is wasteful. It would be useful if the FIT were small, acting as a directory, with the actual data stored elsewhere. This allows SPL to load the entire FIT, without the images, then load the images it wants later. Add a -E option to mkimage to request that it output an 'external' FIT. Signed-off-by: Simon Glass <sjg@chromium.org>
* mkimage: Support adding device tree files to a FITSimon Glass2016-03-144-10/+146
| | | | | | | | | | | To make the auto-FIT feature useful we need to be able to provide a list of device tree files on the command line for mkimage to add into the FIT. Add support for this feature. So far there is no support for hashing or verified boot using this method. For those cases, a .its file must still be provided. Signed-off-by: Simon Glass <sjg@chromium.org>
* mkimage: Support automatic creating of a FIT without a .itsSimon Glass2016-03-144-6/+235
| | | | | | | | | | | | | | | | | | At present, when generating a FIT, mkimage requires a .its file containing the structure of the FIT and referring to the images to be included. Creating the .its file is a separate step that makes it harder to use FIT. This is not required for creating legacy images. Often the FIT is pretty standard, consisting of an OS image, some device tree files and a single configuration. We can handle this case automatically and avoid needing a .its file at all. To start with, support automatically generate the FIT using a new '-f auto' option. Initially this only supports adding a single image (e.g. a linux kernel) and a single configuration. Signed-off-by: Simon Glass <sjg@chromium.org>
* image: Add functions to obtain short namesSimon Glass2016-03-142-4/+49
| | | | | | | Sometimes it is useful to obtain the short name for an Operating System, architecture or compression mechanism. Provide functions for this. Signed-off-by: Simon Glass <sjg@chromium.org>
* tools: Add a function to obtain the size of a fileSimon Glass2016-03-143-2/+36
| | | | | | | This will be used in mkimage when working out the required size of the FIT based on the files to be placed into it. Signed-off-by: Simon Glass <sjg@chromium.org>
* mkimage: Allow a FIT to include an image of any typeSimon Glass2016-03-142-5/+29
| | | | | | | | | | At present FIT images are set up by providing a device tree source file which is a file with a .its extension. We want to support automatically creating this file based on the image supplied to mkimage. This means that even though the final file type is always IH_TYPE_FLATDT, the image inside may be something else. Signed-off-by: Simon Glass <sjg@chromium.org>
* tools: Include fdt_sw.o in libfdt for mkimageSimon Glass2016-03-141-1/+1
| | | | | | | At present this file is omitted. It is used to build up a binary device tree. We plan to do this in mkimage, so include this file in the build. Signed-off-by: Simon Glass <sjg@chromium.org>
* sunxi: Display the board model on start-upSimon Glass2016-03-141-0/+1
| | | | | | | It is useful to know which sunxi board you are booting. Display this on start-up to avoid confusion. Signed-off-by: Simon Glass <sjg@chromium.org>
* fdt: Allow libfdt to be used in SPLSimon Glass2016-03-147-27/+23
| | | | | | | | | | | | Add an option to enable libfdt in SPL. This can be useful when decoding FIT files in SPL. We need to make sure this option is not enabled in SPL by this change. Also this option needs to be enabled in host builds. Si add a new IMAGE_USE_LIBFDT #define which can be used in files that are built on the host but must also build for U-Boot and SPL. Signed-off-by: Simon Glass <sjg@chromium.org>
* fdt: Adjust DEFAULT_DEVICE_TREE to device on OF_CONTROLSimon Glass2016-03-141-0/+1
| | | | | | This option has no meaning without OF_CONTROL, so add a dependency. Signed-off-by: Simon Glass <sjg@chromium.org>
* Kconfig: Move CONFIG_FIT and related options to KconfigSimon Glass2016-03-14791-708/+1679
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are already two FIT options in Kconfig but the CONFIG options are still in the header files. We need to do a proper move to fix this. Move these options to Kconfig and tidy up board configuration: CONFIG_FIT CONFIG_OF_BOARD_SETUP CONFIG_OF_SYSTEM_SETUP CONFIG_FIT_SIGNATURE CONFIG_FIT_BEST_MATCH CONFIG_FIT_VERBOSE CONFIG_OF_STDOUT_VIA_ALIAS CONFIG_RSA Unfortunately the first one is a little complicated. We need to make sure this option is not enabled in SPL by this change. Also this option is enabled automatically in the host builds by defining CONFIG_FIT in the image.h file. To solve this, add a new IMAGE_USE_FIT #define which can be used in files that are built on the host but must also build for U-Boot and SPL. Note: Masahiro's moveconfig.py script is amazing. Signed-off-by: Simon Glass <sjg@chromium.org> [trini: Add microblaze change, various configs/ re-applies] Signed-off-by: Tom Rini <trini@konsulko.com>
* Move CONFIG_OF_LIBFDT to KconfigSimon Glass2016-03-14881-257/+699
| | | | | | Move this option to Kconfig and tidy up existing boards. Signed-off-by: Simon Glass <sjg@chromium.org>
* freescale: Remove CONFIG_DM from header filesSimon Glass2016-03-1448-8/+92
| | | | | | | | | Kconfig options must defined in the defconfig files. Since RSA_SOFTWARE_EXP relies on CONFIG_DM, unless it is set in kconfig we cannot enable RSA. Remove the hacks which enable CONFIG_DM in header files and update the defconfig. Signed-off-by: Simon Glass <sjg@chromium.org>
* Correct defconfig orderingSimon Glass2016-03-1441-113/+89
| | | | | | | | Various boards have the wrong Kconfig ordering now. To avoid a misleading diff in the next patch, reorder the configuration correctly. Signed-off-by: Simon Glass <sjg@chromium.org>
* libfdt: Add a function to write a property placeholderSimon Glass2016-03-142-2/+30
| | | | | | | | | | | | | The existing function to add a new property to a tree being built requires that the entire contents of the new property be passed in. For some applications it is more convenient to be able to add the property contents later, perhaps by reading from a file. This avoids double-buffering of the contents. Add a new function to support this and adust the existing fdt_property() to use it. Signed-off-by: Simon Glass <sjg@chromium.org>
* mkimage: Make 'params' staticSimon Glass2016-03-141-1/+1
| | | | | | This is not used outside mkimage.c, so make this variable static. Signed-off-by: Simon Glass <sjg@chromium.org>
* mkimage: Show an error message when usage() is calledSimon Glass2016-03-141-8/+9
| | | | | | | Sometimes incorrect arguments are supplied but the reason is not obvious to the user. Add some helpful messages. Signed-off-by: Simon Glass <sjg@chromium.org>
* mkimage: Move usage() up to the topSimon Glass2016-03-141-39/+42
| | | | | | | To avoid a forward declaration, move the usage() function higher in the file. Signed-off-by: Simon Glass <sjg@chromium.org>
* mkimage: Sort the option processing code by optionSimon Glass2016-03-141-25/+25
| | | | | | | Adjust the code so that option alphabetical order matches the order in the switch() statement. This makes it easier to find options. Signed-off-by: Simon Glass <sjg@chromium.org>
* mkimage: Convert to use getopt()Simon Glass2016-03-141-132/+101
| | | | | | | | | The current way of parsing arguments is a bit clumsy. It seems better to use getopt() which is commonly used for this purpose. Convert the code to use getopt() and make a few minor adjustments as needed. Signed-off-by: Simon Glass <sjg@chromium.org>
* mkimage: Move argument processing into its own functionSimon Glass2016-03-141-24/+32
| | | | | | | At present main() is very long. Split out the argument processing to make it easier to follow. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Add support for environment file in EXT4.Stuart Longland2016-03-143-1/+131
| | | | | | This is an enhancement that permits storing the environment file on an EXT4 partition such as the root filesystem. It is based on the existing FAT environment file code.
* Prepare v2016.03Tom Rini2016-03-141-1/+1
| | | | Signed-off-by: Tom Rini <trini@konsulko.com>
* mx6slevk: Fix the power up of the Ethernet PHYFabio Estevam2016-03-131-5/+4
| | | | | | | | | GPIO4_21 is the LAN8720 power pin, not the LAN8720 reset pin. Fix that, so that we can have Ethernet functional again. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
* sf: Correct data types in stm_is_locked_sr()Marek Vasut2016-03-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | The stm_is_locked_sr() function is picked from Linux kernel. For reason unknown, the 64bit data types used by the function and present in Linux were replaced with 32bit unsigned ones, which causes trouble. The testcase performed was done using ST M25P80 chip. The command used was: => sf protect unlock 0 0x10000 The call chain starts in stm_unlock(), which calls stm_is_locked_sr() with negative ofs argument. This works fine in Linux, where the "ofs" is loff_t, which is signed long long, while this fails in U-Boot, where "ofs" is u32 (unsigned int). Because of this signedness problem, the expression past the return statement to be incorrectly evaluated to 1, which in turn propagates back to stm_unlock() and results in -EINVAL. The correction is very simple, just use the correctly sized data types with correct signedness in the function to make it work as intended. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Jagan Teki <jteki@openedev.com>
* dm: ti_qspi: Fix conversion of address to a pointerLokesh Vutla2016-03-121-3/+7
| | | | | | | | | | | | | | TI QSPI driver directly typecasts fdt_addr_t to a pointer. This is not strictly correct, as it gives a build warning when fdt_addr_t is u64. So, use map_physmem for a proper typecasts. This is inspired by commit 167efe01bc5a9 ("dm: ns16550: Use an address instead of a pointer for the uart base") Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Jagan Teki <jteki@openedev.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Mugunthan V N <mugunthanvnm@ti.com>
* exynos5: common: Enable CONFIG_USB_ETHER_RTL8152 ethernet supportAnand Moon2016-03-111-0/+1
| | | | | | | | | | | | Enable CONFIG_USB_ETHER_RTL8152 support for Odroid XU4 which has support for RTL8153-CG gigabit Ethernet adapter, connected over USB 3.0. commit 9dc8ba19c50fc0b1623c654bcfe6caa903a4c36c added support for Realtek 8152/8153 driver. Signed-off-by: Anand Moon <linux.amoon@gmail.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
OpenPOWER on IntegriCloud