summaryrefslogtreecommitdiff
path: root/drivers/rtc
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2025-08-04 15:57:11 -0600
committerTom Rini <[email protected]>2025-08-14 11:03:03 -0600
commitd7daa9274b1f7fad8f24c6020dc6225a1585de2f (patch)
treeadcc3a2195d37bc018535c9b27dbf96bcaaf937d /drivers/rtc
parentb86ace06d37bb2ef97dbd79723089f3b46e065a2 (diff)
rtc: mc146818: Fix building on more architectures
This driver makes calls to in8/out8(). On PowerPC these are separate and real calls but elsewhere they are able to simply be wrappers to inb/outb. Rework this logic to be able to build this driver on more platforms. Signed-off-by: Tom Rini <[email protected]>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/mc146818.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/rtc/mc146818.c b/drivers/rtc/mc146818.c
index c0d86c6d063..08bc528aeaf 100644
--- a/drivers/rtc/mc146818.c
+++ b/drivers/rtc/mc146818.c
@@ -11,9 +11,9 @@
#include <command.h>
#include <dm.h>
#include <rtc.h>
-
-#if defined(CONFIG_X86) || defined(CONFIG_TARGET_MALTA)
#include <asm/io.h>
+
+#if !defined(CONFIG_PPC)
#define in8(p) inb(p)
#define out8(p, v) outb(v, p)
#endif