Commit Graph

46817 Commits

Author SHA1 Message Date
Vagrant Cascadian
c005f7edbb fs/jffs2/mini_inflate.c: use "static inline" instead of "inline"
This makes gcc no longer expect an out-of-line version of the
functions being present elsewhere.

This fixes a failure to build on several marvell targets with gcc-7 on
Debian:

  https://bugs.debian.org/877963

Signed-off-by: Adrian Bunk <bunk@debian.org>
Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
2017-10-16 09:42:51 -04:00
Engling, Uwe
41ba7f525f jffs2: ECC corrected nand data is ignored
Hello,

I ran into a problem with the JFFS2 filesystem driver implemented in U-Boot.

I've got a NAND device that has correctable ECC errors (corrected somewhere in mtd/nand/nand_base.c).
The NAND driver tells the filesystem layer (jffs2_1pass.c) above that there occurred correctable ECC errors and returns with a "value > 0".
The JFFS2 driver recognizes the corrected ECC errors as real error and skips this block because the only accepts a "return value == 0" as correct.

This problem exists for over 8 years (I checked version 2010.09) so I'm a little bit worried that I interpreted something wrong or didn't get the whole context.

Can someone confirm this bug (and the bugfix) in the u-boot jffs2 driver?

There was a mail in 2012 that mentioned the same problem, but there was no patch:
http://u-boot.10912.n7.nabble.com/JFFS2-seems-to-drop-nand-data-with-ECC-corrections-td142008.html
Sometime after this discussion the return value of nand_read() changed from -EUCLEAN as correctable ECC error to a positive value with the count of ECC corrected errors.

With kind reguards,
Uwe Engling
2017-10-16 09:42:51 -04:00
Tuomas Tynkkynen
d5587fa308 ARM: Add documentation for the qemu-arm board
Add brief documentation for the recently merged qemu-arm board.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2017-10-16 09:42:51 -04:00
Christophe Kerello
6c36e97be6 mmc: stm32_sdmmc2: increase polling status register delay
MMC commands like MMC_CMD_ALL_SEND_CID or MMC_CMD_SEND_CSD can reach
500 us. This patch increases the polling status register delay to avoid
a timeout on a command.

Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-10-16 09:42:51 -04:00
Patrice Chotard
6c1bf6c442 dm: clk: fix PWR_CR3 register's bit 2 name
Fix bit 2 name of PWR_CR3 register to match with the
last STM32H7 reference manual available here :

http://www.st.com/content/st_com/en/support/resources/
resource-selector.html?querycriteria=productId=SS1951$$
resourceCategory=technical_literature$$resourceType=reference_manual

Update also comment about voltage scaling 1 values

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
2017-10-16 09:42:51 -04:00
Patrice Chotard
1b4ce69dc2 dm: clk: remove CLK() macro for clk_stm32h7
CLK() macro is a residue of a previously reworked patch,
remove it.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
2017-10-16 09:42:51 -04:00
Tuomas Tynkkynen
0c19efa7e1 ARM: tegra: Remove unused define CONFIG_ARMCORTEXA9
This macro isn't used by anything, and in fact hasn't ever been used
according to the Git logs.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2017-10-16 09:42:51 -04:00
Marek Behún
38fc683d33 fs: Set .opendir to fs_opendir_unsupported for btrfs
Otherwise fs_opendir will fault.

Signed-off-by: Marek Behun <marek.behun@nic.cz>
2017-10-16 09:42:51 -04:00
Marek Behún
733d963e3b fs: btrfs: Remove a foreign language note
I accidentaly left a foreign language note in the code from development.

Signed-off-by: Marek Behun <marek.behun@nic.cz>
2017-10-16 09:42:51 -04:00
Marek Behún
ecab881c7f fs: btrfs: Fix usage of uninitialized variables
The variable res should be initialized to 0 in these functions,
because if the searched key is not found, the variable is used
uninitialized.

