Commit Graph

68938 Commits

Author SHA1 Message Date
Heinrich Schuchardt
87e9963d5a rtc: provide an emulated RTC
On a board without hardware clock this software real time clock can be
used. The build time is used to initialize the RTC. So you will have
to adjust the time either manually using the 'date' command  or use
the 'sntp' to update the RTC with the time from a network time server.
See CONFIG_CMD_SNTP and CONFIG_BOOTP_NTPSERVER. The RTC time is
advanced according to CPU ticks.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-10-27 21:13:15 +01:00
Heinrich Schuchardt
cbf0ffea14 Makefile: provide constant with seconds since epoch
Provide a constant U_BOOT_EPOCH with the number of seconds since
1970-01-01. This constant can be used to initialize a software
real time clock until it is updated via the 'sntp' command.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-10-27 21:13:15 +01:00
Anatolij Gustschin
986c980c82 nokia_rx51: re-enable CONSOLE_MUX and SYS_CONSOLE_IS_IN_ENV
With disabled legacy VIDEO option CONSOLE_MUX is not auto-selected
any more, re-enable it.

Fixes: 9dec5a0ea1 ("nokia_rx51: disable obsolete VIDEO config")
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Pali Rohár <pali@kernel.org>
2020-10-27 10:48:08 -04:00
Tom Rini
43428c6915 - disable CONFIG_VIDEO to remove DM conversion warnings
for boards: at91sam9, eb_cpu5282, ls1021aqds, ls1021atwr,
    mx23evk, mx6sxsabresd, mx7dsabresd, nokia_rx51, picosam9g45,
    sansa_fuze_plus, xfi3
 -----BEGIN PGP SIGNATURE-----
 
 iGwEABECACwWIQSC4hxrSoIUVfFO0kRM6ATMmsalXAUCX5cuIw4cYWd1c3RAZGVu
 eC5kZQAKCRBM6ATMmsalXPOIAJ9sRuY+hFpuYN1fFmc6UzMl0wr5RwCdH0eqlEAm
 8Qj5ITU7YhVIINeRVeE=
 =VNIK
 -----END PGP SIGNATURE-----

Merge tag 'video-for-2021.01-rc1' of https://gitlab.denx.de/u-boot/custodians/u-boot-video

 - disable CONFIG_VIDEO to remove DM conversion warnings
   for boards: at91sam9, eb_cpu5282, ls1021aqds, ls1021atwr,
   mx23evk, mx6sxsabresd, mx7dsabresd, nokia_rx51, picosam9g45,
   sansa_fuze_plus, xfi3
