Commit Graph

55359 Commits

Author SHA1 Message Date
Simon Glass
c882163b09 x86: sandbox: pch: Add a CONFIG option for PCH
At present this uclass is selected only on x86. In order to add a test for
it, it must also support sandbox. Create a new CONFIG_PCH option and
enable it on x86 and sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-02-20 15:25:30 +08:00
Simon Glass
2cd2bc20c4 x86: link: Increase malloc size and decrease code size
At present link does not boot since it has outgrown its pre-relocation
malloc() size and its assigned code area. Increase the former and drop
EFI loader support, which adds about 45KB!

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-02-20 15:25:29 +08:00
Simon Glass
8dc2aa903a x86: samus: Increase the pre-reloc memory
This is too small now, likely due to the pre_reloc_only fixes. Increase
it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-02-20 15:25:29 +08:00
Simon Glass
3a44bfdf08 x86: Adjust I/O macros to work on 64-bit machines
At present these macros give warnings on 64-bit machines and do not
correctly do 32-bit accesses. Update them to use linux types.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-02-20 15:25:29 +08:00
Simon Glass
c6d84a30fe sandbox: Add a note about the growing state_info struct
This struct is getting larger and in some cases is being used for things
which would be better put into a driver. For example hwspinlock is not
used outside of sandbox_hwspinlock.c.

Add a note to encourage people to put things elsewhere.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-02-20 15:25:29 +08:00
Simon Glass
7d8fe15bb8 pci: Add IDs for Intel high-definition audio
Add a few IDs for common HDA blocks and the ADSP used on samus.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-02-20 15:25:28 +08:00
Simon Glass
48ca690917 gpio: Use case-insentive matching on the GPIO name
Allow the 'gpio' command to match GPIO bank names regardless of the case
of each. While these are generally in upper case, it is useful to be able
to provide lower case with the command.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-02-20 15:25:28 +08:00
Simon Glass
b8989b537e gpio: Show inactive GPIOs when explicitly requested
At present the gpio command only shows GPIOs which are marked as in use.
This makes sense with 'gpio status' since we already have the '-a' flag
to indicate that all GPIOs should be shown. But when a particular GPIO is
requested, it seems better to always display it. At present the request is
simply ignored.

For example if GPIO a10 is not in use, then:

   > gpio status a10

shows nothing, not even the function being used for that GPIO. With this
change, it shows the pin status:

   > gpio status a10
   a10: input: 0 [ ]

Add an extra parameter for this to avoid changing the existing flag
parameter.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
[bmeng: correct the 'gpio' command in the commit message]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2019-02-20 15:24:29 +08:00
Simon Glass
7d38db55f7 pci: Fix comment in struct pci_child_platdata
This is platdata, not private data, so the comment is currently incorrect.
Fix it to avoid confusion.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-02-20 15:21:44 +08:00
Simon Glass
11503be448 pci: Don't export pci_hose_config_device()
This function is not used outside this file so make it static.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-02-20 15:21:44 +08:00
Simon Glass
2b5d029db8 i2c: designware: Add error checking on init
At present this driver does not check whether it is able to actually
communicate with the I2C controller. It prints a timeout message but still
considers the probe to be successful.

To fix this, add some checking that the init succeeds.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
2019-02-20 15:21:44 +08:00
Simon Glass
529f57d926 dm: syscon: Don't require a regmap for PCI devices
At present it is not possible to use the syscon devices for PCI devices
since a regmap is required. Since PCI uses a 3-cell address the conversion
of the 'reg' property to an address always fails. In any case, the regmap
is not useful with PCI since devices are accessed through the PCI bus
which regmap does not support.

Add a special case for PCI syscon devices, so that they don't set up a
regmap.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-02-20 15:21:44 +08:00
Simon Glass
f9811e8575 log: Allow #define LOG_DEBUG to enable logging in a file
At present it is possible to '#define DEBUG' at the top of a file which
causes all debug() statements in that file to become active. There is
currently no equivalent with logging, but this is a useful function.

