Commit Graph

72100 Commits

Author SHA1 Message Date
Jaehoon Chung
e9978b17cd cmd: mmc: check whether bootbus's arguments is valid or not
According to Specification, each bit have valid value.
But it doesn't check whether arguments is valid or not.
It has potential bug with arguments passed by wrong value.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2021-04-06 18:08:26 +08:00
Jaehoon Chung
8ae82c4b12 cmd: mmc: modify more readable about hwpartition usage
Modified more readable about hwpartition usage.
Because it's difficult to understand how to use its command.
The arguments didn't optional.
mmc hwpartition needs to pass <USER> <GP> <MODE> as arguments.
Description about each arguments what is required is the below:
 USER - <user> <enh> <start> <cnt> <wrrel> <{on|off}>
 GP   - <{gp1|gp2|gp3|gp4}> <cnt> <enh> <wrrel> <{on|off}>
 MODE - <{check|set|complete}>

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2021-04-06 18:08:14 +08:00
Neil Armstrong
2fbd37001c arm: meson: remove static ethernet link setup
The static ethernet link type config code is no more needed because now handled by
the meson8b glue driver, delete it.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-04-06 11:10:29 +02:00
Neil Armstrong
775998d451 arm: meson: remove static ethernet memory power domain enable
The ethernet memory power domain is handled by the meson-ee-pwrc driver,
delete the static code.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-04-06 11:10:29 +02:00
Neil Armstrong
6f3cd174a3 net: designware: remove amlogic compatibles
These compatibles are now handled by the dwmac_meson8b glue driver.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-04-06 11:10:29 +02:00
Neil Armstrong
888422ea17 configs: meson: use Designware glue driver for Amlogic Meson8b & later SoCs
Use the proper Synopsys DWMAC Meson8b glue to handle the ethernet link type.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-04-06 11:10:29 +02:00
Neil Armstrong
81233abf73 arm: meson: remove static MDIO mux handling
The static MDIO mux handling in mach-meson is no more needed, delete it.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-04-06 11:10:29 +02:00
Neil Armstrong
1f636d8cb1 configs: update Amlogic Meson G12A, G12B & SM1 configs for MDIO MUX
Use DM_MDIO and the new G12A MDIO MUX driver for G12A, G12B & SM1 boards.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-04-06 11:10:29 +02:00
Neil Armstrong
6950ba4680 configs: update Amlogic Meson GXL & GXM config for MDIO MUX
Use DM_MDIO and the new MMIOREG MDIO MUX driver for GXL & GXM board.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-04-06 11:10:29 +02:00
Neil Armstrong
798424e857 net: designware: add Amlogic Meson8b & later glue driver
This adds a proper glue driver for the Designware DWMAC ethernet MAC IP
found in the Amlogic Meson8, GXBB, GXL, GXM, G12A, G12B & SM1 SoCs.

This is aimed to replace the static ethernet link setup found on the board
init code for the Amlogic SoC based boards.

Tested on a libretech-cc (S905x Internal RMII 10/100 PHY) and Khadas VIM3 (A113d
with external 10/100/1000 RGMII PHY) to cover the most extreme setups.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-04-06 11:10:29 +02:00
Neil Armstrong
8120ce17bf net: add Amlogic Meson G12A MDIO MUX driver
The Amlogic G12A & compatible SoCs embeds a mux to either communicate with
the external PHY or the internal 10/100 PHY.

This adds support for this mux as a MDIO MUX device.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-04-06 11:10:29 +02:00
Neil Armstrong
5160b4567c net: designware: add DM_MDIO support
Add support for DM_MDIO to connect to PHY and expose a MDIO device for the
internal MDIO bus in order to dynamically connect to MDIO PHYs with DT
with eventual MDIO muxes in between.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-04-06 11:10:29 +02:00
Neil Armstrong
6c7bc9fec0 net: add MMIO Register MDIO MUX driver
Add support for MMIO register MDIO muxes based on the Linux mdio-mux-mmioreg driver.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-04-06 11:10:29 +02:00
Pali Rohár
88965fef6e arm: mvebu: Espressobin: Enable watchdog support but do not start it
Espressobin had disabled watchdog support (CONFIG_WDT) because older stable
Linux kernel versions (which are used by current stable OpenWRT and Debian
versions) do not have support for Armada 3700 watchdog driver. Therefore
they are not able to periodically kick watchdog so Espressobin enter into
boot loop.

