Commit Graph

51440 Commits

Author SHA1 Message Date
Stefan Agner
5346c31e30 mtd: nand: mxs_nand: use self init
Instead of completing initialization via scan_bbt callback use
NAND self init to initialize the GPMI (MXS) NAND controller.

Suggested-by: Scott Wood <oss@buserror.net>
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2018-06-27 09:07:55 +02:00
Stefan Agner
9345943b2b mtd: nand: mxs_nand: introduce SPL specific init
In preparation to convert the driver to use NAND self init
provide a new minimal init for SPL builds. As a side effect
this also reduces size of SPL by about 4KiB.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2018-06-27 09:07:55 +02:00
Tom Rini
94905e1db8 Merge git://git.denx.de/u-boot-dm 2018-06-25 10:57:07 -04:00
Ashish Kumar
51dce7d2bf mtd: spi: Correct parameters for s25fs512s flash
Change sector size to 256KiB in table spi_flash_ids.

Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-06-25 15:50:33 +05:30
Hannes Schmelzer
9cddf70ead spi: omap3: fix set_speed and set_mode dm callbacks
commit 8480792287
("spi: omap3: Skip set_mode, set_speed from claim") did break SPI
support on my AM335x board.

The named commit:

- ignored the responsible arguments (speed, mode)
The set speed/mode function must use the supplied function arguments to
work properly. With this commit we take those arguments and transfer
them to the priv-data.

