Commit Graph

46836 Commits

Author SHA1 Message Date
Ian Ray
02cc3e8037 ext4: recover from filesystem corruption when reading
Some fixes when reading EXT files and directory entries were identified
after using e2fuzz to corrupt an EXT3 filesystem:

 - Stop reading directory entries if the offset becomes badly aligned.

 - Avoid overwriting memory by clamping the length used to zero the buffer
   in ext4fs_read_file.  Also sanity check blocksize.

Signed-off-by: Ian Ray <ian.ray@ge.com>
Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
Reviewed-by: Stefano Babic <sbabic@denx.de>
(cherry picked from commit ecdfb4195b)
2017-11-20 09:01:04 -02:00
Nandor Han
4c530ec27c imx: mxc_i2c: tweak the i2c transfer method
Tweak the i2c transfer to work for devices that want to read data
without addressing a register.

Signed-off-by: Nandor Han <nandor.han@ge.com>
Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
Acked-by: Heiko Schocher <hs@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
(cherry picked from commit 2feec4eafd)
2017-11-20 09:01:03 -02:00
Fabio Estevam
87d4563bbd Revert "wandboard: Remove unnecessary delay"
This reverts commit b8b9790e23.

Some wandboard variants no longer boot after this commit, so keep
the original delay to avoid the boot regression.

Reported-by: Varga Zsolt <vazso@vazso.hu>
Tested-by: Varga Zsolt <vazso@vazso.hu>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
(cherry picked from commit 401cabc287)
2017-11-20 09:01:03 -02:00
Fabio Berton
913c93d432 pico-imx6ul: Use FS_GENERIC load command
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
(cherry picked from commit 2566c4f698)
2017-11-20 09:01:03 -02:00
Fabio Berton
bd7c72d0e2 pico-imx6ul: Add function to create gpt partitions
Command run setup_emmc will create gpt partitions for mmc 0 device
based on patitions variable.

Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
(cherry picked from commit ebbdeb2a10)
2017-11-20 09:01:03 -02:00
Fabio Berton
1bd87551eb pico-imx6ul: Define partition layout in the environment
Create layout with a boot 16MiB partition and rootfs with remain
space.

Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
(cherry picked from commit db430cd479)
2017-11-20 09:01:03 -02:00
Fabio Berton
6d2499a223 pico-imx6ul: Add boot and rootfs dfu_alt_info
Change dfu_alt_info variable to use the following altsetting:

  uboot:                     To flash raw U-Boot
  /zImage: boot:             To copy kernel image
  /imx6ul-pico-hobbit.dtb:   To copy dtb file
  rootfs:                    To copy rootfs

List the currently attached DFU capable USB devices running:
  sudo dfu-util -l

Flash U-Boot:
  sudo dfu-util -D u-boot.imx -a uboot

Copy boot files:
  sudo dfu-util -D zImage -a /zImage
  sudo dfu-util -D imx6ul-pico-hobbit.dtb -a /imx6ul-pico-hobbit.dtb

Flash rootfs:
  sudo dfu-util -D rootfs.ext4 -a rootfs

To copy boot files you need to have a formated mmc 0:1 partition. To
format with ext4 filesystem you can use ums.

Run on target:
  ums 0 mmc 0

and on host:
  sudo mkfs.ext4 /dev/sdx1

Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
(cherry picked from commit d93ab9b166)
2017-11-20 09:01:03 -02:00
Fabio Berton
114501165b pico-imx6ul: Use PARTUUID to specify the rootfs location
Currently the rootfs location is passed via mmcblk number and using
the UUID method to specify the rootfs location is a better approach
working even if mmcblk number for the eMMC changes depending on the
kernel versions.

Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
(cherry picked from commit 65551e389a)
2017-11-20 09:01:03 -02:00
Fabio Berton
9a6f8019f6 pico-imx6ul: Move dfu_alt_info to CONFIG_DFU_ENV_SETTINGS variable
Create CONFIG_DFU_ENV_SETTINGS to set dfu environment settings to
improve human readable code.

Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
(cherry picked from commit 9cc71cfa11)
2017-11-20 09:01:03 -02:00
Otavio Salvador
0b20df36bc mx25pdk: Change root to use a single partition layout
This allow for use of wic images as generated by the wic tool inside
the OpenEmbedded.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2017-11-14 15:05:17 -02:00
Vanessa Maegima
2dcd3eeeff pico-imx7d: Enable booting from single partition
Update 'fdt_file' and 'image' location and change rootfs mmc partition
in 'finduuid' to support booting from a single partition.

