]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
rtc: mc146818: Fix building on more architectures
authorTom Rini <trini@konsulko.com>
Mon, 4 Aug 2025 21:57:11 +0000 (15:57 -0600)
committerTom Rini <trini@konsulko.com>
Thu, 14 Aug 2025 17:03:03 +0000 (11:03 -0600)
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 <trini@konsulko.com>
drivers/rtc/mc146818.c

index c0d86c6d063d6694de3d2e5fbd229605ae30c02c..08bc528aeaf7836550498d16ea2e0ca52012905d 100644 (file)
@@ -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