2020-10-26 17:27:38 -04:00
Anatolij Gustschin
9dec5a0ea1 nokia_rx51: disable obsolete VIDEO config
Disable VIDEO config to fix DM_VIDEO conversion
deadline warning.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2020-10-26 20:55:51 +01:00
Anatolij Gustschin
8c9940d5ec eb_cpu5282: fix CONFIG_DM_VIDEO build warnings
Remove CONFIG_VIDEO dependency to fix board removal warnings.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Jens Scharsig <esw@bus-elektronik.de>
2020-10-26 20:55:29 +01:00
Anatolij Gustschin
2310620960 sansa_fuze_plus: disable obsolete VIDEO config
DM_VIDEO conversion deadline has passed, disable VIDEO config.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
2020-10-26 20:55:03 +01:00
Anatolij Gustschin
8ea854a5cc xfi3: disable obsolete VIDEO config
DM_VIDEO conversion deadline has passed, disable VIDEO config.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
2020-10-26 20:54:47 +01:00
Anatolij Gustschin
beea0057d3 mx23evk: disable obsolete VIDEO config
DM_VIDEO conversion deadline has passed, disable VIDEO config.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Otavio Salvador <otavio@ossystems.com.br>
2020-10-26 20:54:37 +01:00
Anatolij Gustschin
33923e7270 at91sam9n12ek: disable obsolete VIDEO config
DM_VIDEO conversion deadline has passed, disable VIDEO config.
Boards should convert to DM_VIDEO if they need video console
support.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
2020-10-26 20:54:14 +01:00
Anatolij Gustschin
d1a2a1dc9e at91sam9: disable obsolete VIDEO config
DM_VIDEO conversion deadline has passed, disable VIDEO config.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2020-10-26 20:53:53 +01:00
Anatolij Gustschin
12a3e60469 picosam9g45: disable obsolete VIDEO config
DM_VIDEO conversion deadline has passed, disable VIDEO config.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Erik van Luijk <evanluijk@interact.nl>
2020-10-26 20:53:41 +01:00
Anatolij Gustschin
d63443a542 ls1021atwr: disable obsolete VIDEO config
DM_VIDEO conversion deadline has passed, disable VIDEO config.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2020-10-26 20:53:31 +01:00
Anatolij Gustschin
dac62ffd83 ls1021aqds: disable obsolete VIDEO config
DM_VIDEO conversion deadline has passed, disable VIDEO config.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Alison Wang <alison.wang@nxp.com>
2020-10-26 20:53:22 +01:00
Anatolij Gustschin
7490609bc5 imx: mx7dsabresd: disable obsolete VIDEO config
DM_VIDEO conversion deadline has passed, disable VIDEO config.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2020-10-26 20:53:09 +01:00
Anatolij Gustschin
e1c35c938d imx: mx6sxsabresd: disable obsolete VIDEO config
DM_VIDEO conversion deadline has passed, disable VIDEO config.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2020-10-26 20:52:58 +01:00
Tom Rini
54908d9ae1 Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-riscv
- No need to check before free in kendryte clk.
- Only enable OF_BOARD_FIXUP if U-Boot is configured for S-Mode.
- Reduce k210 dts DMA block size
- Move timers into drivers/timer
- Correct fu540 dts reg size of clint node
2020-10-26 08:25:37 -04:00
Pragnesh Patel
7257455e7c riscv: fu540: dts: Correct reg size of clint node
Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>
2020-10-26 10:01:37 +08:00
Sean Anderson
47d7e3b5eb riscv: Move timer portions of SiFive CLINT to drivers/timer
Half of this driver is a DM-based timer driver, and half is RISC-V-specific
IPI code. Move the timer portions in with the other timer drivers. The
KConfig is not moved, since it also enables IPIs. It could also be split
into two configs, but no boards use the timer but not the IPI atm, so I
haven't split it.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Rick Chen <rick@andestech.com>
2020-10-26 10:01:28 +08:00
Sean Anderson
7dbebebb79 timer: Add _TIMER suffix to Andes PLMT Kconfig
This matches the naming scheme of other timer drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Rick Chen <rick@andestech.com>
2020-10-26 10:01:28 +08:00
Sean Anderson
79b135f1f9 riscv: Move Andes PLMT driver to drivers/timer
This is a regular timer driver, and should live with the other timer
drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Rick Chen <rick@andestech.com>
2020-10-26 10:01:28 +08:00
Sean Anderson
963911e9e1 riscv: k210: Reduce DMA block size
Although the max DMA size supported by the hardware register is 22 bits (or
4M), the Linux driver for this device only supports transfers of up to 2M.
On a device with 8M total memory, I don't think it will make too much of a
difference.

Reported-by: Damien Le Moal <Damien.LeMoal@wdc.com>
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Rick Chen <rick@andestech.com>
2020-10-26 09:27:24 +08:00
Sean Anderson
32cef69da0 riscv: Only enable OF_BOARD_FIXUP for S-Mode
It is unsafe to enable OF_BOARD_FIXUP only based on OF_SEPARATE.
OF_SEPARATE may indicate that the user wishes U-Boot to use a different
device tree than one obtained via OF_PRIOR_STAGE. However, OF_SEPARATE may
also indicate that the device tree which would be obtained via
OF_PRIOR_STAGE is invalid, nonexistant, or otherwise unusable. In this
latter case, enabling OF_BOARD_FIXUP will result in corruption of the
device tree. To remedy this, only enable OF_BOARD_FIXUP if U-Boot is
configured for S-Mode.