Signed-off-by: Vanessa Maegima <vanessa.maegima@nxp.com>
2017-11-14 15:05:17 -02:00
Vanessa Maegima
d6008b2e1a pico-imx7d: Replace fatload command
Replace fatload with the fs generic loading interface ('load' command).

Signed-off-by: Vanessa Maegima <vanessa.maegima@nxp.com>
2017-11-14 15:05:17 -02:00
Vanessa Maegima
7fe81082a3 pico-imx7d: Add support for secure boot
Add a new defconfig to enable secure boot on pico-imx7d.

Signed-off-by: Vanessa Maegima <vanessa.maegima@nxp.com>
2017-11-14 15:05:17 -02:00
Fabio Estevam
f960fe77df mx6sabre_common: Place video related settings in common code
Currently mx6sabreauto fails to find the environment variables like this:

## Error: "findfdt" not defined
switch to partitions #0, OK
mmc0 is current device
## Error: "loadbootscript" not defined
## Error: "loadimage" not defined
## Error: "netboot" not defined

Move VIDEO_ARGS/VIDEO_ARGS_SCRIPT so that they can be shared among sabresd
and sabreauto boards.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2017-11-14 15:05:17 -02:00
Fabio Estevam
f4998c99d4 mx6sabre_common: Dynamically change the video output
Use the 'hdmidetect' command in U-boot to load the appropriate
video arguments. If HDMI is connected during boot then make HDMI
as the primary framebuffer, otherwise let LVDS be the primary framebuffer.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2017-11-14 15:05:17 -02:00
Nikolay Dimitrov
c3e252e8ca mx6sabresd: Enable video interfaces in bootargs
Generate kernel video bootargs for sabresd, based on a list of needed video
interfaces ("video_interfaces" U-Boot env-var). The order of initialization
and video settings can be fully customized.

Signed-off-by: Nikolay Dimitrov <picmaster@mail.bg>
2017-11-14 15:05:17 -02:00
Otavio Salvador
c94a211847 mx6sabresd: Use LDO dtb file until LDO bypass support is added
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2017-11-14 15:05:17 -02:00
Otavio Salvador
3abd094faf mx6slevk: Use LDO dtb file until LDO bypass support is added
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2017-11-14 15:05:16 -02:00
Tom Rini
c253573f3e Prepare v2017.11
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-11-13 20:08:06 -05:00
Soeren Moch
be135cc5eb Revert "console: simplify puts()"
This reverts commit c61d0009fe.

A tbs2910 board user reported a very slow console frambuffer as
regression in current u-boot. I could bisect this down to the
above mentioned commit.

This revert brings back the fast framebuffer console (one
cache flush per string in puts(), not after each char).

Reported-by: Uwe Scheffler <scheffler.u@web.de>
Signed-off-by: Soeren Moch <smoch@web.de>
Tested-by: Uwe Scheffler <scheffler.u@web.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-11-12 16:18:16 -05:00
Angelo Dureghello
ae147ab4a8 board: sysam: stmark2: add missing environment location
Signed-off-by: Angelo Dureghello <angelo@sysam.it>
2017-11-12 16:18:16 -05:00
Marek Vasut
2bfd43e550 ARM: rmobile: Fix eMMC signal voltage on Salvator-X/XS
The eMMC is 1V8 device only and the signaling is always 1V8,
fix the DT for Salvator-X/XS to describe the hardware correctly.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2017-11-12 16:17:31 -05:00
Tom Rini
66bd5a3ebb Merge git://git.denx.de/u-boot-sunxi 2017-11-10 10:04:21 -05:00
Werner Böllmann
8e2c2d413c sunxi: SATA link timeout fix
After updating u-boot from v2016.01 to 2017.09, issue with
"SATA link 0 timeout." on my Cubietruck board.

mdelay milled after moving satapwr code to board.
"sunxi: Turn satapwr on from board_init"
(sha1: 9fbb0c3aa4)

After adding the "mdelay(500);"
line that was lost in the path the error is gone.

Signed-off-by: Werner Böllmann <Werner.Boellmann@fh-dortmund.de>
[Rebased and updated change and commit message]
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-11-10 19:21:24 +05:30
Chen-Yu Tsai
13ae2a40e7 net: sun8i_emac: Fix build for non-H3/H5 SoCs
Only the H3/H5 SoCs have an internal PHY and its related clock and
reset controls.