Reported-by: Coverity (CID: 167335)
Reported-by: Coverity (CID: 167336)
Reported-by: Coverity (CID: 167337)
Signed-off-by: Marek Behun <marek.behun@nic.cz>
2017-10-16 09:42:51 -04:00
Marek Behún
502af618ec linux/time.h: Remove dead code
Since
  rem = ((long) *tim_p) % SECSPERDAY;
the second while cycle
  while (rem >= SECSPERDAY)
is dead.

Reported-by: Coverity (CID: 167334)
Signed-off-by: Marek Behun <marek.behun@nic.cz>
2017-10-16 09:42:51 -04:00
Alexander Graf
b16339e254 iso: Reduce verbosity on test and info calls
The test and info callbacks into the partition callback struct are
used by the "part list" command on the command line. That command
is used by the distro script.

With verb=1 set, "part list" thus throws a lot of warnings about
partitions it can't find when an upper layer searches for partitions.

So let's reduce verbosity to bring it to the same level of noise
as the other partition targets.

Signed-off-by: Alexander Graf <agraf@suse.de>
2017-10-16 09:42:51 -04:00
Masahiro Yamada
7d8e9e8e24 fixdep: fix dependency on options surrounded by CONFIG_VAL()
CONFIG options surrounded by

  CONFIG_IS_ENABLED(...)
  CONFIG_IS_BUILTIN(...)
  CONFIG_IS_MODULE(...)
  CONFIG_VAL(...)

need special care for proper dependency tracking.

I do not remember why, but I missed to add CONFIG_VAL(...) handling.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-16 09:42:51 -04:00
Jon Smith
06d326d3a6 tools: bmp_logo: correctly interpret BMP files with larger headers
All BMP files were being treated as though they had a 40 byte header.
There are several BMP header formats consisting of additional data.
This was causing some of the header to be read as color information,
skewing the color palette.

Signed-off-by: Jon Smith <jtsmith@pdiarm.com>
2017-10-16 09:42:51 -04:00
Diego Dorta
026d7958ba common: Add a prototype for s_init()
When compiling with W=1 the following warning is observed:

arch/arm/mach-imx/mx6/soc.c:590:6: warning: no previous prototype for ‘s_init’ [-Wmissing-prototypes] void s_init(void)

Remove this warning by adding the function prototype into include/common.h file.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
2017-10-16 09:42:51 -04:00
Mirza, Taimoor
a6e9810495 tools/mkimage: Fix DTC run command to handle file names with space
fit_handle_file function does not quote input and output files while preparing
command to run DTC to convert .its to .itb. This results in a failure if input
or output files contain spaces in their names. Quote input and output files in
DTC command to avoid this failure.

Signed-off-by: Mirza, Taimoor <Taimoor_Mirza@mentor.com>
2017-10-16 09:42:51 -04:00
Alexander Graf
409f05f259 fdt: update bcm283x device tree sources to Linux 4.14 state
Upstream Linux has received a few device tree updates to the RPi
which we should propagate into the builtin U-Boot one as well to
gain hardware support.

This patch bumps the dts files to their 4.14 Linux counterparts
with the exception of sdhost on 32bit RPi versions. There we stay
with iproc as the sdhost driver is missing in U-Boot.

Signed-off-by: Alexander Graf <agraf@suse.de>
2017-10-16 09:42:51 -04:00
Tom Rini
b351ccf11a part_efi: In is_gpt_valid() check argument validity before allocation
While this goes somewhat against normal coding style we should ensure
that dev_desc is not NULL before we dereference it in allocation of
legacy_mbr.

Reported-by: Coverity (CID: 167292)
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-16 09:42:51 -04:00
ext-vasily.gurevich@vaisala.com
c12d8b7d70 SPL: FIT: Kconfig: Change SPL_FIT_IMAGE_POST_PROCESS entry
Remove depends on TI_SECURE_DEVICE for other platforms.