Add a LOG_DEBUG define along with documentation.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-02-20 15:21:44 +08:00
Simon Glass
8dee7b96fd log: Add documentation for convenience functions
The log_debug(), etc. function are documented only in the header file at
present. Add a section to README.log also.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-02-20 15:21:44 +08:00
Simon Glass
f0b05c95e3 log: Add a Kconfig option to set the default log level
At present the default log level is set to LOGL_INFO on start-up. Allow
this to be controlled from Kconfig.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-02-20 15:21:44 +08:00
Simon Glass
6fc7e93896 log: Fix up Kconfig log level names
The log level numbers in the Kconfig are not actually correct. Fix them
and also add a missing space in the header-file comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-02-20 15:21:44 +08:00
Tom Rini
97f9830849 Merge branch '2019-02-19-master-imports'
- Convert some OMAP3 platforms to DM+SPL
- Various minor fixes
- Updates for hikey, DaVinci, am57xx platforms,
- Make FAT use less memory
2019-02-19 20:48:11 -05:00
Tom Rini
06d01e6601 travis: Exclude omap from the arm926ejs job
We build the platform here that matches with "omap" in its own job,
don't need to have it here as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
2019-02-19 16:58:56 -05:00
Ismael Luceno Cortes
2d3beff2d2 cmd: pcmcia: Build only if CONFIG_CMD_PCMCIA=y
Signed-off-by: Ismael Luceno <ismael.luceno@silicon-gears.com>
2019-02-19 16:58:24 -05:00
Chris Packham
72384ff2e9 dm: Fix typo 'Watchdot' -> 'Watchdog'
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2019-02-19 16:58:24 -05:00
Derald D. Woods
36a75344d7 ARM: omap3: evm: Update DM SPL support
- Switch to using the omap3-u-boot.dtsi file for needed properties
- Enable SPL_OF_CONTROL

This commit is based on the following series:

https://patchwork.ozlabs.org/project/uboot/list/?series=92472
https://patchwork.ozlabs.org/project/uboot/list/?series=92462

Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2019-02-19 16:58:24 -05:00
Tom Rini
6dd18bb111 omap3_beagle: Enable DM_SPI
Switch to DM_SPI support now.

Signed-off-by: Tom Rini <trini@konsulko.com>
2019-02-19 16:58:24 -05:00
Tom Rini
e0cc7df9fd omap3_beagle: Update for DM SPL support
- Switch to using the omap3-u-boot.dtsi file for needed properties.
- Remove a few SPL features to free up more SRAM space.
- Switch CONFIG_SYS_TEXT_BASE to the normal default, we don't need to
  worry about X-Loader at this point anymore.
- A few related updates to SPL options as part of switching to DM SPL.