This change enable CONFIG_WDT, CONFIG_WDT_ARMADA_37XX and CONFIG_CMD_WDT
options which add support for U-Boot 'wdt' command. And unset new
CONFIG_WATCHDOG_AUTOSTART option which cause that watchdog is not
automatically started by U-Boot during init phase, like when CONFIG_WDT
option is not set at all.

So with this change, U-Boot on Espressobin would have working 'wdt' command
which can be used from boot scripts (e.g. for enabling watchdog prior new
Linux booting kernel). But default behavior of watchdog status stays
unchanged, U-Boot does not start watchdog on Espressobin during its init
phase.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2021-04-06 10:47:32 +02:00
Pali Rohár
830d29ac37 watchdog: Allow to use CONFIG_WDT without starting watchdog
In some cases it is useful to compile support for U-Boot command 'wdt'
without starting HW watchdog in early U-Boot phase. For example when the
user want to start the watchdog only on demand by some boot script.

This change adds a new compile option WATCHDOG_AUTOSTART to control whether
U-Boot should automatically start the watchdog during init phase or not.

This option is enabled by default as it was the default behavior prior
introducing this new change. When compiling U-Boot users can decide to turn
this option off.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2021-04-06 10:47:32 +02:00
Pali Rohár
25e20e347e watchdog: Show error message when initr_watchdog() cannot start watchdog
Function wdt_start() may fail. So in initr_watchdog() function check return
value of wdt_start() call and print error message when watchdog starting
failed.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2021-04-06 10:47:32 +02:00
Pali Rohár
9c44ff1c5f watchdog: Set/unset GD_FLG_WDT_READY flag in wdt_start()/wdt_stop()
Watchdog is ready after successful call of ops->start() callback in
wdt_start() function. And is stopped after successful call of ops->stop()
callback in wdt_stop function.

So move setting of GD_FLG_WDT_READY flag from initr_watchdog() function to
wdt_start() and ensure that GD_FLG_WDT_READY flag is unset in wdt_stop()
function.

This change ensures that GD_FLG_WDT_READY flag is set only when watchdog is
running. And ensures that flag is also also when watchdog was started not
only by initr_watchdog() call (e.g. by U-Boot 'wdt' command).

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2021-04-06 10:47:32 +02:00
Jagannadha Sutradharudu Teki
53879b1738 cfi_flash: Fix detection of 8-bit bus flash devices via address shift
We had a problem detecting 8/16bit flash devices connected only via
8bits to the SoC for quite a while. Commit 239cb9d9
[mtd: cfi_flash: Fix CFI flash driver for 8-bit bus support] finally
fixed this 8-bit bus support. But also broke some other boards using
this cfi driver. So this patch had to be reverted.

I spotted a different, simpler approach for this 8-bit bus support
on the barebox mailing list posted by
Oleksij Rempel <bug-track@fisher-privat.net>:

http://www.spinics.net/lists/u-boot-v2/msg14687.html

Here the commit text:

"
Many cfi chips support 16 and 8 bit modes. Most important
difference is use of so called "Q15/A-1" pin. In 16bit mode this
pin is used for data IO. In 8bit mode, it is an address input
which add one more least significant bit (LSB). In this case
we should shift all adresses by one:
For example 0xaa << 1 = 0x154
"

This patch now is a port of this barebox patch to U-Boot.

Along with the change w.r.t from barebox,
Some flash chips can support multiple bus widths, override the
interface width and limit it to the port width.

Tested on 16-bit Spansion flash on sequoia.
Tested 8-bit flashes like 256M29EW, 512M29EW.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Cc: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Cc: Aaron Williams <awilliams@marvell.com>
Cc: Chandrakala Chavva <cchavva@marvell.com>
Cc: Andre Przywara <andre.przywara@arm.com>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mario Six <mario.six@gdsys.cc>
Cc: York Sun <york.sun@nxp.com>
Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
2021-04-06 08:55:53 +02:00
Simon Glass
d4a1592a99 test: Allow tests to run on any board
Due to a recent change, tests are limited to running on sandbox only.
Correct this so that any architecture can run them.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Sean Anderson <seanga2@gmail.com>
Fixes: c79705ea93 ("test: Move dm_test_init() into test-main.c")
Tested-by: Sean Anderson <seanga2@gmail.com>
2021-04-06 16:33:19 +12:00
Heinrich Schuchardt
4c30d18ed3 sandbox: document parameters of os_realloc()
Avoid 'make htmldocs' build warnings:

    ./include/os.h:139: warning:
    Function parameter or member 'ptr' not described in 'os_realloc'
    ./include/os.h:139: warning:
    Function parameter or member 'length' not described in 'os_realloc'

