]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
x86: cpu: i386: cpu: only set pci_ram_top if CONFIG_IS_ENABLED(PCI)
authorTroy Kisky <troykiskyboundary@gmail.com>
Mon, 13 Mar 2023 21:31:43 +0000 (14:31 -0700)
committerBin Meng <bmeng@tinylab.org>
Thu, 21 Sep 2023 22:03:46 +0000 (06:03 +0800)
This avoids an error when ifdef CONFIG_PCI is changed to
if CONFIG_IS_ENABLED(PCI)

Signed-off-by: Troy Kisky <troykiskyboundary@gmail.com>
[Rebased on top of u-boot/master]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/cpu/i386/cpu.c
include/asm-generic/global_data.h

index 91cd5d7c9e40fefa651e2c631a862e88f24c3785..8882532ebf3ad06ad387e2d99c606106abfb6583 100644 (file)
@@ -415,7 +415,7 @@ int cpu_phys_address_size(void)
 /* Don't allow PCI region 3 to use memory in the 2-4GB memory hole */
 static void setup_pci_ram_top(void)
 {
-       gd->pci_ram_top = 0x80000000U;
+       gd_set_pci_ram_top(0x80000000U);
 }
 
 static void setup_mtrr(void)
index 8fc205ded1a3185285645e5a78f14c25593276af..d364f1b965ebfdba80e75a8e2b5c5fa174aba213 100644 (file)
@@ -573,6 +573,13 @@ static_assert(sizeof(struct global_data) == GD_SIZE);
 #define gd_malloc_start()      0
 #define gd_set_malloc_start(val)
 #endif
+
+#if CONFIG_IS_ENABLED(PCI)
+#define gd_set_pci_ram_top(val)        gd->pci_ram_top = val
+#else
+#define gd_set_pci_ram_top(val)
+#endif
+
 /**
  * enum gd_flags - global data flags
  *