Fixes: 1c17e55594
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Leo Liang <ycliang@andestech.com>
2020-10-26 09:27:19 +08:00
Heinrich Schuchardt
8bb7496ef9 clk: kendryte: no need to check argument of free()
free() checks if its argument is NULL. No need to check it twice.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
2020-10-26 09:27:13 +08:00
Tom Rini
c99e87f828 Merge branch '2020-10-23-misc-changes'
Highlights:
- Fix a problem with the bootm overlap tests
- Remove duplicated code in fatwrite
- Cleanup our current "misc" command code and add a new one for misc
  class devices.
- Various GPIO fixes
2020-10-24 10:49:28 -04:00
Peng Fan
16cc5ad0b4 power: regulator: add dummy helper
Add dummy helper to enabling the header could be included when
DM REGULATOR not enabled.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-10-23 16:38:33 -04:00
Peng Fan
62ee9576c6 phy: nop-phy: add clk bulk
Add clk bulk for nop-phy driver.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-10-23 16:38:31 -04:00
Jaehoon Chung
ef4f4f1f5f bootm: fix wrong conditions about images overlap
It doesn't need to consider start byte address.
If ramdisk size is 0x800000 and start address is 0x2700000, then it's
used until 0x02efffff, not 0x02f00000. But it's detected to overlapt RD
image, when kernel start address is 0x02f00000.
Because it's doing wrong calculation about rd_len.
This patch fixed wrong calculation address position when check
condition.

In addition, it needs to check one more condition about overlapping
entire area.

Fixes: commit fbde7589ce ("common: bootm: add checks to verify if ramdisk / fdtimage overlaps OS image")

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2020-10-23 13:33:07 -04:00
Lad Prabhakar
274227500a cmd: fat: Use do_save() for fatwrite
do_save() function defined in fs.c also supports FAT file system
re-use the same for fatwrite command.

Also fix the FAT test script to match the expected output.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
2020-10-23 13:33:07 -04:00
Heinrich Schuchardt
f52e925669 test: unit tests for print_freq(), print_size()
Provide unit tests for functions print_freq() and print_size().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-10-23 13:33:07 -04:00
Bin Meng
3bc0db11ba cmd: Add a 'misc' command to access miscellaneous devices
Enable the command "misc" for accessing miscellaneous devices with
a MISC uclass driver. The command provides listing all MISC devices
as well as read and write functionalities via their drivers.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
2020-10-23 13:33:07 -04:00
Bin Meng
3c7bb89718 cmd: Split out timer command from the sleep command
CONFIG_CMD_TIMER merits a single file instead of co-exist in the
sleep command file.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
2020-10-23 13:33:07 -04:00
Bin Meng
1606085409 cmd: Rename CMD_MISC to CMD_SLEEP
The "cmd/Kconfig" has a TODO description for CMD_MISC that it should
really be named as CMD_SLEEP. Change it in the whole source tree.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
2020-10-23 13:33:07 -04:00
Pali Rohár
ae897022d7 Makefile: Fix u-boot-nodtb.bin target
This change fixes two issues when building u-boot-nodtb.bin target:

* Remove intermediate binary u-boot-nodtb.bin from disk when static_rela
  call (which modifies u-boot-nodtb.bin binary) failed. It is required
  because previous objcopy call creates binary and static_rela finish it.

* Do not call static_rela cmd when u-boot-nodtb.bin binary was not
  created/updated by previous objcopy call.

Second fix would ensure that u-boot-nodtb.bin binary is not updated when
all prerequisites were up-to-date. And therefore final binary u-boot.bin
is not updated in case all prerequisites were not modified and were
up-to-date.