Use an #ifdef to guard the internal PHY control code block so it
can be built for other SoCs, such as the A83T or A64.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-11-10 19:10:33 +05:30
Tom Rini
60567a320f Merge git://git.denx.de/u-boot-rockchip 2017-11-10 08:19:01 -05:00
Jagan Teki
36b6e0cc3c rockchip: configs: vyasa: Update falcon offsets
Update the falcon offsets for args to 16MB and kernel to 17MB
Since the below commit updated U-Boot proper location along
with rockchip boot image offsets
"spl: set SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR to 0x4000 for rockchip"
(sha1: 8f4d62b403)

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-10 14:08:22 +01:00
Jagan Teki
d80599e894 rockchip: doc: Fix U-Boot proper location for falcon
This patch fixed U-Boot proper location has been
missed to update in bewlo commit
"rockchip: doc: update U-Boot location info"
(sha1: 73e6dbe855)

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-10 14:08:21 +01:00
Goldschmidt Simon
341e44ed66 rockchip: doc: update U-Boot location info
The U-Boot location has been moved to block 16384.
This is 8MB, not 4MB.

Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-10 14:08:20 +01:00
Tom Rini
1c4043e532 Merge branch 'master' of git://git.denx.de/u-boot-sunxi 2017-11-09 08:11:40 -05:00
Tom Rini
3c674b7e87 Merge branch 'master' of git://www.denx.de/git/u-boot-imx 2017-11-09 08:11:30 -05:00
Lukasz Majewski
9c8979cdb7 imx7: Add include guards for include/asm/arch-mx7/sys_proto.h file
Signed-off-by: Lukasz Majewski <lukma@denx.de>
2017-11-09 11:32:49 +01:00
Lukasz Majewski
e895e996ab imx5: Add include guards for include/asm/arch-mx5/sys_proto.h file
Signed-off-by: Lukasz Majewski <lukma@denx.de>
2017-11-09 11:32:49 +01:00
Lukasz Majewski
90d0e38c1e imx6: Add include guards for include/asm/arch-mx6/sys_proto.h file
Signed-off-by: Lukasz Majewski <lukma@denx.de>
2017-11-09 11:32:49 +01:00
Lukasz Majewski
a3eec24ad3 imx:display5: Add support for LWN's DISPLAY5 board
This commit provides support for LWN's IMX6Q based DISPLAY5 board.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2017-11-09 11:32:49 +01:00
Lukasz Majewski
ec1b26973c imx6: iomux: Add generic function to set RGMII IO voltage on IMX6 SoCs
This commit provides generic function to set the RGMII/HSIC IO voltage
level on iMX6 devices.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2017-11-09 11:32:49 +01:00
Lukasz Majewski
8ea754da60 board: imx6: marsboard: Remove doubled #include <asm/arch/sys_proto.h>
The sys_proto.h file has been included earlier in this file.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2017-11-09 11:32:49 +01:00
Artturi Alm
6270a3f035 sunxi: restore PHYLIB for CONFIG_SUN4I_EMAC users
due misnaming of CONFIG_SUN4I_EMAC in include/configs/sunxi-common.h,
likely missed in:
	commit 3146f0c017 ("Move PHYLIB to Kconfig")

Signed-off-by: Artturi Alm <artturi.alm@gmail.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-11-09 14:39:30 +05:30
Artturi Alm
e286fada9d sunxi: fix CONFIG_SUNXI_EMAC references
fixes CONFIG_SUNXI_EMAC references from drivers/net/Makefile and
include/configs/sunxi-common.h likely forgotten in:
	commit abc3e4df59 ("sunxi: Convert SUNXI_EMAC to Kconfig")

Signed-off-by: Artturi Alm <artturi.alm@gmail.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-11-09 14:39:09 +05:30
Benoît Thébaudeau
bcfb365375 mmc: fsl_esdhc: Fix PIO timeout
The following error has been observed on i.MX25 with a high-speed SDSC
card:
    Data Write Failed in PIO Mode.

It was caused by the timeout set on PRSSTAT.BWEN, which was triggered
because this bit takes 15 ms to be set after writing the first block to
DATPORT with this card. Without this timeout, all the blocks are
properly written.

This timeout was implemented by decrementing a variable, so it was
depending on the CPU frequency. Fix this issue by setting this timeout
to a long enough absolute duration (500 ms).

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-11-07 10:26:27 +01:00
Jagan Teki
cc65e354fe i.MX6: engicam: Fix MAINTAINERS/README
- Update newly added include/configs file in MAINTAINERS
- Update newly added defconfig file in README

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2017-11-07 10:13:39 +01:00
Fabio Estevam
b2e6ad451b mx51: Select the ESDHC_A001 erratum
When a high speed card is connected to mx51evk the following error is seen:

U-Boot 2017.11-rc2 (Oct 18 2017 - 13:49:26 -0200)

