aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-07-15 21:38:39 -0600
committerBin Meng <bmeng@tinylab.org>2023-07-17 17:08:44 +0800
commit70f2030f02696ee1820d8df690e878de078b01b3 (patch)
tree280244d0c76bc3b2d5326e978a73bbceb94c56ec
parent603363927a0da1be12ff7e7b073202861c979693 (diff)
downloadu-boot-70f2030f02696ee1820d8df690e878de078b01b3.zip
u-boot-70f2030f02696ee1820d8df690e878de078b01b3.tar.gz
u-boot-70f2030f02696ee1820d8df690e878de078b01b3.tar.bz2
bios_emulator: Drop VIDEO_IO_OFFSET
This is always zero in the source tree, so drop it. While we are here, add a comment to _X86EMU_env since the symbol is actually defined twice, which can cause confusion when building. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
-rw-r--r--drivers/bios_emulator/biosemui.h18
-rw-r--r--drivers/bios_emulator/x86emu/sys.c1
-rw-r--r--include/configs/conga-qeval20-qa3-e3845.h2
-rw-r--r--include/configs/dfi-bt700.h2
-rw-r--r--include/configs/minnowmax.h2
-rw-r--r--include/configs/som-db5800-som-6867.h2
-rw-r--r--include/configs/theadorable-x86-common.h2
-rw-r--r--include/configs/x86-chromebook.h2
8 files changed, 10 insertions, 21 deletions
diff --git a/drivers/bios_emulator/biosemui.h b/drivers/bios_emulator/biosemui.h
index 7853015..954cd88 100644
--- a/drivers/bios_emulator/biosemui.h
+++ b/drivers/bios_emulator/biosemui.h
@@ -128,19 +128,19 @@ typedef struct {
u32 finalVal;
} BE_portInfo;
-#define PM_inpb(port) inb(port+VIDEO_IO_OFFSET)
-#define PM_inpw(port) inw(port+VIDEO_IO_OFFSET)
-#define PM_inpd(port) inl(port+VIDEO_IO_OFFSET)
-#define PM_outpb(port,val) outb(val,port+VIDEO_IO_OFFSET)
-#define PM_outpw(port,val) outw(val,port+VIDEO_IO_OFFSET)
-#define PM_outpd(port,val) outl(val,port+VIDEO_IO_OFFSET)
+#define PM_inpb(port) inb(port)
+#define PM_inpw(port) inw(port)
+#define PM_inpd(port) inl(port)
+#define PM_outpb(port, val) outb(val, port)
+#define PM_outpw(port, val) outw(val, port)
+#define PM_outpd(port, val) outl(val, port)
#define LOG_inpb(port) PM_inpb(port)
#define LOG_inpw(port) PM_inpw(port)
#define LOG_inpd(port) PM_inpd(port)
-#define LOG_outpb(port,val) PM_outpb(port,val)
-#define LOG_outpw(port,val) PM_outpw(port,val)
-#define LOG_outpd(port,val) PM_outpd(port,val)
+#define LOG_outpb(port, val) PM_outpb(port, val)
+#define LOG_outpw(port, val) PM_outpw(port, val)
+#define LOG_outpd(port, val) PM_outpd(port, val)
/*-------------------------- Function Prototypes --------------------------*/
diff --git a/drivers/bios_emulator/x86emu/sys.c b/drivers/bios_emulator/x86emu/sys.c
index c2db121..882a8a3 100644
--- a/drivers/bios_emulator/x86emu/sys.c
+++ b/drivers/bios_emulator/x86emu/sys.c
@@ -44,6 +44,7 @@
/*------------------------- Global Variables ------------------------------*/
+/* Note: bios.c defines this if the emulator is not enabled */
X86EMU_sysEnv _X86EMU_env; /* Global emulator machine state */
X86EMU_intrFuncs _X86EMU_intrTab[256];
diff --git a/include/configs/conga-qeval20-qa3-e3845.h b/include/configs/conga-qeval20-qa3-e3845.h
index 60617e6..03c364f 100644
--- a/include/configs/conga-qeval20-qa3-e3845.h
+++ b/include/configs/conga-qeval20-qa3-e3845.h
@@ -16,8 +16,6 @@
"stdout=serial\0" \
"stderr=serial\0"
-#define VIDEO_IO_OFFSET 0
-
#undef CFG_EXTRA_ENV_SETTINGS
#define CFG_EXTRA_ENV_SETTINGS \
"kernel-ver=4.4.0-22\0" \
diff --git a/include/configs/dfi-bt700.h b/include/configs/dfi-bt700.h
index 05389a4..be095e2 100644
--- a/include/configs/dfi-bt700.h
+++ b/include/configs/dfi-bt700.h
@@ -20,8 +20,6 @@
"stdout=serial\0" \
"stderr=serial\0"
-#define VIDEO_IO_OFFSET 0
-
#undef CFG_EXTRA_ENV_SETTINGS
#define CFG_EXTRA_ENV_SETTINGS \
"kernel-ver=4.4.0-24\0" \
diff --git a/include/configs/minnowmax.h b/include/configs/minnowmax.h
index 4a12c2f..842672d 100644
--- a/include/configs/minnowmax.h
+++ b/include/configs/minnowmax.h
@@ -17,6 +17,4 @@
"stderr=vidconsole,serial\0" \
"usb_pgood_delay=40\0"
-#define VIDEO_IO_OFFSET 0
-
#endif /* __CONFIG_H */
diff --git a/include/configs/som-db5800-som-6867.h b/include/configs/som-db5800-som-6867.h
index b2e7aa1..5f7eabd 100644
--- a/include/configs/som-db5800-som-6867.h
+++ b/include/configs/som-db5800-som-6867.h
@@ -16,6 +16,4 @@
"stdout=serial,vidconsole\0" \
"stderr=serial,vidconsole\0"
-#define VIDEO_IO_OFFSET 0
-
#endif /* __CONFIG_H */
diff --git a/include/configs/theadorable-x86-common.h b/include/configs/theadorable-x86-common.h
index b23b878..46aef23 100644
--- a/include/configs/theadorable-x86-common.h
+++ b/include/configs/theadorable-x86-common.h
@@ -15,8 +15,6 @@
"stdout=serial\0" \
"stderr=serial\0"
-#define VIDEO_IO_OFFSET 0
-
/* Environment settings */
#undef CFG_EXTRA_ENV_SETTINGS
diff --git a/include/configs/x86-chromebook.h b/include/configs/x86-chromebook.h
index 98abb00..6bf90c7 100644
--- a/include/configs/x86-chromebook.h
+++ b/include/configs/x86-chromebook.h
@@ -10,8 +10,6 @@
#define CFG_X86_REFCODE_ADDR 0xffea0000
#define CFG_X86_REFCODE_RUN_ADDR 0
-#define VIDEO_IO_OFFSET 0
-
#define CFG_STD_DEVICES_SETTINGS "stdin=usbkbd,i8042-kbd,serial\0" \
"stdout=vidconsole,serial\0" \
"stderr=vidconsole,serial\0"