Now running 'make SOURCE_DATE_EPOCH=0 u-boot.bin' second time now does not
touch u-boot.bin binary in case nothing was modified, so GNU make can
correctly detect that everything is up-to-date.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2020-10-23 13:33:07 -04:00
Patrick Delaunay
7a462740d0 i2c: i2c-gpio: Convert to use APIs which support live DT
Use ofnode_ or dev_ APIs instead of fdt_ and fdtdec_ APIs so that the
driver can support live DT.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
2020-10-23 13:33:07 -04:00
Patrick Delaunay
a3b3c1d416 power: regulator: gpio-regulator: Convert to use APIs which support live DT
Use ofnode_ or dev_ APIs instead of fdt_ and fdtdec_ APIs so that the
driver can support live DT.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2020-10-23 13:33:07 -04:00
Patrick Delaunay
2d69b08618 power: regulator: gpio-regulator: protect count value
Update the size of states_array to avoid overflow for
dev_pdata->voltages[j] and dev_pdata->states[j].

As the size of array is GPIO_REGULATOR_MAX_STATES, the size of
states_array is limited by GPIO_REGULATOR_MAX_STATES * 2 = 4
instead of 8 previously.

The value of the "count" variable is limited by the third parameter of
fdtdec_get_int_array_count.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2020-10-23 13:33:06 -04:00
Heinrich Schuchardt
86eeac7bcf post: remove redundant condition
(A && A == 0x20) is only true for (A == 0x20).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2020-10-23 13:33:06 -04:00
Tom Rini
001ab99325 Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-samsung 2020-10-23 09:19:12 -04:00
Tom Rini
89a140ad30 Merge branch '2020-10-23-revert-xen-changes'
I had inadvertently merged the Xen series before everything was fully
happy with the board maintainer.  Revert the series.
2020-10-23 09:16:20 -04:00
Tom Rini
cc696f5256 Revert "serial: serial_xen: print U-Boot banner and others"
This reverts commit 18426bf022.

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-10-23 09:16:13 -04:00
Tom Rini
c3d3104506 Revert "arch: arm/xen: add putc() for debugging"
This reverts commit 3a51b2a2c3.

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-10-23 09:16:07 -04:00
Tom Rini
2c48370626 Revert "xen: add definitions for console_io"
This reverts commit 16389a74c5.

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-10-23 09:16:01 -04:00
Tom Rini
467591b8d2 Revert "serial: serial_xen: add DEBUG_UART support"
This reverts commit 82e21b391b.

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-10-23 09:15:55 -04:00
Tom Rini
18261b8552 Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-sunxi
- sun8i emac changes (Andre)
- SCP firmware (Samuel)
2020-10-22 20:32:02 -04:00
Tom Rini
ae4fdd7b04 Merge branch '2020-10-22-misc-changes'
- Assorted updates for Xen, IPQ40xx, ASpeed, Keymile
- Assorted typo / documentation fixes
- Fix default preboot cmd to act like before with USB_STORAGE set
- A number of other bugfixes throughout the code
2020-10-22 14:36:47 -04:00
Heiko Schocher
dddfde5401 rtc: move pcf8563 to Kconfig
add Kconfig option for pcf8563 driver and
run tools/moveconfig.py

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
2020-10-22 11:26:14 -04:00
Fabien Parent
0d67576713 mmc: mtk-sd: change some dev_err into dev_dbg
dev_err has been used for debugging and a few dev_err message are
printed for normal code execution. Make them dev_dbg instead.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2020-10-22 11:26:14 -04:00
AKASHI Takahiro
82e21b391b serial: serial_xen: add DEBUG_UART support
By using a hypervisor call, we can implement DEBUG_UART on xen.
This will allow us to see messages even earlier than serial_init().

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2020-10-22 11:26:14 -04:00
AKASHI Takahiro
16389a74c5 xen: add definitions for console_io
Those definitions added are used with HYPERVISOR_console_io().

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2020-10-22 11:26:14 -04:00