Fixes: 14e46dfb17 ("sandbox: Add os_realloc()")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-04-06 16:33:19 +12:00
Simon Glass
48f45455bf Convert CONFIG_MISC_INIT_F to Kconfig
This converts the following to Kconfig:
   CONFIG_MISC_INIT_F

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2021-04-06 16:33:19 +12:00
Simon Glass
7570d9bb47 moveconfig: Handle binary files cleanly
Some files are not actually source code and thus can produce unicode
errors. Report this and continue.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-04-06 16:33:19 +12:00
Simon Glass
4ce5b8104a log: Fix up debug_cond() when LOG is enabled
At present debug() statements can cause debuf output to appear when LOG is
enabled but DEBUG is not. This is not intended and it seems that the
condition is wrong.

Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-04-06 16:33:19 +12:00
Simon Glass
da39341223 dtoc: Improve handling of reg properties
This existing code assumes that a reg property is larger than one cell,
but this is not always the case. Fix this assumption.

Also if a node's parent is missing the #address-cells and #size-cells
properties we use 2 as a default for each. But this should not happen in
practice. More likely the properties were removed for SPL due to there
being no 'u-boot,dm-pre-reloc' property, or similar. Add a warning for
this as the failure can be very confusing.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-04-06 16:33:19 +12:00
Simon Glass
3e200caff0 dtoc: Adjust detection of 64-bit properties
At present an empty size is considered to be a 64-bit value. This does not
seem useful and wastes space. Limit the 64-bit detection to where one or
both of the addr/size is two cells or more.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-04-06 16:33:19 +12:00
Simon Glass
0c59acef34 dtoc: Show driver warnings once at the end
At present warnings are shown as soon as they are discovered in the
source scannner. But the function that detects them may be called multiple
times.

Collect all the warnings and show them at the end.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-04-06 16:33:19 +12:00
Simon Glass
5f86454b3d buildman: Add an encoding to the out-env file
The environment may contain some unicode characters. At least that is what
seemed to happen on one commit:

Building current source for 1 boards (0 threads, 64 jobs per thread)
    0    0    0 /1       -1      (starting)
Traceback (most recent call last):
  File ".../tools/buildman/buildman", line 64, in <module>
    ret_code = control.DoBuildman(options, args)
  File "tools/buildman/control.py", line 372, in DoBuildman
    options.keep_outputs, options.verbose)
  File ".../tools/buildman/builder.py", line 1704, in BuildBoards
    results = self._single_builder.RunJob(job)
  File ".../tools/buildman/builderthread.py", line 526, in RunJob
    self._WriteResult(result, job.keep_outputs, job.work_in_output)
  File ".../tools//buildman/builderthread.py", line 349, in _WriteResult
    print('%s="%s"' % (var, env[var]), file=fd)
UnicodeEncodeError: 'ascii' codec can't encode characters in position
	311-312: ordinal not in range(128)

The problem defies repetition with any change at all to buildman. But
let's set an encoding in any case.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-04-06 16:33:19 +12:00
Simon Glass
bddac45d04 pinctrl: Return -ENOSYS when system call is not available
Update the code to use -ENOSYS, which is the correct error code for an
unimplemented system call in U-Boot.

Also we should not check for a missing operations array as this is not
permitted. For now this can be covered by an assert().

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-04-06 16:33:19 +12:00
Simon Glass
d6332d59d2 simple-pm-bus: Use -ENOSYS for checking missing system call
We don't need to check -ENOTSUPP since this is not used for this purpose
in U-Boot. Update the code accordingly.

Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Sean Anderson <seanga2@gmail.com>
2021-04-06 16:33:19 +12:00
Simon Glass
3bc11b983d clk: Return -ENOSYS when system call is not available
Update clk_composite_set_parent() to use -ENOSYS, which is the correct
error code for U-Boot. Also rearrange the code so that the error condition
is clearly indicated and the function runs to the end in the normal case,
since this is the common style in U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
2021-04-06 16:33:19 +12:00
Simon Glass
9042bf6fe4 clk: Update drivers to use -EINVAL
At present some drivers use -ENOSUPP to indicate that an unknown or
unsupported clock is used. Most use -EINVAL, indicating an invalid value,
so convert everything to that.

Signed-off-by: Simon Glass <sjg@chromium.org>