- used wrong udevice pointer for getting priv data
the udevice-pointer within function argument is already the spi-bus
device, so it is wrong looking here for some parent (ocp-bus in this
case) and getting priv-pointer from there.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-06-25 15:35:15 +05:30
Hannes Schmelzer
b1d2b529b4 spi: omap3: pre-initialize bus-speed with max. slave-speed
Otherwise the frequency is zero and the clock divider cannot be setup by
'omap3_spi_set_speed' function.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-06-25 15:35:01 +05:30
Michael Trimarchi
34ad749141 spi: mxc_spi: Fix chipselect on DM_SPI driver uclass
CS GPIO activation low/high is determinated by the device tree
so we don't need to take in accoung in cs_activate and cs_deactivate

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-06-25 15:23:06 +05:30
Michael Trimarchi
618e8e20c2 spi: mxc: Fix compilation problem of DM_SPI class driver
drivers/spi/mxc_spi.c:507: undefined reference to `dev_get_addr'
linux-ld.bfd: BFD (GNU Binutils) 2.29.1 assertion fail elf32-arm.c:9509

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-06-25 14:18:41 +05:30
Vipul Kumar
240cd7566e spi: zynq_qspi: Fixed incorrect return value error
This patch replaced "return 0" with "return status" to fix the
incorrect return value error reported by the coverity.

Reviewed-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
[jagan: rebased on master]
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2018-06-25 14:13:57 +05:30
Tom Rini
90efca2539 Merge git://git.denx.de/u-boot-x86 2018-06-23 21:47:39 -04:00
Bin Meng
dd099ec44b cmd: efi: Fix wrong memory descriptor end address
Each entry of the EFI memory descriptors occupies map->desc_size,
not sizeof(struct efi_mem_desc).

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-24 08:56:33 +08:00
Bin Meng
598374729e x86: efi: payload: Count in conventional memory above 4GB in DRAM bank
At present in dram_init_banksize() it ignores conventional memory
above 4GB. This leads to wrong DRAM size is printed during boot.
Remove such limitation.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-24 08:56:25 +08:00
Bin Meng
1ffa447b8c x86: efi-x86_payload: Enable PRE_CONSOLE_BUFFER
Enable PRE_CONSOLE_BUFFER so that the full boot output can be viewed
on the video console for the EFI payload.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-24 08:56:04 +08:00
Bin Meng
7c98ca10ea efi: stub: Move the use_uart assignment immediately after exit_boot_services() call
The use_uart assignment should follow immediately after the call to
exit_boot_services(), in case we want some debug output after that.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-24 08:56:04 +08:00
Bin Meng
5460fd0762 x86: Change __kernel_size_t conditionals to use compiler provided defines
Since commit bb0bb91cf0 ("efi_stub: Use efi_uintn_t"), EFI x86
64-bit payload does not work anymore. The call to GetMemoryMap()
in efi_stub.c fails with return code EFI_INVALID_PARAMETER. Since
the payload itself is still 32-bit U-Boot, efi_uintn_t gets wrongly
interpreted as int, but it should actually be long in a 64-bit EFI
environment.

This changes the x86 __kernel_size_t conditionals to use compiler
provided defines instead. That way we always adhere to the build
environment we're in and the definitions adjust automatically.

Fixes: bb0bb91cf0 ("efi_stub: Use efi_uintn_t")
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-24 08:56:04 +08:00
Alexander Graf
0186644646 efi.h: Do not use config options
Currently efi.h determines a few bits of its environment according to
config options. This falls apart with the efi stub support which may
result in efi.h getting pulled into the stub as well as real U-Boot
code. In that case, one may be 32bit while the other one is 64bit.

This patch changes the conditionals to use compiler provided defines
instead. That way we always adhere to the build environment we're in
and the definitions adjust automatically.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
[bmeng: added some comments to describe the __x86_64__ check]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-24 08:56:04 +08:00
Bin Meng
1ab2c01087 x86: efi-x86_payload: Enable usb keyboard during boot
For boards that don't route serial port pins out, it's quite common
to attach a USB keyboard as the input device, along with a monitor.
However USB is not automatically started in the generic efi payload
codes. This uses a payload specific last_stage_init() to start the
USB bus, so that a USB keyboard can be used on the U-Boot shell.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-24 08:56:04 +08:00
Bin Meng
6d02cf0562 x86: efi-x86_payload: Enumerate PCI bus during early boot
The generic efi payload currently does not enumerate the PCI bus,
which means peripherals on the PCI bus are not discovered by their
drivers. This uses board_early_init_r() to do the PCI enumeration.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-24 08:56:04 +08:00
Bin Meng
ec15d5f6e5 board_r: Do not initialize IDE when DM BLK is on
With driver model philosophy, we should avoid explicitly calling
driver initialization routine during boot. This updates the ram
init sequence table to exclude the IDE initialization for DM BLK.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-24 08:56:04 +08:00
Bin Meng
d6fea4e283 x86: qemu: Change default vesa mode to 1024x768x32
The default vesa mode was changed since commit 55b4e1b7d9
("x86: Change default FRAMEBUFFER_VESA_MODE of some boards") for
better VxWorks compatibility but with the changes QEMU video console
no longer works. This is because QEMU's vgabios implements the VESA
mode 8:8:8 as 24bpp without an alpha channel, which U-Boot's video
console driver currently does not support yet.

We need change to real 32bpp in order to make it work again. QEMU
vgabios implements the custom 32bpp VESA mode starting from 0x140
(320x200x32) to 0x147 (1600x1200x32). Set it to 0x144 (1024x768x32).

Fixes: 55b4e1b7d9 ("x86: Change default FRAMEBUFFER_VESA_MODE of some boards")
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-24 08:56:04 +08:00
Ivan Gorinov
964927323f x86: Add 64-bit setjmp/longjmp implementation
Add setjmp/longjmp functions for x86_64.

Signed-off-by: Ivan Gorinov <ivan.gorinov@intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2018-06-24 08:56:04 +08:00
Heinrich Schuchardt
cbd29ef9f1 x86: qemu: do not build car.o with start64.o
car.o can only be used with start.o, not with start64.o.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2018-06-24 08:56:04 +08:00
Bin Meng
7ec2c21d87 x86: efi-x86_app: Update MAINTAINERS
Previous rename of efi-x86 target missed the MAINTAINERS update,
which caused the buildman warnings:

  WARNING: no status info for 'efi-x86_app'
  WARNING: no maintainers for 'efi-x86_app'

This updates the board MAINTAINERS to reflect the up-to-date info.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-24 08:56:04 +08:00
Simon Glass
a60aedfd31 patman: Support using a particular SMTP server
Some environments require providing the '--smtp-server' argument to
'git send-email'. Add support for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2018-06-23 08:03:43 -06:00
Chris Packham
fe6ef1e9ba patman: add test for SPDX license
Add a test to exercise the check for a valid SPDX license.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-23 08:03:43 -06:00
Chris Packham
4fb3502972 patman: add option for limiting the Cc list
Many mailing-lists consider a long Cc list a sign of spam and will
either drop the message or mark it for moderation. Because patman
automatically invokes get_maintainer.pl the Cc list can expand
unexpectedly. Allow the user to specify a limit for the Cc list.

This limit is applied after removing any known bouncing addresses. By
default no limit is applied.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-23 08:03:43 -06:00
Tom Rini
77b5ba5d2b Merge branch 'master' of git://git.denx.de/u-boot-uniphier 2018-06-22 13:12:53 -04:00
Masahiro Yamada
9ef88391d0 ARM: dts: uniphier: enable SD card for PXs3 reference board
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-06-23 01:28:17 +09:00
Masahiro Yamada
e885c5a602 ARM: dts: uniphier: sync DT with Linux 4.18-rc1
Now that the clock-frequency information has been moved to the
driver, more DT sync is possible.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-06-23 01:28:16 +09:00
Masahiro Yamada
41bacb597e serial: uniphier: set clock rate without clock-frequency property
In Linux, the clock rate of the UART is given by the clock driver.

If you try to follow that in U-Boot, you would end up with adding
more u-boot,dm-pre-reloc properties, and also the clock driver would
be too big for SPL, which is used for UniPhier ARMv7 platform.

The current solution is to add 'clock-frequency' property to the
UART nodes, but it does not exist in the DT files in Linux.  I do
not want to let DT diverge for U-Boot.

Check the SoC compatible and set the clock rate according to it.
This will be helpful to sync DT between Linux and U-Boot.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-06-23 01:28:15 +09:00
Masahiro Yamada
157736a9ee serial: uniphier: rename struct uniphier_serial_private_data
Just for making it shorter.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-06-23 01:28:14 +09:00
Masahiro Yamada
25ed0fefa4 reset: uniphier: sync reset data with Linux 4.18-rc1
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-06-23 01:28:08 +09:00
Masahiro Yamada
b0e8bb4d01 ARM: uniphier: enable CONFIG_SNI_AVE and disable CONFIG_SMC911X
Enable the on-chip ethernet driver for uniphier_{v7,v8}_defconfig.
Disable the on-board SMC911x because it has not migrated to the
driver model yet - it is not possible to enable DM and non-DM
drivers at the same time.

The CONFIG_SMC911X for uniphier_ld4_sld8_defconfig is still kept
because the on-chip ethernet driver for LD4, sLD8 is not supported
yet.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-06-23 01:28:08 +09:00
Tom Rini
d4e5aff836 Patch queue for efi - 2018-06-21
A single urgent fix to make sure green and red are not swapped
 in OSs that make use of EFI GOP frame buffers to display pictures
 (such as efifb in Linux).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJbK8MMAAoJECszeR4D/txgqZQQAIpDTRQkWrrmiWh+h08pGMVp
 k38tx84O+iToYnpQA4zH5g0QrbpzgOtvVjQJ39QTxn5p+tPYSmXkUTS5jtxppu+o
 LszVHP+reQfHlL+1aV2TMsf5e1V+uoNkG3ZEJXfHxjz6VYu1vYw2psAD23vKH0PO
 yOL6o5unJWYdIocNbniGwWKNYyVbiVHcBN2ErHLMRvLKeTXTJr4OZKt98sSO60Pb
 p/z9sO1o1Wgwm/aiV1cD91cAItaVZD/m9cFoqOwnbwjDEM6dlRFsEhy0JLTnH/MQ
 qH9wIy1W9EdON3arjfvcDejRUlX3+7uf113GyWsHPzN/p7Lm9M02UlqT5jk8njf8
 TD9k5QMW6rxDsO4Pu2+zHwU38kaMLv5htJNWrcj2fOm1GDo1q0sRlTp7v6r9I5BH
 KwkR69ZPDPnDj+9ApWkYVRbTzhzu+OoUbVnbB/WYTY4j0jxkW8jEh1e1yIrqlmUA
 sxjPLhbWFn+PpwDzIZzLIqdSJsxX7jzqzGtmAxsmqquAqKNu3KJUn6PTJ1cLhxbD
 I7qH/gHzWBLHCv/nL+/oMin9AC6UYep2zcsJMXfiTIrFSTjuWGvq4wy/WGaZG4mQ
 IyrsuZ9YXDobmiV+5mNxMCvUJs31z+g20EG0+1In3C1DTpjj77t/qS4ZzKbaPwYL
 DhgNUrdvlKtdMYpbWbEs
 =MrHq
 -----END PGP SIGNATURE-----

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

Patch queue for efi - 2018-06-21

A single urgent fix to make sure green and red are not swapped
in OSs that make use of EFI GOP frame buffers to display pictures
(such as efifb in Linux).
2018-06-22 08:14:49 -04:00
Alexander Graf
6fc2c704d4 efi_loader: Fix GOP 32bpp exposure
We store pixels as BGRA in memory, as can be seen from struct efi_gop_pixel.
So we need to expose the same format to UEFI payloads to actually have them
use the correct colors.

Reported-by: Fabian Vogt <fvogt@suse.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2018-06-21 17:18:18 +02:00
Tom Rini
dc7df68f21 Merge branch 'master' of git://git.denx.de/u-boot-sh 2018-06-21 09:02:35 -04:00
Tom Rini
8f08dfd133 Merge tag 'arc-updates-for-2018.07-rc3' of git://git.denx.de/u-boot-arc
Here we only add readme file for EMDK board
support of which was added in this release cycle.
2018-06-21 09:01:29 -04:00
Tom Rini
fa893990e9 Makefile: Ensure we build with -std=gnu11
As many targets are now commonly built with gcc-6 or later (which
defaults to a newer C standard than older compilers), certain C
constructs are now being used as they produce more readable code.  And
while all compilers that we support building with support the C11
standard (and GNU11) they do not default to that standard.  Ensure that
we pass along -std=gnu11 when building.

Signed-off-by: Tom Rini <trini@konsulko.com>
2018-06-21 08:58:50 -04:00
Alexey Brodkin
0921f9294b ARC: EMDK: Add readme
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2018-06-21 14:55:01 +03:00
Tom Rini
a5742efa20 Prepare v2018.07-rc2
Signed-off-by: Tom Rini <trini@konsulko.com>
2018-06-19 19:39:44 -04:00
Tom Rini
4e899d868d test_avb: Add pymark.buildconfigspec information for the AVB tests
Signed-off-by: Tom Rini <trini@konsulko.com>
2018-06-19 11:55:06 -04:00
Tom Rini
897a1d947e libavb: Update SPDX tag style
Signed-off-by: Tom Rini <trini@konsulko.com>
2018-06-19 11:55:05 -04:00
Neil Armstrong
e3f7c4f851 configs: Update Meson GX configs
Enable USB on all Amlogic Meson GXL based board.
Enable Regulator support on all boards.
Enable ADC support on the LibreTech-CC board.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-06-19 07:31:47 -04:00
Beniamino Galvani
2e668af553 meson: use the clock driver
Use the clk framework to initialize clocks from drivers that need them
instead of having hardcoded frequencies and initializations from board
code.

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-06-19 07:31:47 -04:00
Beniamino Galvani
c0fc1e215c clk: add Amlogic meson clock driver
Introduce a basic clock driver for Amlogic Meson SoCs which supports
enabling/disabling clock gates and getting their frequency.

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-06-19 07:31:47 -04:00
Neil Armstrong
0ba089baab config: meson-gx-common: Enable USB boot
Add USB as boot target depending on the configuration.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-06-19 07:31:46 -04:00
Neil Armstrong
0421c9809a adc: meson-saradc: fix regmap_init_mem call
The SARADC driver was merged after the following commit :
commit d35812368a ("regmap: change regmap_init_mem() to take ofnode instead udevice")
Thus breaking build, this patch fixes the regmap_init_mem accordingly.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-06-19 07:31:46 -04:00
Ramon Fried
018e8637b8 configs: dragonboard410c: remove env partition offset
BOOT2 is not partitioned, no need for partition offset.

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
2018-06-19 07:31:46 -04:00
Ramon Fried
b53777d28f configs: db410c: Set eMMC env partition to BOOT2
BOOT2 partition is empty and free for using to store the environment.
Use that instead of the default user partition.

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
2018-06-19 07:31:46 -04:00
Michal Simek
20b016a336 common: Fix cpu nr type which is always unsigned type
cpu_cmd() is reading cpu number via simple_strtoul() which is always
unsigned type.
Platform code implementations are not expecting that nr can be negative
and there is not checking in the code for that too.

This patch is using u32 type for cpu number to make sure that platform
code get proper value range.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-06-19 07:31:45 -04:00