Signed-off-by: Tom Rini <trini@konsulko.com>
Tested-by: Derald D. Woods <woods.technical@gmail.com>
2019-02-19 16:58:23 -05:00
Gervais, Francois
84c7a1398f cmd/fs: fix build if CMD_BOOTEFI is not set
Fixes:
cmd/fs.c:29: undefined reference to `efi_set_bootdev'

Signed-off-by: Francois Gervais <fgervais@distech-controls.com>
2019-02-19 16:58:23 -05:00
Adam Ford
0cd9465c0b ARM: omap3_logic: Enable SPL booting device tree
With the generic omap3-u-boot.dtsi file available, this patch
increased the memory of the various incarnations of the omap3_logic
board, and points their respective u-boot.dtsi files to the newly
created generic one, and removes the PLATDATA from the board file.

These are all done at once because the're all utilizing the same
omap3logic.c board file.

Signed-off-by: Adam Ford <aford173@gmail.com>
2019-02-19 16:58:23 -05:00
Adam Ford
ed59a76db0 ARM: DTS: omap3-u-boot.dtsi
Create generic omap3-u-boot.dtsi file that omap3 based boards
can include to generate device tree in SPL for booting MLO.

Credit should go to Tom Rini.

Signed-off-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tested-by: Derald D. Woods <woods.technical@gmail.com>
2019-02-19 16:58:23 -05:00
Adam Ford
57ade0792c ARM: da8xxevm: Add NAND instructions for da850-evm to README
The README.da850 file continues information on how to burn NAND
for the LCDK, but not the DA850-EVM.  This patch adds both the
commands and dip switch instructions for burning and booting
NAND.

Signed-off-by: Adam Ford <aford173@gmail.com>
2019-02-19 08:55:43 -05:00
Adam Ford
1c6b6f383a ARM: am3517_evm: Enable Falcon Mode
The other OMAP3 based Logic PD boards have Falcon Mode enabled,
so this patch makes it possible on the AM3517-evm as well.

Signed-off-by: Adam Ford <aford173@gmail.com>
2019-02-19 08:55:43 -05:00
Adam Ford
591353d011 ARM: da850evm: Increase Malloc Size
The SPI NOR frameware was recently updated, but they require a little
more memory that we had previosly allocated, so it stopped booting.
This patch doubles the size of CONFIG_SPL_SYS_MALLOC_F_LEN to 0x800.

Fixes: c4e8862308 ("mtd: spi: Switch to new SPI NOR framework")

Signed-off-by: Adam Ford <aford173@gmail.com>
2019-02-19 08:55:43 -05:00
Manivannan Sadhasivam
362d00dfff hikey: Allow environment to store in eMMC and increase bootdelay
Current Hikey configuration allows us to store u-boot environment on uSD
card. But this will be useless if uSD card is not inserted, hence use
the onboard eMMC memory for storing environment at Boot1 partition.
While we are at it, let's increase the boot delay to 10s also.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
2019-02-19 08:55:43 -05:00
Igor Opaniuk
7374b15522 test: let use gdbserver for all sandbox targets
Enable usage of gdbserver for all sandbox targets (sandbox,
sandbox_flattree etc.).

Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2019-02-19 08:55:43 -05:00
Philippe Reynes
4ebcb16b51 bcm963158: use TARGET_BCM963158 instead of ARCH_BCM63158
We use TARGET_BCM63158 in the Kconfig instead of ARCH_BCM63158,
so we could add other board that use a bcm63158.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2019-02-19 08:55:43 -05:00
Michal Simek
1e7883f632 dtbo: Fix dtbo generation rules
Take the first prerequisite (dts overlay file) instead of standard
input.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-19 08:55:43 -05:00
Tien Fong Chee
e48485f5e4 fs: fat: Reduce default max clustersize 64KiB from malloc pool
Release cluster block immediately when no longer use would help to reduce
64KiB memory allocated to the memory pool.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
2019-02-19 08:55:43 -05:00
Tien Fong Chee
8537874a65 fs: fat: dynamically allocate memory for temporary buffer
Drop the statically allocated get_contents_vfatname_block and
dynamically allocate a buffer only if required. This saves
64KiB of memory.

Signed-off-by: Stefan Agner <stefan.ag...@toradex.com>
Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
2019-02-19 08:55:43 -05:00
Simon Goldschmidt
dae5c2dcdc spl: implement CRC check on U-Boot uImage
SPL currently does not check uImage CRCs when loading U-Boot.

This patch adds checking the uImage CRC when SPL loads U-Boot. It does
this by reusing the existing config option SPL_CRC32_SUPPORT to allow
leaving out the CRC check on boards where the additional code size or
boot time is a problem (adding the CRC check currently adds ~1.4 kByte
to flash).

The SPL_CRC32_SUPPORT config option now gets enabled by default if SPL
support for legacy images is enabled to check the CRC on all boards
that don't actively take countermeasures.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2019-02-19 08:55:43 -05:00
Bin Liu
8502fe84a4 configs: am57xx_evm: define CONFIG_SPL_LOAD_FIT_ADDRESS for SPL-DFU
Define CONFIG_SPL_LOAD_FIT_ADDRESS to enable SPL-DFU for am57x platform.

Signed-off-by: Bin Liu <b-liu@ti.com>
2019-02-19 08:55:43 -05:00
Roman Kapl
44ac80e7e9 cmd: date: Do not overwrite arguments
Arguments are const and belong to the caller. Calling date in a hush
loop will yield different results from the second invocation.

Signed-off-by: Roman Kapl <rka@sysgo.com>
2019-02-19 08:55:43 -05:00
Kurban Mallachiev
957f51e863 elf: fix cache flushing in 'bootelf -p' command
Currently there are two problems in 'bootelf -p' (load elf by segments)
command:
- bss section is not flushed, so booted elf can have non zero values
  in bss;
- at least on ARM there are 'CACHE: Misaligned operation at
  range...' warnings

Use p_memsz instead of p_filesz during cache flushing for elf segment.
p_filesz doesn't include zero initialized memory (e.g. bss section),
which also should be flushed.

Align these cache flushes to line boundaries.

Signed-off-by: Kurban Mallachiev <mallachiev@ispras.ru>
2019-02-19 08:55:43 -05:00
Hannes Schmelzer
eaba7df704 board/BuR/brxre1: convert do DM
This commit converts the brxre1 board to DM,
for this we have todo following things:

- add a devicetree-file for this board
- drop all obsolete settings from board header-file
- use dm_i2c_xxx calls for read/write to the resetcontroller
- request gpios before operate them

Serues-cc: trini@konsulko.com
Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
2019-02-19 08:55:43 -05:00
Heinrich Schuchardt
90037d4c73 dm: scsi: report correct device number
Before the patch scsi would report the same device number for all SCSI
devices, e.g.

  Device 0: (1:0) Vendor: ATA Prod.: Crucial_CT128M55 Rev: MU01
            Type: Hard Disk
            Capacity: 122104.3 MB = 119.2 GB (250069680 x 512)
  Device 0: (1:0) Vendor: ATA Prod.:  Rev:
            Type: Hard Disk
            Capacity: not available

With the patch the same device number is reported as is used in
scsi_read():

  Device 0: (1:0) Vendor: ATA Prod.: Crucial_CT128M55 Rev: MU01
            Type: Hard Disk
            Capacity: 122104.3 MB = 119.2 GB (250069680 x 512)
  Device 1: (1:0) Vendor: ATA Prod.:  Rev:
            Type: Hard Disk
            Capacity: not available

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-02-19 08:55:43 -05:00
Heinrich Schuchardt
c7cd4afb92 tpm: simplify: tpm_set_global_lock()
When in pack_byte_string() memcpy() is called for size 0 the source buffer
address has no relevance. So we can use NULL here.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2019-02-19 08:55:43 -05:00
Tom Rini
b78a9e2212 Merge branch 'master' of git://git.denx.de/u-boot-socfpga
- Misc Gen5 fixes
- stratix10 bugfix
- dwmmc bugfix
2019-02-18 22:12:59 -05:00
Tom Rini
f14de0014c Prepare v2019.04-rc2
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-02-18 21:36:39 -05:00
Jean-Jacques Hiblot
3c5aa6cacc configs: Enable CONFIG_BLK in am57xx_evm and am57xx_hs_evm
Enable CONFIG_DM_SCSI and CONFIG_BLK.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
2019-02-18 15:53:09 -05:00
Jean-Jacques Hiblot
fb2cedb262 configs: k2g_evm: Enable CONFIG_BLK
CONFIG_BLK can be safely enabled as DM_MMC and DM_USB are already enabled.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Tested-by: Vignesh R <vigneshr@ti.com>
2019-02-18 15:53:09 -05:00
Alexander Graf
7590f907da efi_loader: Swap roles with Heinrich
Heinrich is going to take over maintainership of the efi_loader tree
going forward.

To ensure that I will still receive review mails at least, add me as
reviewer with a stable email address.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
2019-02-18 15:53:09 -05:00
Alexander Graf
3157bbfa18 rpi: Make Matthias maintainer
Matthias Brugger agreed to take over maintainership from me for the
Raspberry Pi tree. Add him to the MAINTAINERS file instead.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
2019-02-18 15:53:09 -05:00
Hannes Schmelzer
d3a78cb7ea board/BuR/brppt1: fix ethernet support on brppt1 boards
The commit 1bac199e8c ("configs: Resync with savedefconfig")
did remove ethernet driver from following boards defconfig:

- brppt1_mmc
- brppt1_nand
- brppt1_spi

With this commit we add ethernet and responsible phy support again.

Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
2019-02-18 15:53:09 -05:00
Tom Rini
beff8e34b2 Pull request for EFI sub-system in U-Boot v2019.04-rc2
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAlxq+mUACgkQxIHbvCwF
 GsRxKQ/+NXcGaWEzxgIWj1HMVQsbf4lM+gXva2K60Ar/e10up2I8ARrnAnje//fi
 YSg98vdNS1HPoJ1H1oaC54NJgsiYyH1kdb0uxwGXrEAagB/6EWIWVuPaKTSAjXPa
 8pb+I4xdZCPxIYtzczaSCeqjFoSwMovLxbQnkLWIjqrYoI4Skx1970/UoGt4EBlJ
 LI9RecTODPPmQQvC44y9Ao3fh6/qldJsJfNLMlQbr9+1OYfr1xBTLn2ry/LITzTm
 w+1OArjoRHyehEup/mx9eAXbX2b2ljp9x1J/Hazwn5CjHFP86Q9JYdisU42rJZHb
 1m6uZZNxME2GdAQTI3YcmME0w1fIUMaTL3oNoOfKDLkYaj5QQOcLLAYY5+j8x1F+
 hPhSutyIZ7DBT/oIODte+BboARkTRvGYgv842Sq3HtTMfL7uXdowABQ/XkdzuAYb
 d/NxMQxSti+Xk5mzmIcRJULBAZPs/SFNQjsTNmh64+rTDIYNzNRgj8XiQp4UkNVK
 7+9CQ8R6qS6MF/KBF6FqGrVQ7cprrdFpvgejEL5qwhcQeTtJWsUi+oe1zRj4l7ip
 JRs22/HjTiytxe5wqPyoxQav+tKjj87jRfFqRuxqG1kfzRzcEhjbZhHrduC1jae4
 Gtg+tEjhi0fu1l3p3Jrtx79mhy9kU6YKZ8ZGfu1qWbT6RTromdI=
 =BbQI
 -----END PGP SIGNATURE-----

Merge tag 'efi-2019-04-rc2' of https://github.com/xypron2/u-boot

The patches fix multiple errors. Mentionable are:
- EFI unit tests (bootefi selftest) can run on i386.
- `make tests` executes the Unicode unit tests.

The LoadImage patch is preparing for further rework to be delivered
in v2019.07.
2019-02-18 15:48:01 -05:00