Acked-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2021-04-06 16:33:19 +12:00
Simon Glass
2f541aa53c tlv_eeprom: Return -ENOSYS when system call is not available
When CMD_TLV_EEPROM is not enabled, use -ENOSYS, which is the correct
error code for U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-04-06 16:33:19 +12:00
Simon Glass
24e3d5d2a9 spi: Return -ENOSYS when system call is not available
Update spi_controller_dma_map_mem_op_data() to use -ENOSYS, which is the
correct error code for U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-04-06 16:33:19 +12:00
Simon Glass
6379a94cac usb: Return -ENOSYS when system call is not available
Update usb_gadget_release() to use -ENOSYS, which is the correct error
code for U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-04-06 16:33:19 +12:00
Simon Glass
aa4ad8bbad dm: core: Use -ENOSPC in acpi_get_path()
Update this function to use -ENOSPC which is more commly used when a buffer
runs out of space.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-04-06 16:33:19 +12:00
Simon Glass
42a2668743 dm: core: Document the common error codes
Driver model uses quite strong conventions on error codes, but these are
currently not clearly documented. Add a description of the commonly used
errors.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
2021-04-06 16:33:19 +12:00
Simon Glass
42bc156f80 patman: Continue on if warnings are found outside a commit
While we cannot know which commit the warning relates to, this should not
be fatal. Print the warning and carry on.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-04-06 16:33:10 +12:00
Simon Glass
4b5019e3e5 dtc: Update the build rule for pylibfdt
Some versions of make complain about using a grouped target without a
recipe:

.../pylibfdt/Makefile:36: *** grouped targets must provide a recipe.  Stop.

Fix this by adding a dummy recipe.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-04-06 16:33:10 +12:00
Tom Rini
472fd5a35a Merge tag 'rockchip-for-v2021.07' of https://source.denx.de/u-boot/custodians/u-boot-rockchip
- Fix rk3368 lion board support;
- Fix px30 odroid-go2 board support;
- Add rk3399 NanoPi R4s and NanoPi M4B board support;
2021-04-05 22:39:10 -04:00
Tom Rini
90eba245a6 Merge branch 'next' 2021-04-05 11:29:57 -04:00
Tom Rini
b46dd116ce Prepare v2021.04
Signed-off-by: Tom Rini <trini@konsulko.com>
2021-04-05 11:03:29 -04:00
Fabio Estevam
17bc2cf89b imx8mn_ddr4_evk: Allow booting the kernel by default
Currently it is not possible to boot Linux from the SD card
by default.

Make the necessary adjustments to allow it.

Reported-by: Peter Bergin <peter@berginkonsult.se>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Andrey Zhizhikin <andrey.z@gmail.com> # imx8mn_ddr4_evk
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2021-04-05 08:08:56 -04:00
Tom Rini
ac2b5d5850 sphinx: Pin to docutils-0.16
In newer docutils writers/latex2e/docutils.sty has a unicode character
in the comments which can in turn cause Python 3.6 at least to fail.
Pin to the previous docutils release for now.

Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
2021-04-04 16:07:09 -04:00
Heinrich Schuchardt
7823ba3397 cmd: CMD_USB depends on USB
The usb command cannot be compiled with CONFIG_USB=n:

ld.bfd: cmd/usb.c:660: undefined reference to `usb_stop'
ld.bfd: cmd/usb.c:663: undefined reference to `usb_started'

Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-04-04 16:06:25 -04:00
Simon Glass
a0da06d2f8 Makefile: Silence the deprecation script
This bash code is currently showing up in the build unless 'make -s' is
used. We don't normally show these sorts of things as they are confusing.
Also this code was not shown before the recent refactoring of how these
messages are displayed.

Add an '@' to silence it.