Signed-off-by: Vasily Gurevich <ext-vasily.gurevich@vaisala.com>
2017-10-16 09:42:51 -04:00
Masahiro Yamada
7d9927c895 clk: uniphier: add NAND controller clock
This allows the NAND driver to enable clock and get its clock rate.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-15 22:32:25 +09:00
Masahiro Yamada
a89b9bc095 mtd: nand: denali_dt: add clock support
Enable clock in the probe hook.  The clock rate will be necessary
when setup_data_interface hook is supported.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-15 22:32:25 +09:00
Masahiro Yamada
c7372d61fd ARM: uniphier: adjust ifdefs for new UniPhier DWC3 CONFIG
Now USB 3.0 feature is enabled/disabled by CONFIG_USB_DWC3_UNIPHIER.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-15 22:32:25 +09:00
Masahiro Yamada
d37d31849c ARM: uniphier: enable DWC3 xHCI driver
Enable CONFIGs for the DWC3 core and the UniPhier specific glue layer.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-15 22:32:25 +09:00
Masahiro Yamada
5e5edca27c ARM: uniphier: change the default of SoC select to UNIPHIER_V7_MULTI
ARCH_UNIPHIER_V8_MULTI depends on !SPL, so the default may be hidden.
Use a clearer default.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-15 22:32:25 +09:00
Masahiro Yamada
def4eadba9 reset: uniphier: fix the first argument passed to dev_err()
priv->dev does not exist.  Pass the correct pointer to udevice.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-15 22:32:25 +09:00
Masahiro Yamada
ab05406e73 clk: uniphier: add PXs3 clock data
Add basic clock data for Socionext's new SoC PXs3.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-15 22:32:25 +09:00
Masahiro Yamada
d6c7ee7d28 clk: uniphier: rework for better clock tree structure
U-Boot does not support fancy clock tree structures like the Linux
common clock framework.  Implement a simple clock tree model at the
driver level.  With this, the clock data will be simplified.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-15 22:32:25 +09:00
Masahiro Yamada
2b7b2df91e i2c: uniphier-f: replace debug() with dev_dbg()
Use dev_dbg() functions.  It will be helpful to prefix log messages
with the corresponding device name when the core framework is ready.

While I am here, I renamed "dev", which was actually private data,
into "priv" because dev->dev looks confusing.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-15 22:32:25 +09:00
Masahiro Yamada
804cf1c46f i2c: uniphier: replace debug() with dev_dbg()
Use dev_dbg() functions.  It will be helpful to prefix log messages
with the corresponding device name when the core framework is ready.

While I am here, I renamed "dev", which was actually private data,
into "priv" because dev->dev looks confusing.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-15 22:32:24 +09:00
Masahiro Yamada
4bb3dac772 usb: dwc3-uniphier: replace <common.h> with <linux/bitops.h>
Including <common.h> pulls in a lot of bloat.  What this driver needs
is BIT(), so replace it with <linux/bitops.h>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Marek Vasut <marex@denx.de>
2017-10-15 22:32:24 +09:00
Masahiro Yamada
dd74b945af ARM: uniphier: use pr_() instead of printf() where appropriate
Replace printf() with pr_() to specify proper loglevel.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-15 22:32:24 +09:00
Masahiro Yamada
f73cfb4d0d pinctrl: uniphier: simplify input enable and delete pin arrays
The pin data are implemented for old SoCs to specify the bit shift of
the IECTRL register.  They are not wortwhile given the required memory
footprint.  Delete all the pin data and enable all bits of the IECTRL
register.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-15 22:32:24 +09:00
Masahiro Yamada
c906032c04 pinctrl: uniphier: set PUPD_SIMPLE cap flag for PXs3
Like other recenct UniPhier SoCs, the pupdctrl number of PXs3
matches to the pin number.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-15 22:32:24 +09:00
Masahiro Yamada
0f72b74b32 ARM: dts: uniphier: update GPIO nodes
Switch to the single node design.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-15 22:32:24 +09:00
Masahiro Yamada
c5fb1c2524 gpio: uniphier: rework single device node model
First, I implemented this driver as per-bank model, but it was
a design mistake.

  - There are 31 banks in the maximum case.  It is painful to add
    so many nodes to DT.

  - The IRQ control registers are shared between banks.  Per-bank
    design is a problem for Linux.  The counterpart for Linux turned
    around to the single node model.

