aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/efi/efi_stub.c2
-rw-r--r--lib/efi_loader/efi_device_path.c2
-rw-r--r--lib/time.c10
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;
}