CPU:   Freescale i.MX51 rev3.0 at 800 MHz
Reset cause: POR
Board: MX51EVK
DRAM:  512 MiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
*** Warning - read failed, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   FEC
Hit any key to stop autoboot:  0
=> saveenv
Saving Environment to MMC...
Writing to MMC(0)... failed

The root cause for the failure is the eSDHC-A001 erratum:

"eSDHC-A001 : Data timeout counter (SYSCTL[DTOCV]) is not reliable for
values of 0x4,0x8, and 0xC" that is listed
on some PowerArchitecture chips:
https://www.nxp.com/files-static/32bit/doc/errata/MPC8379ECE.pdf

Even though eSDHC-A001 is not documented on the i.MX51 errata document,
I have confirmed with the NXP design team that this erratum does affect
i.MX51, so fix the problem by selecting SYS_FSL_ERRATUM_ESDHC_A001
at SoC level.

The i.MX51 ts4800 board already selects this option, but it is better
to move this selection to the i.MX51 SoC level instead.

Successfully tested with a high speed SD card on a mx51evk board.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
2017-11-07 10:13:11 +01:00
Fabio Estevam
5d09c27138 mx25: Select the ESDHC_A001 erratum
When a high speed card is connected to mx25 the following error is seen:

U-Boot 2017.11-rc2-00104-gb79372a (Oct 31 2017 - 11:02:22 -0200)

CPU:   Freescale i.MX25 rev1.2 at 399 MHz
Reset cause: POR
Board: MX25PDK
I2C:   ready
DRAM:  64 MiB
No arch specific invalidate_icache_all available!
MMC:   FSL_SDHC: 0
*** Warning - read failed, using default environment
In:    serial
Out:   serial
Err:   serial
Net:   FEC
Hit any key to stop autoboot:  0
=> saveenv
Saving Environment to MMC...
Writing to MMC(0)... failed

, which prevents any usage of the SD card.

The root cause for the failure is the eSDHC-A001 erratum:

"eSDHC-A001 : Data timeout counter (SYSCTL[DTOCV]) is not reliable for
values of 0x4,0x8, and 0xC" that is listed
on some PowerArchitecture chips:
https://www.nxp.com/files-static/32bit/doc/errata/MPC8379ECE.pdf

Even though eSDHC-A001 is not documented on the i.MX25 errata document,
I have confirmed with the NXP design team that this erratum does affect
i.MX25, so fix the problem by selecting SYS_FSL_ERRATUM_ESDHC_A001
at SoC level.

Successfully tested with a high speed SD card on a mx25pdk board.

Suggested-by: Benoît Thébaudeau <benoit@wsystem.com>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Tested-by: Otavio Salvador <otavio@ossystems.com.br> # mx25pdk
2017-11-07 10:13:00 +01:00
Fabio Estevam
07df697e14 mx25: Move MX25 selection to Kconfig
The motivation for moving MX25 selection to Kconfig is to be
able to better handle MX25 specific errata, so that an errata option
can be selected at SoC level instead of board level.

This selection method also aligns with the way other i.MX SoCs are
selected in U-Boot.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
2017-11-07 10:12:50 +01:00
Kever Yang
021a8ae00a rockchip: remove SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR from defconfig
Use default value 0x4000 for SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR instead
of define a new one.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-07 09:16:58 +01:00
Kever Yang
73e6dbe855 rockchip: doc: update U-Boot location info
Update rockchip U-Boot location to 0x4000/16384.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-07 09:16:57 +01:00
Kever Yang
8f4d62b403 spl: set SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR to 0x4000 for rockchip
Rockchip use a 'loader2' partition for U-Boot, so u-boot.bin or
u-boot.itb load by SPL need to locate at0x4000. Detail here:
http://opensource.rock-chips.com/wiki_Boot_option

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-07 09:16:57 +01:00
Klaus Goger
b5557ffc0f rockchip: board: puma_rk3399: make env location selectable via Kconfig
The environment storage location is selectable via Kconfig. We support
eMMC, SD and SPI-NOR as location for U-Boot. This adds support to store
the environment in the SPI-NOR additional to the default eMMC location.

Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-07 09:16:57 +01:00
Klaus Goger
4f70039b36 rockchip: dts: rk3399: change sd-card io voltage to 3.0V
The VCC_SD and VCC_SDIO rail should only be powered up to 3.0V on RK3399
platforms.

Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-07 09:16:57 +01:00
Klaus Goger
366812fa26 rockchip: dts: Use defines for pin names in rk3399-puma.dtsi and rk3368-lion.dts
pinctrl/rockchip.h provides defines that map pin numbers to pin names.
Use them to make the dts more human readable.

Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-07 09:16:57 +01:00