Rework based on the driver for Linux.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-15 22:32:24 +09:00
Masahiro Yamada
83ee44ab9e ARM: uniphier: switch to CONFIG_ENV_IS_NOWHERE
The non-volatile storage varies board by board.  The default should
be NOWHERE.  Please choose a proper device via Kconfig.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-15 22:32:24 +09:00
Masahiro Yamada
fe3fddfad7 mtd: nand: do not check R/B# for CMD_SET_FEATURES in nand_command(_lp)
Set Features (0xEF) command toggles the R/B# pin after 4 sub feature
parameters are written.

Currently, nand_command(_lp) calls chip->dev_ready immediately after
the address cycle because NAND_CMD_SET_FEATURES falls into default:
label.  No wait is needed at this point.

If you see nand_onfi_set_features(), R/B# is already cared by the
chip->waitfunc call.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>

[ Linux commit: c5d664aa5a4c4b257a54eb35045031630d105f49 ]
2017-10-15 22:32:10 +09:00
Masahiro Yamada
6f29c7a8f1 mtd: nand: do not check R/B# for CMD_READID in nand_command(_lp)
Read ID (0x90) command does not toggle the R/B# pin.  Without this
patch, NAND_CMD_READID falls into the default: label, then R/B# is
checked by chip->dev_ready().

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>

[ Linux commit: 3158fa0e739615769cc047d2428f30f4c3b6640e ]
2017-10-15 22:31:35 +09:00
Chris Packham
ce3ba458a8 moveconfig: fix error message in do_autoconf()
Move the % arch outside the double quote so that the missing toolchain
message is displayed correctly.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-15 18:13:13 +09:00
Tom Rini
f855a7bc12 Patch queue for efi - 2017-10-13
This is the second batch of amazing improvements for efi_loader in 2017.11:
 
   - New self tests to verify our own code
   - A few bug fixes
   - colored text support
   - event and SNP improvements, should get us close to iPXE working
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJZ4HqlAAoJECszeR4D/txgZ0YQAIwd158lVczf/cMnzf3UcIsH
 e4YUFvQJaGxJw5hccaewaEQJqtPhEEJuHnzc683XDoYISTgvzCyhNEs8o0f7LcX3
 41c50x2bQPz7oFO5N60m58RknHqKiGd5VAC6+r4vBM8C0zFHeNTULo4fzn1qRgb3
 YUHDiRMlToVZXCOkbCeFm+dEJvjkXWmDDDdJpFIgDs6Oj+jOuV+H1GRMF2d56V6r
 Dd4/QPAFl4sRprBAMlvsmuI7obwnGV7/aA4CHIlUqKOVcbddBq2KigX8ZpIYEpaf
 FhRfxRLuWqvDRKpn+ixKfgl4KiBE/CH7sg7F6Un0mIjQVvo8k22Jbetqi9m1j/+x
 YzIFnwzb9ZhQEFOmfHnH8M9+bMmHyW46wkS4gdO4OAd/W0SeyIZ0a0gB1prgb2LK
 RfYQ37WsZM5TRARlcvmJt4H5+EtRYLT8lLf+yPSuyX8/8ubVnYHWtVE1IMLCiCAG
 eVmTwfjLzo3c703RJd9rwDtE13lTQmIHczM4cWybQzooXA6ePLJpSZSWx7EJxdQq
 GC7jNIKyKpu2NjhM9fUssbU+SiYLaIvtUBSOlGrcP1TCVR/j8OQ0Y1eIc9xOprIi
 +VEZVB/Z59D8j2TMTn1Xr+hB9i5h9ZxcO88gdEwfs65uihfvJGVhV1AxTyiaxvNv
 novPhik2UyHG5buRHb2Y
 =PiNi
 -----END PGP SIGNATURE-----

Merge tag 'signed-efi-next' of git://github.com/agraf/u-boot

Patch queue for efi - 2017-10-13

