summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* fs/fat: introduce new director iteratorsRob Clark2017-09-152-3/+360
| | | | | | | | Untangle directory traversal into a simple iterator, to replace the existing multi-purpose do_fat_read_at() + get_dentfromdir(). Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Łukasz Majewski <lukma@denx.de>
* fs/fat: split out helper to init fsdataRob Clark2017-09-152-30/+44
| | | | | | | | Want to re-use this in fat dirent iterator in next patch. Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Łukasz Majewski <lukma@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* Merge git://git.denx.de/u-boot-ubiTom Rini2017-09-151-0/+5
|\
| * cmd: set filesize variable in ubi readHolger Dengler2017-09-121-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After a successful read of a UBI volume, the variable filesize is set to the number of read bytes. To boot linux with a raw initramfs/initrd, you must specify the exact size of the initramfs/initrd image in boot command. If the initramfs/inird is read from UBI volume, $filesize is required to access the number of read bytes. Example: ubi read ${loadaddr} kernelvol ubi read ${fdtaddr} dtbvol ubi read ${initrd_addr} initrdvol bootz ${loadaddr} ${initrd_addr}:${filesize} ${fdt_addr} Signed-off-by: Holger Dengler <dengler@linutronix.de> Reviewed-by: Heiko Schocher <hs@denx.de>
* | Merge git://git.denx.de/u-boot-i2cTom Rini2017-09-151-1/+39
|\ \
| * | i2c: muxes: pca954x: Add support for GPIO reset lineMoritz Fischer2017-09-131-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for GPIO reset lines matching the common linux "reset-gpios" devicetree binding. Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com> Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | test/py: u_boot_console_base.py: fix typoHeinrich Schuchardt2017-09-151-1/+1
| | | | | | | | | | | | | | | | | | run_command does not have a parameter wait_for_each. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* | | checkpatch.pl: Add warning for new __packed additionsHeinrich Schuchardt2017-09-151-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While there are valid reasons to use __packed, often the answer is that you should be doing something else here instead. This reintroduces the changes of f503cc49a570 (Add warning for new __packed additions) Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* | | cmd: blk: Use LBAFU in the common block commandBin Meng2017-09-151-6/+4
| | | | | | | | | | | | | | | | | | | | | There is already a macro LBAFU to aid formatted print with lbaint_t variables. Let's use it in the common block command codes. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
* | | blk: Remove various places that do flush cache after readBin Meng2017-09-158-31/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All these places seem to inherit the codes from the MMC driver where a FIXME was put in the comment. However the correct operation after read should be cache invalidate, not flush. The underlying drivers should be responsible for the cache operation. Remove these codes completely. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: York Sun <york.sun@nxp.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: York Sun <york.sun@nxp.com>
* | | checkpatch: update from Linux v4.13-rc6Heinrich Schuchardt2017-09-142-422/+2224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Checkpatch produces the following warning: Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through in regex; marked by <-- HERE in m/^(\+.*(?:do|\))){ <-- HERE / at scripts/checkpatch.pl line 3348. The curent checkpatch of the Linux kernel corrects this bug and many others. It provides improved colored output. So replace checkpatch by the current Linux version. Add an empty file scripts/const_structs.checkpatch. We can later fill it according to our needs. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* | | lib: strto: fix incorrect handling of specified baseRob Clark2017-09-141-26/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The strto functions should honor the specified base (if non-zero) rather than permitting a hex or octal string when the user wanted (for example) base 10. This has been fixed somewhere along the way in the upstream linux kernel src tree, at some point after these was copied in to u-boot. And also in a way that duplicates less code. So port _parse_integer_fixup_radix() to u-boot. Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | add pytests for 'gpt rename' and 'gpt swap'Alison Chaiken2017-09-142-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add unit tests for the 'gpt rename' and 'gpt swap' commands that rely on the block device created by test/py/make_test_disk.py. Add CONFIG_CMD_GPT_RENAME to the sandbox_defconfig. Remove the testdisk.raw test device at the end of the tests. Signed-off-by: Alison Chaiken <alison@peloton-tech.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | add pytests for 'gpt guid' command in sandboxAlison Chaiken2017-09-141-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | Run unit tests for the 'gpt guid' command, making use of the block device created by test/py/make_test_disk.py. Remove this device at the end of the tests. Signed-off-by: Alison Chaiken <alison@peloton-tech.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | GPT: create block device for sandbox testingAlison Chaiken2017-09-142-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | Provide a Python function that creates a small block device for the purpose of testing the cmd/gpt.c or cmd/part.c functions in the u-boot sandbox. Signed-off-by: Alison Chaiken <alison@peloton-tech.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | ARM: DRA7: Cleanup old pinctrl macrosSuman Anna2017-09-141-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 6ae4c3efbd62 ("ARM: DRA7: Add pinctrl register definitions") has added new macros for pinmux configuration in line with the kernel definitions. Cleanup the old pinctrl macros from the common header file so that they are not used by any new boards. Signed-off-by: Suman Anna <s-anna@ti.com>
* | | arm: am57xx: cl-som-am57x: Use new pinctrl macrosSuman Anna2017-09-141-52/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 6ae4c3efbd62 ("ARM: DRA7: Add pinctrl register definitions") has added new macros for pinmux configuration in line with the kernel definitions. Fixup the current pinctrl data for the CompuLab CL-SOM-AM57x board to use these new macros to facilitate the removal of the old macros. NOTE: The PEN and PDIS macro values used previously were actually defined inversely, a value of 1 in bit position 16 actually means that the internal pullup/pulldown is disabled and not enabled as inferred by PEN. So, previous pinmux config data such as (PDIS | PTU) is confusing as it actually was meant for enabling internal pullup. The data is fixed up only to be equivalent to the previous data. Signed-off-by: Suman Anna <s-anna@ti.com>
* | | configs: at91: Remove CONFIG_SYS_EXTRA_OPTIONS assignmentWenyou Yang2017-09-1448-135/+102
| | | | | | | | | | | | | | | | | | | | | | | | To remove the assignment of CONFIG_SYS_EXTRA_OPTIONS option, which is deprecated, use the CONFIG_XXXX_BOOT options to indicate the boot media, and the SoC is selected by the board. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
* | | ARM: at91: spl: Add macro CONFIG_XXXX_BOOT supportWenyou Yang2017-09-141-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | Use the CONFIG_XXXX_BOOT to indicate the boot media, instead of the CONFIG_SYS_USE_XXXX option, which is declared by CONFIG_SYS_EXTRA_OPTIONS option. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
* | | ARM: at91: Remove hardware.h included in configsWenyou Yang2017-09-1416-39/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As said in READRE.kconfig, include/configs/*.h will be removed after all options are switched to Kconfig. As the first step, remove the follow line from include/configs/*.h. #include <asm/hardware.h> Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
* | | ARM: at91: Add the SoC options to KconfigWenyou Yang2017-09-141-27/+79
| | | | | | | | | | | | | | | | | | | | | | | | To prepare to remove the SoCs options such as SAMA5D2, SAMA5D3 and SAMA5D4 from the CONFIG_SYS_EXTRA_OPTIONS option which is deprecated, add the SoC options to Kconfig. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
* | | ARM: at91: Move CONFIG_AT91FAMILY option to KconfigWenyou Yang2017-09-1411-43/+3
| | | | | | | | | | | | | | | | | | | | | Move the CONFIG_AT91FAMILY option from include/mach/<soc>.h header file to Kconfig. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
* | | board: atmel: Add SAMA5D27 SOM1 EK boardWenyou Yang2017-09-1411-0/+809
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SAMA5D27-SiP (System in Package) integrates the SAMA5D2 with 1Gbit DDR2-SDRAM in a single package. The SAMA5D27 SOM1 embeds a 64Mbit QSPI flash, KSZ8081 Phy and Mac-address EEPROM. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | ARM: at91: Get the Chip ID of SAMA5D2 SiPWenyou Yang2017-09-142-3/+30
| | | | | | | | | | | | | | | | | | | | | | | | The SAMA5D2 SiP(System in Package) has different Chip IDs in the CHIPID and CHIP_EXID registers. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | ARM: at91: mach: Add missing defines of MPDDRCWenyou Yang2017-09-141-0/+4
| | | | | | | | | | | | | | | | | | | | | Add missing defines of Multiport DDR-SDRAM Controller (MPDDRC). Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | ARM: at91: spl: Add boot device for boot from QSPIWenyou Yang2017-09-141-0/+2
| | | | | | | | | | | | | | | | | | | | | Add the boot device for booting from the QSPI flash. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | board: sama5d2_xplained: Make SPL work on spiflashWenyou Yang2017-09-142-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because before switching to a lower clock source, we must switch the clock source first instead of last. So before configuring the PMC_MCKR register, invoke at91_mck_init_down() first. As said in datasheet, the the size of SPL must not exceed the maximum size allowed(64Kbytes). Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | ARM: at91: spl: Add mck function to lower rate while switchingWenyou Yang2017-09-142-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refer to the commit 70f8c8316ad(PMC: add new mck function to lower rate while switching) from AT91Bootstrap. While switching to a lower clock source, we must switch the clock source first instead of last. Otherwise, we could end up with too high frequency on internal bus and peripherals. This happens on SAMA5D2 as exitting from the ROM code. Add a function pmc_mck_init_down() to allow this sequence. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | ARM: at91: spl: Adjust switching to oscillator for SAMA5D2Wenyou Yang2017-09-142-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | As said in 29.5.7 section of SAMA5D2 datasheet, before switching to the crystal oscillator, a check must be carried out to ensure that the oscillator is present and that its freqency is valid. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | atmel: common: Add function to display via DM_VIDEO's APIWenyou Yang2017-09-143-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a function to display the company's logo and board information via the API from DM_VIDEO. This function can be shared by other atmel boards, so locate it in board/atmel/common folder. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | lib: at91: Add logo files used via API of DM_VIDEOWenyou Yang2017-09-147-0/+2440
| | | | | | | | | | | | | | | | | | | | | | | | In order to display the company's logo via the API of DM_VIDEO, and add the logo files of both Atmel and Microchip. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | ARM: dts: at91: sama5: Add the sfr nodeWenyou Yang2017-09-142-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For sama5d2, add the sfr node with syscon support. In order to access the SFR_UTMICKTRIM register for the utmi clock driver, add the phandle property for the utmi node to point to the sfr node. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
* | | clk: at91: utmi: Set the reference clock frequencyWenyou Yang2017-09-144-3/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, it is assumed that the UTMI clock is generated from a 12 MHz reference clock (MAINCK). If it's not the case, the FREQ field of the SFR_UTMICKTRIM has to be updated to generate the UTMI clock in the proper way. The UTMI clock has a fixed rate of 480 MHz. In fact, there is no multiplier we can configure. The multiplier is managed internally, depending on the reference clock frequency, to achieve the target of 480 MHz. The patch is cloned from the patch of mailing-list: [PATCH v2] clk: at91: utmi: set the mainck rate Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> [trini: Depend on SPL_DM] Signed-off-by: Tom Rini <trini@konsulko.com>
* | | clk: Kconfig: Add dependences of SPL_CLKWenyou Yang2017-09-141-1/+1
| | | | | | | | | | | | | | | | | | | | | The SPL_CLK config should depend on SPL && SPL_DM. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | Merge git://git.denx.de/u-boot-dmTom Rini2017-09-131-3/+25
|\ \ \
| * | | patman: Fix error when the email blacklist is missingSimon Glass2017-09-131-3/+25
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This section of the settings file may be missing. Handle that gracefully rather than emitting an error. Also update patman to write this section when a new settings file is created. Fixes: e11aa602 (patman: add support for omitting bouncing addresses) Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Chris Packham <judge.pckham@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
* | | ARM: davinci: Update da8xxevm MaintainersAdam Ford2017-09-131-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The e-mail addresses for DA8XXEVM BOARD and DA850_AM18XXEVM BOARD are invalid. Remove DA8XXEVM. Update DA850_AM18XXEVM to have me be the maintainer since I work for Logic PD and have access to OMAP-L138 and AM1808 EVM kits. Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* | | Convert CONFIG_EMIF4 et al to KconfigAdam Ford2017-09-1320-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This converts the following to Kconfig: CONFIG_EMIF4 CONFIG_SDRC Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefano Babic <sbabic@denx.de>
* | | Convert CONFIG_MAC_ADDR_IN_SPIFLASH et al to KconfigAdam Ford2017-09-135-5/+27
| | | | | | | | | | | | | | | | | | | | | | | | This converts the following to Kconfig: CONFIG_MAC_ADDR_IN_SPIFLASH CONFIG_MAC_ADDR_IN_EEPROM Signed-off-by: Adam Ford <aford173@gmail.com>
* | | davinci: da850evm: Make EEPROM MAC code configurableAdam Ford2017-09-131-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a check for CONFIG_MAC_ADDR_IN_EEPROM and a check for CONFIG_MAC_ADDR_IN_SPIFLASH, however some of the EEPROM related code wasn't encapsulated inside the #if defined statement so the EEPROM code could get executed even when it wasn't explicitly enabled or wanted. Signed-off-by: Adam Ford <aford173@gmail.com>
* | | include/configs: remove references to SMNAND_ENV_OFFSETAdam Ford2017-09-1315-44/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | In mancy cases both CONFIG_ENV_OFFSET and CONFIG_ENV_ADDR point to an otherwise-unused SMNAND_ENV_OFFSET. This patch will set both CONFIG_ENV_OFFSET and CONFIG_ENV_ADDR to whatever value was defined by SMNAND_ENV_OFFSET. Signed-off-by: Adam Ford <aford173@gmail.com>
* | | arm: dts: omap3: Re-sync DTS files with Linux 4.13-RC5Adam Ford2017-09-1313-3284/+3382
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DTS files had some spacing issues and they needed fixing. This pull re-sync's the OMAP3xx related DTS files with Linux 4.13-RC5. To keep the DTS and DTSI files clean and in sync with Linux, new u-boot.dtsi files are added. Signed-off-by: Adam Ford <aford173@gmail.com> V3: The resync broke card detect on MMC1 on Logic PD's Torpedo, so we add the cd-invert to the Torpedo's -u-boot.dtsi file. V2: Add the u-boot.dtsi files for OMAP3, OMAP36xx, and Torpedo Remove the need for the second patch in the series
* | | omap3: omap3_logic: Finish enabling fastboot on MUSBAdam Ford2017-09-132-1/+33
| | | | | | | | | | | | | | | | | | | | | | | | Either the USB and Fastboot were never finished, or somehow it got lost. This puts enough hooks back into omap3logic to enable fastboot and hopefully prepare it for Kconfig conversion. Signed-off-by: Adam Ford <aford173@gmail.com>
* | | ARM: dts: ethernut5: Fix the build warningWenyou Yang2017-09-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the building warning as below: ---8<---- Warning (reg_format): "reg" property in /i2c-gpio-0/pcf8563@50 has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1) Warning (avoid_default_addr_size): Relying on default #address-cells value for /i2c-gpio-0/pcf8563@50 Warning (avoid_default_addr_size): Relying on default #size-cells value for /i2c-gpio-0/pcf8563@50 --->8---- Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* | | serial: nulldev: Add nulldev serial driverKeng Soon Cheah2017-09-133-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some device the serial console's initialization cannot run early during the boot process. Hence, nulldev serial device is helpful on that situation. For example, if the serial module was implemented in FPGA. Serial initialization is prohibited to run until the FPGA was programmed. This commit is to adding nulldev serial driver. This will allows the default console to be specified as a nulldev. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Keng Soon Cheah <keng.soon.cheah@ni.com> Cc: Chen Yee Chew <chen.yee.chew@ni.com>
* | | spl: add newline in debug outputAnatolij Gustschin2017-09-131-2/+2
|/ / | | | | | | | | | | | | | | With debug enabled, SPL output following these debug prints is on the same line and it is hard to read. Fix it. Signed-off-by: Anatolij Gustschin <agust@denx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* | ARM: DRA72x: Add support for detection of DRA71x SR 2.1Vishal Mahaveer2017-09-126-0/+12
| | | | | | | | | | | | | | | | | | DRA71x processors are reduced pin and software compatible derivative of DRA72 processors. Add support for detection of SR2.1 version of DRA71x family of processors. Signed-off-by: Vishal Mahaveer <vishalm@ti.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
* | davinci: da850-evm: switch to using TI_COMMON_CMD_OPTIONSAdam Ford2017-09-124-26/+37
| | | | | | | | | | | | | | | | Like the OMAP-L138 LCDK before it, let's move the da850-evm and the variations to TI_COMMON_CMD_OPTIONS to cut back one some of the defconfig entries. Signed-off-by: Adam Ford <aford173@gmail.com>
* | linux/io.h: import generic ioread* / iowrite* accessors from LinuxMasahiro Yamada2017-09-121-0/+44
| | | | | | | | | | | | | | | | Some drivers in Linux (ex. drivers/mtd/nand/denali.c) use ioread*/iowrite* accessors. Import them to make drivers more synced. I copied code from include/asm-generic/io.h of Linux. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | dma: import linux/dma-direction.h to consolidate enum dma_data_directionMasahiro Yamada2017-09-127-25/+20
| | | | | | | | | | | | | | | | Import include/linux/dma-direction.h from Linux 4.13-rc7 and delete duplicated definitions of enum dma_data_direction. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>