diff options
author | Tom Rini <trini@konsulko.com> | 2021-01-05 22:34:43 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-01-05 22:34:43 -0500 |
commit | b11f634b1c1be6ab419758c6596c673445e5ac70 (patch) | |
tree | 2329e1ff53c6c543e01d84b7901c53621ad8b7f9 /lib | |
parent | 720620e6916ba40b9a173bb07706d2c73f3c23e7 (diff) | |
parent | 970349a96dac3ad46c33851b1a773bfe3f1d4b33 (diff) | |
download | u-boot-b11f634b1c1be6ab419758c6596c673445e5ac70.tar.gz |
Merge tag 'dm-pull-5jan21' of git://git.denx.de/u-boot-dm into nextWIP/05Jan2021-next
Driver model: make some udevice fields private
Driver model: Rename U_BOOT_DEVICE et al.
dtoc: Tidy up and add more tests
ns16550 code clean-up
x86 and sandbox minor fixes for of-platdata
dtoc prepration for adding build-time instantiation
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi/efi_stub.c | 2 | ||||
-rw-r--r-- | lib/efi_loader/efi_device_path.c | 2 | ||||
-rw-r--r-- | lib/time.c | 10 |
3 files changed, 10 insertions, 4 deletions
diff --git a/lib/efi/efi_stub.c b/lib/efi/efi_stub.c index 7d650d512e..b3393e47fa 100644 --- a/lib/efi/efi_stub.c +++ b/lib/efi/efi_stub.c @@ -67,7 +67,7 @@ void putc(const char ch) putc('\r'); if (use_uart) { - NS16550_t com_port = (NS16550_t)0x3f8; + struct ns16550 *com_port = (struct ns16550 *)0x3f8; while ((inb((ulong)&com_port->lsr) & UART_LSR_THRE) == 0) ; diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c index 99b5078006..c9315dd458 100644 --- a/lib/efi_loader/efi_device_path.c +++ b/lib/efi_loader/efi_device_path.c @@ -531,7 +531,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) case UCLASS_ETH: { struct efi_device_path_mac_addr *dp = dp_fill(buf, dev->parent); - struct eth_pdata *pdata = dev->plat; + struct eth_pdata *pdata = dev_get_plat(dev); dp->dp.type = DEVICE_PATH_TYPE_MESSAGING_DEVICE; dp->dp.sub_type = DEVICE_PATH_SUB_TYPE_MSG_MAC_ADDR; diff --git a/lib/time.c b/lib/time.c index 88bc50405f..cc6944ec34 100644 --- a/lib/time.c +++ b/lib/time.c @@ -9,6 +9,7 @@ #include <dm.h> #include <errno.h> #include <init.h> +#include <spl.h> #include <time.h> #include <timer.h> #include <watchdog.h> @@ -96,8 +97,13 @@ uint64_t notrace get_ticks(void) } ret = timer_get_count(gd->timer, &count); - if (ret) - panic("Could not read count from timer (err %d)\n", ret); + if (ret) { + if (spl_phase() > PHASE_TPL) + panic("Could not read count from timer (err %d)\n", + ret); + else + panic("no timer (err %d)\n", ret); + } return count; } |