This is the second batch of amazing improvements for efi_loader in 2017.11:

  - New self tests to verify our own code
  - A few bug fixes
  - colored text support
  - event and SNP improvements, should get us close to iPXE working
2017-10-13 09:53:58 -04:00
Heinrich Schuchardt
abe994633b efi_selftest: correctly check return values
When cancelling the timer we should check the return
value provided by the set_timer service.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2017-10-13 10:24:22 +02:00
Tom Rini
26f9184e09 Merge git://git.denx.de/u-boot-fsl-qoriq 2017-10-12 13:36:58 -04:00
Tom Rini
e11d2fff73 Merge git://www.denx.de/git/u-boot-imx 2017-10-12 13:36:37 -04:00
Marek Vasut
0a333602df ARM: imx6: Add DHCOM i.MX6 PDK board support
Add support for the DHCOM i.MX6 PDK board. This board has:
- FEC ethernet
- EHCI USB host
- 3x SDMMC

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
2017-10-12 18:01:06 +02:00
Uri Mashiach
1a95913979 imx: mx7: spl: remove redundant SATA definitionas
The i.MX7 SOC doesn't include the SATA interface.

Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
2017-10-12 18:00:46 +02:00
Diego Dorta
e2000731ae mx6: sys_proto: Add prototypes for imx6_pcie_toggle() functions
When compiling with W=1 errors are observed:

drivers/pci/pcie_imx.c:517:12: warning: no previous prototype for ‘imx6_pcie_toggle_power’ [-Wmissing-prototypes] __weak int imx6_pcie_toggle_power(void)

drivers/pci/pcie_imx.c:528:12: warning: no previous prototype for ‘imx6_pcie_toggle_reset’ [-Wmissing-prototypes] __weak int imx6_pcie_toggle_reset(void)

Remove these warnings by adding the functions prototypes on arch-mx6/sys_proto.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
2017-10-12 18:00:18 +02:00
Diego Dorta
342b4b09b1 mx6: clock: Add a prototype for do_mx6_showclocks()
When compiling with W=1 the following warning is observed:

arch/arm/mach-imx/mx6/clock.c:1268:5: warning: no previous prototype for ‘do_mx6_showclocks’ [-Wmissing-prototypes] int do_mx6_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])

Remove this warning by adding the function prototype into arch-mx6/clock.h file.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
2017-10-12 18:00:01 +02:00
Anatolij Gustschin
fe12386c2a i.mx6ul: xpress: update UART init for current board revision
UART pinmux has been changed on the last board revision. Change
board pinmux accordingly. Console is on UART7 now, add pinmux,
base address and update console string in environment.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Stefano Babic <sbabic@denx.de>
2017-10-12 17:58:42 +02:00
Fabio Estevam
a0046393da mx6slevk: Use PARTUUID to specify the rootfs location
mx6slevk can run different kernel versions, such as NXP 4.1 or mainline.

Currently the rootfs location is passed via mmcblk number and the
problem with this approach is that the mmcblk number for the SD
card changes depending on the kernel version.

In order to avoid such issue, use the UUID method to specify the
rootfs location.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
2017-10-12 17:58:15 +02:00
Sven-Ola Tuecke
b2915ba25e drivers: pci: imx: fix imx_pcie_remove function
We have at least a minor count of boards, that failed to re-initialize
PCI express in the Linux kernel. Typical failure rate is 20% on affected
boards. This is mitigated by commit 6ecbe13756 ("drivers: pci: imx:
add imx_pcie_remove function").

However, at least on some i.MX6 custom boards, when calling
assert_core_reset() as part of the first-time PCIe init, read access
to PCIE_PL_PFLR simply hangs. Surround this readl() with
imx_pcie_fix_dabt_handler() does not help. For this reason, the forced
LTSSM detection is only used on the second assert_core_reset() that is
called shorly before starting the Linux kernel.

Signed-off-by: Sven-Ola Tuecke <sven-ola.tuecke@numberfour.eu>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Tested-by: David Müller <d.mueller@elsoft.ch>
2017-10-12 17:56:28 +02:00