Suggested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Bin Meng <bmeng.cn@gmail.com>
Fixes: 1373252851 ("Makefile: Add common code to report deprecation")
2021-04-01 10:35:16 -04:00
Tom Rini
43d3de544d Pull request for efi-2021-04-rc6
Bug fix:
     Fix ConvertDeviceNodeToText() for Uart()
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAmBkp/8ACgkQxIHbvCwF
 GsT79BAAikr7H07iBzHFAcBvIXgTmBnsfb/ylUL3RCEho0knFG7G34glAhXx0l4Z
 V5gXHPvLVW6T6QWLxcwdBgCblWq4EgF5DPpmcb4Ph7jaSrYwoTbs/p2WWCj0XueQ
 n+KLHPof2nqDSOw/KcleP6xnsoCUEjMVCw71OjDmn5o9A8uLO0Pgh25fJt/3KOlO
 DYT4WxxzdV8vzoZ51Bu/rZnLo+SJa6kS0Ds6BNJ7DcYV8NWEy/T6dPmZxf6AQVXC
 DNOFsiqPcoWW1fxXBKi2g9giGgHpVC37RrUCNcf/2Ks2pYz6bl/oqR6xPvdNjsJ7
 swgI+bnHACfclggwa7yxYTcAnZ7Az3ZOJqvz6J4Kn8tCmD/HoYihIy+A2FICxUjy
 wCMGvM0bVddsW4CbQgyvaGrnRIqJa8Ncsvbg8OrzR10j/KKpMKcL9lRM4edfGgBh
 jwkVyMBmLX+a9Xbac89rRc8R4QyE6/aKg2tdAYv67uoM2mJAME+ZECnpw9pn93PT
 6XbmFAnUp+MWO8RD264sHPSQkUMyHW7ZuIjDNuA+3B2Fs9stITbABSHyrDgDuufS
 qJFZeb3yjOOxY3q5Spq60xoszrwnU4DxgUxbhFpYffKRFMGICOK3Ad9gXGrfaxYA
 B78xj9l3FgIfFG65uRIqXVCTcLhOXIuk2Yk67ofBQOBF5+Ts6z8=
 =+Ofd
 -----END PGP SIGNATURE-----

Merge tag 'efi-2021-04-rc6' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request for efi-2021-04-rc6

Bug fix:
    Fix ConvertDeviceNodeToText() for Uart()
2021-03-31 13:05:57 -04:00
Tom Rini
db8b46120a Xilinx changes for v2021.07
net:
 - Fix gem PCS support
 
 spi:
 - Small trivial fixes
 
 zynq:
 - Enable time/timer commands
 - Update bitmain platform
 - Several DT changes
 
 zynqmp:
 - Update clock driver
 - mini config alignments
 - Add/update psu_init for zcu208/zcu216/zc1275
 - Several DT changes
 - Enable efi debug command (also for Versal)
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQbPNTMvXmYlBPRwx7KSWXLKUoMIQUCYGRy+AAKCRDKSWXLKUoM
 IUN9AKCQHHdbKIciyhucUj5ThwT3CDaUswCeLQkRB1SrM6E8k6KkErWEA+xOxsU=
 =fIEs
 -----END PGP SIGNATURE-----

Merge tag 'xilinx-for-v2021.07' of https://source.denx.de/u-boot/custodians/u-boot-microblaze into next

Xilinx changes for v2021.07

net:
- Fix gem PCS support

spi:
- Small trivial fixes

zynq:
- Enable time/timer commands
- Update bitmain platform
- Several DT changes

zynqmp:
- Update clock driver
- mini config alignments
- Add/update psu_init for zcu208/zcu216/zc1275
- Several DT changes
- Enable efi debug command (also for Versal)
2021-03-31 09:47:30 -04:00
Andy Shevchenko
1ba21bb06b test: Don't unmount not (yet) mounted system
When test suite tries to create a file for a new filesystem test case and fails,
the clean up of the exception tries to unmount the image, that has not yet been
mounted. When it happens, the fuse_mounted global variable is set to False and
inconveniently the test case tries to use sudo, so without this change the
admin of the machine gets an (annoying) email:

  Subject: *** SECURITY information for example.com ***

  example.com : Feb  5 19:43:47 : ... COMMAND=/bin/umount .../build-sandbox/persistent-data/mnt

and second run of the test cases on uncleaned build folder will ask for sudo
which is not what expected.

Besides that there is a double unmount calls during successfully run test case.

All of these due to over engineered Python try-except clause and people didn't
get it properly at all. The rule of thumb is that don't use more keywords than
try-except in the exception handling code. Nevertheless, here we adjust code
to be less intrusive to the initial logic behind that complex and unclear
constructions in the test case, although it adds a lot of lines of the code,
i.e. splits one exception handler to three, so on each step we know what
cleanup shall perform.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-03-31 07:50:17 -04:00
Tom Rini
dd85c9500c Merge https://source.denx.de/u-boot/custodians/u-boot-sunxi
- H616 fixes to keep it in sync with upstream TF-A
2021-03-31 07:48:47 -04:00
Andre Przywara
62acef239f sunxi: dts: H616: Drop reserved-memory node
Trusted Firmware now adds the /reserved-memory subnode to the DT at
runtime[1], putting in the right values.

Drop our hard-coded version, as this might clash with the actual values
(which have also changed), and rely on TF-A to add the node.

[1] https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/7770

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2021-03-31 09:50:31 +01:00