summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-01-12mmc: make mmc_set_ios() return statusKishon Vijay Abraham I
set_ios callback has a return value of 'int' but the mmc_set_ios() function ignore this. Modify mmc_set_ios() and the callers of mmc_set_ios() to to return the error status. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-01-12mmc: refactor MMC startup to make it easier to support new modesJean-Jacques Hiblot
The MMC startup process currently handles 4 modes. To make it easier to add support for more modes, let's make the process more generic and use a list of the modes to try. The major functional change is that when a mode fails we try the next one. Not all modes are tried, only those supported by the card and the host. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-01-12mmc: refactor SD startup to make it easier to support new modesJean-Jacques Hiblot
The SDcard startup process currently handles only 2 modes. To make it easier to add support for more modes, let's make the process more generic and use a list of the modes to try. The major functional change is that when a mode fails we try the next one. Not all modes are tried, only those supported by the card and the host. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-01-12cmd: mmc: display the mode name and current bus speed in the mmc infoJean-Jacques Hiblot
Display the mode name when the user execute 'mmc info'. Also instead of displaying tran_speed, display the actual bus speed. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-01-12mmc: use mmc modes to select the correct bus speedJean-Jacques Hiblot
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-01-12mmc: Add a function to dump the mmc capabilitiesJean-Jacques Hiblot
This adds a simple helper function to display information (bus width and mode) based on a capability mask. Useful for debug. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2018-01-12mmc: introduce mmc modesJean-Jacques Hiblot
no functionnal changes. In order to add the support for the high speed SD and MMC modes, it is useful to track this information. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-01-12mmc: add a function to read and test the ext csd (mmc >= 4)Jean-Jacques Hiblot
This will be reused later in the selection of high speed and ddr modes. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-01-12mmc: make ext_csd part of struct mmcJean-Jacques Hiblot
The ext csd is used for comparison many times. Keep a reference content of the ext csd in the struct mmc to avoid reading multiple times Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-01-12mmc: move the MMC startup for version above v4.0 in a separate functionJean-Jacques Hiblot
no functionnal change. This is only to further reduce the size o mmc_startup(). Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-01-12mmc: split mmc_startup()Jean-Jacques Hiblot
No functionnal change here. The function is really big and can be split. The part related to bus configuration are put in 2 separate functions: one for MMC and one for SD. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-01-12mmc: dm: get the IO-line and main voltage regulators from the dtsJean-Jacques Hiblot
Get a reference to the regulator devices from the dts and store them in the struct mmc for later use. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2018-01-12mmc: sdhci: do not compare pointer to 0Heinrich Schuchardt
data is defined as struct mmc_data *data. So it should not be compared to 0. Problem identified with Coccinelle. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2018-01-12mmc: sdhci: don't clear SDHCI_INT_STATUS register during CMD_INHIBITJorge Ramirez-Ortiz
Fixes emmc initialization regression on the db410c platform. Clearing this register while SDHCI_PRESENT_STATE reports SDHCI_CMD_INHIBIT leads to undefined behaviour on the db410c. When commit 7dde50 was merged (mmc: sdhci: Wait for SDHCI_INT_DATA_END when transferring), SDHCI transfers transitioned to wait for bit SDHCI_INT_DATA_END before flagging transfers done. Without this patch, the db410 platform fails to initialize its eMMC due to all of its transfers timing out (SDHCI_INT_DATA_END is never raised after all the blocks have been transferred). Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
2018-01-12mmc: sanitize includes for DM i2cFelix Brack
This patch fixes some warnings when building boards that do not define DM_I2C_COMPAT i.e. boards that entirely rely on the new i2c layer. Signed-off-by: Felix Brack <fb@ltec.ch>
2018-01-12drivers: mmc: Avoid memory leak in case of failureSuniel Mahesh
priv pointer should be freed before returning with an error value from exynos_dwmci_get_config(). Signed-off-by: Suniel Mahesh <sunil.m@techveda.org> Signed-off-by: Raghu Bharadwaj <raghu@techveda.org>
2018-01-12drivers: mmc: Change buffer type in ALLOC_CACHE_ALIGN_BUFFER macroSuniel Mahesh
__be32_to_cpu() accepts argument of type __be32. This patch changes type of the buffer in ALLOC_CACHE_ALIGN_BUFFER macro to __be32, which is then passed to __be32_to_cpu(). This prevents sparse build warnings. drivers/mmc/mmc.c: warning: cast to restricted __be32 Signed-off-by: Suniel Mahesh <sunil.m@techveda.org> Signed-off-by: Karthik Tummala <karthik@techveda.org>
2018-01-08Prepare v2018.01Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2018-01-08Merge git://git.denx.de/u-boot-imxTom Rini
2018-01-08mtd: nand: mxs_nand_spl: Remove nand size printJagan Teki
It is not much needed to print nand size in SPL during nand boot, and most of nand spl drivers doesn't print the same. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2018-01-08board: engicam: Fix to remove legacy board/icorem6_rqsJagan Teki
board/icorem6_rqs/ is forgot to remove while moving common board files together in (sha1: 52aaddd6f415397bb2eae0d68a8cc1c5c4a98bb3) "i..MX6: engicam: Add imx6q/imx6ul boards for existing boards" Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2018-01-08imx: initialize and use generic timer on i.MX 6UL/ULLStefan Agner
The i.MX 6UL/ULL feature a Cortex-A7 CPU which suppor the ARM generic timer. This change makes use of the ARM generic timer in U-Boot. This is crucial to make the ARM generic timers usable in Linux since timer_init() initalizes the system counter module, which is necessary to use the generic timers CP15 registers. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
2018-01-08imx: introduce CONFIG_GPT_TIMERStefan Agner
Introduce a new config symbol to select the i.MX General Purpose Timer (GPT). Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
2018-01-08imx: move CONFIG_SYSCOUNTER_TIMER to KconfigStefan Agner
Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
2018-01-08Merge git://git.denx.de/u-boot-x86Tom Rini
2018-01-08crypto/fsl: fix BLOB encapsulation and decapsulationClemens Gruber
The blob_encap and blob_decap functions were not flushing the dcache before passing data to CAAM/DMA and not invalidating the dcache when getting data back. Therefore, blob encapsulation and decapsulation failed with errors like the following due to data cache incoherency: "40000006: DECO: desc idx 0: Invalid KEY command" To ensure coherency, we require the key_mod, src and dst buffers to be aligned to the cache line size and flush/invalidate the memory regions. The same requirements apply to the job descriptor. Tested on an i.MX6Q board. Reviewed-by: Sumit Garg <sumit.garg@nxp.com> Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
2018-01-08x86: tangier: Add Bluetooth to ACPI tableAndy Shevchenko
As defined on reference board followed by Intel Edison a Bluetooth device is attached to HSU0, i.e. PCI 0000:04.1. Describe it in ACPI accordingly. Note, we use BCM2E95 ID here as one most suitable for such device based on the description in commit message of commit 89ab37b489d1 ("Bluetooth: hci_bcm: Add support for BCM2E95 and BCM2E96") in the Linux kernel source tree. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-01-08x86: tangier: Use actual GPIO hardware numbersAndy Shevchenko
The recent commit 03c4749dd6c7 ("gpio / ACPI: Drop unnecessary ACPI GPIO to Linux GPIO translation") in the Linux kernel reveals the issue we have in ACPI tables here, i.e. we must use hardware numbers for GPIO resources and, taking into consideration that GPIO and pin control are *different* IPs on Intel Tangier, we need to supply numbers properly. Besides that, it improves user experience since the official documentation for Intel Edison board is referring to GPIO hardware numbering scheme. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-01-08x86: Move commands from under arch/x86 to cmd/x86/Tom Rini
We only need to compile and link these files when building for full U-Boot. Move them to under cmd/x86/ to make sure they aren't linked in and undiscarded due to u_boot_list_2_cmd_* being included). Cc: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2018-01-04mx6ull: Handle the CONFIG_MX6ULL cases correctlyFabio Estevam
Since commit 051ba9e082f7 ("Kconfig: mx6ull: Deselect MX6UL from CONFIG_MX6ULL") CONFIG_MX6ULL does not select CONFIG_MX6UL anymore, so take this into consideration in all the checks for CONFIG_MX6UL. This fixes a boot regression. Reported-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Stefan Agner <stefan@agner.ch> Tested-by: Breno Lima <breno.lima@nxp.com> Tested-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Stefano Babic <sbabic@denx.de> Tested-by: Jörg Krause <joerg.krause@embedded.rocks>
2018-01-03Merge git://git.denx.de/u-boot-rockchipTom Rini
2018-01-03ARM: imx: cm_fx6: env: don't run boot scripts twiceChristopher Spinrath
Boot scripts located in the root directory of the first partition of USB, mmc, and SATA drives are executed twice: first by the distro boot command and then by the legacy boot command. This may have weird side effects if those scripts only change or extend the environment (including parts of the boot command itself). Removing the script execution from the legacy boot command has its own caveats. For instance, the distro boot command may execute the boot.scr on the mmc drive, then the boot.scr on the SATA drive, before the legacy boot command actually boots from the mmc drive. However, the current behavior would only execute the boot.scr once more before the actual boot, but it does not prevent the script located on the SATA drive from being executed, and thus, both scripts from being mixed up. Considering that the legacy boot command is only in place to boot old (standard) installations, let's go with the resolution having less custom code and remove the script execution from the legacy boot command. Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
2018-01-03ARM: imx: cm_fx6: env: support distro boot commandChristopher Spinrath
The current default environment of the cm_fx6 is not suitable for booting modern distributions. Instead of extending the custom environment, let's use the distro boot command, which has been developed for precisely this use case. If the distro boot command fails, fall back to the old behavior (except for USB drives where the old behaviour is completely covered by the distro boot command). That way it is still possible to create "rescue SD cards" for old installations (e.g. if one messes up the on-flash environment). Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
2018-01-03ARM: imx: cm_fx6: env: use standard variablesChristopher Spinrath
In preparation for supporting the distro boot command, introduce the standard variables for specifying load addresses, which are documented in README and doc/README.distro, and replace the custom variables used so far with them. Since the current address layout disregards an address for an initramfs, also switch to the load addresses used and proven by other imx6 boards (e.g. the wandboard and nitrogen6x), instead of going on with our own way. Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
2018-01-03rockchip: firefly-rk3399: enable SPL_ATF_NO_PLATFORM_PARAMPhilipp Tomsich
The Rockchip-released ATF for the Firefly apparently (i.e. Kever reported this) does not tolerate a FDT being passed as the platform parameter and will run into a hard stop. To work around this limitation in the ATF parameter handling, we enable SPL_ATF_NO_PLATFORM_PARAM (which will force passing NULL for the platform parameters). Note that this only affects this platform, as the ATF releases for the RK3368 and RK3399 have always either ignored the platform parameter (i.e. before the FDT-based parameters were supported) or support receiving a pointer to a FDT. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2018-01-03spl: atf: add SPL_ATF_NO_PLATFORM_PARAM optionPhilipp Tomsich
While we expect to call a pointer to a valid FDT (or NULL) as the platform parameter to an ATF, some ATF versions are not U-Boot aware and have an insufficiently robust (or an overzealour) parameter validation: either way, this may cause a hard-stop with uncooperative ATF versions. This change adds the option to suppress passing a platform parameter and will always pass NULL. Debug output from ATF w/ this option disabled (i.e. default): INFO: plat_param_from_bl2: 0x291450 Debug output from ATF w/ this option enabled: INFO: plat_param_from_bl2: 0 Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2018-01-03imx: spl: Fix NAND bootmode detectionEran Matityahu
commit 20f14714169 ("imx: spl: Update NAND bootmode detection bit") broke the NAND bootmode detection by checking if BOOT_CFG1[7:4] == 0x8 for NAND boot mode. This commit essentially reverts it, while using the IMX6_BMODE_* macros that were introduced since. Tables 8-7 & 8-10 from IMX6DQRM say the NAND boot mode selection is done when BOOT_CFG1[7] is 1, but BOOT_CFG1[6:4] is not necessarily 0x0 in this case. Actually, NAND boot mode is when 0x8 <= BOOT_CFG1[7:4] <= 0xf, like it was in the code before. Signed-off-by: Eran Matityahu <eran.m@variscite.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Jagan Teki <jagan@openedev.com> Cc: Tim Harvey <tharvey@gateworks.com>
2018-01-03mx6: Add board mx6memcal for use in validating DDREric Nelson
This is a virtual "board" that uses configuration files and Kconfig to define the memory layout used by a real board during the board bring-up process. It generates an SPL image that can be loaded using imx_usb or SB_LOADER.exe. When run, it will generate a set of calibration constants for use in either or both a DCD configuration file for boards that use u-boot.imx or struct mx6_mmdc_calibration for boards that boot via SPL. In essence, it is a configurable, open-source variant of the Freescale ddr-stress tool. https://community.nxp.com/docs/DOC-105652 File mx6memcal_defconfig configures the board for use with mx6sabresd or mx6qsabreauto. Signed-off-by: Eric Nelson <eric@nelint.com> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
2018-01-03video: Support multiple lines version string displayPeng Fan
The calculation of left space for version string is not correct, should use VIDEO_COLS not VIDEO_LINE_LEN / 2, otherwise we will get larger space than actual have and cause string to overlay logo picture. Also current version string display only supports two lines words at max. This also causes overlay when the LCD pixel column size is not enough. Signed-off-by: Peng Fan <peng.fan@nxp.com> Tested-by: Anatolij Gustschin <agust@denx.de>
2018-01-03video: ipu: Fix dereferencing NULL pointer problemPeng Fan
The clk_set_rate function dereferences the clk pointer without checking whether it is NULL. This may cause problem when clk is NULL. Signed-off-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
2018-01-02rockchip: board: lion-rk3368: reduce env-size default to 8KiBPhilipp Tomsich
We want to have the same configuration defaults for the RK3368-uQ7 as for the RK3399-Q7: this change reduces the default env-size to 8KiB to ensure that it does not overlap the boot-payload on SD/MMC configurations. References: commit fe529e6597c0 ("rockchip: rk3399-puma: reduce env size to 8kiB") Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2018-01-02boards: amlogic: khadas-vim: Typo fixupNeil Armstrong
Khadas VIM is an Open Source DIY Box manufactured by Shenzhen Wesion NOT 'Tomato' The fix was provided by Khadas Team member 'numbqq'. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-01-01Prepare v2018.01-rc3Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2018-01-01Merge branch 'master' of git://git.denx.de/u-boot-rockchipTom Rini
2018-01-01power: tps65910: replace error() by pr_err()Felix Brack
The patch replaces the former error() by the new pr_err(). This makes the TPS65910 driver conform to Masahiro's patch 'treewide:replace with error() with pr_err()' introduced October 2017. Signed-off-by: Felix Brack <fb@ltec.ch> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-01-01configs: am335x_boneblack: Bring back missed bootcmdSam Protsenko
Commit b6251db8c3f0 ("Kconfig: Introduce USE_BOOTCOMMAND and migrate BOOTCOMMAND") removed CONFIG_BOOTCOMMAND option from include/configs/am335x_evm.h file. But that option wasn't added to defconfig files for BeagleBone Black board. Because of this we can't boot Linux from SD card using just "run bootcmd", getting next error: ** File not found /boot/undefined ** That's because "fdtfile" variable has "undefined" value by default, and "bootcmd" doesn't call "run findfdt" command, which assigns "fdtfile" to correct device tree file for current board name (obtained from EEPROM). So we are forced to either call "run findfdt" command manually, or assign manually "fdtfile=am335x-boneblack.dtb" (e.g. in uEnv.txt file). Bring back CONFIG_BOOTCOMMAND to BBB defconfigs so that we can boot Linux rootfs from SD card automatically without any addition actions. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2018-01-01dm: core: remove orphaned parameter description in platdata.hHeinrich Schuchardt
struct driver_info has no field 'flags'. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-01-01ARM: omap3: evm: Refactor 'board_eth_init'Derald D. Woods
This commit clears 'ethaddr' before calling 'smc911x_initialize' to allow the SROM MAC address to be assigned properly. Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
2018-01-01ARM: dts: omap3-evm: Enable DM and devicetree for TMDSEVM{3530, 3730}Derald D. Woods
This commit updates the configuration files needed to support OF_CONTROL on the OMAP3 EVM baseboard. Additionally: - CONFIG_SYS_THUMB_BUILD is enabled - CONFIG_SPL_ENV_SUPPORT is enabled Tested using GCC 7.2.0 [--with-float=hard --with-mode=thumb]. Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
2018-01-01ARM: dts: omap3-evm: Add support for TMDSEVM{3530, 3730}Derald D. Woods
This commit adds OMAP3 EVM devicetree files from Linux v4.15-rc3. Note that this is the first addition of OMAP34XX devicetree files. Signed-off-by: Derald D. Woods <woods.technical@gmail.com>