]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
x86: dts: Define a default TSC timer frequency
authorBin Meng <bmeng.cn@gmail.com>
Wed, 28 Jul 2021 04:00:23 +0000 (12:00 +0800)
committerBin Meng <bmeng.cn@gmail.com>
Mon, 2 Aug 2021 07:11:40 +0000 (15:11 +0800)
If for some reason, TSC timer frequency cannot be determined from
hardware, nor is it specified in the device tree, U-Boot will panic
resulting in endless reset during boot.

Let's define a default TSC timer frequency using the Kconfig value
CONFIG_X86_TSC_TIMER_FREQ (note: #include must be used instead of
/include/ otherwise the macro is not pre-processed).

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
20 files changed:
arch/x86/dts/bayleybay.dts
arch/x86/dts/baytrail_som-db5800-som-6867.dts
arch/x86/dts/cherryhill.dts
arch/x86/dts/chromebook_coral.dts
arch/x86/dts/chromebook_link.dts
arch/x86/dts/chromebook_samus.dts
arch/x86/dts/chromebox_panther.dts
arch/x86/dts/conga-qeval20-qa3-e3845.dts
arch/x86/dts/coreboot.dts
arch/x86/dts/cougarcanyon2.dts
arch/x86/dts/crownbay.dts
arch/x86/dts/edison.dts
arch/x86/dts/efi-x86_app.dts
arch/x86/dts/efi-x86_payload.dts
arch/x86/dts/galileo.dts
arch/x86/dts/minnowmax.dts
arch/x86/dts/qemu-x86_i440fx.dts
arch/x86/dts/qemu-x86_q35.dts
arch/x86/dts/slimbootloader.dts
arch/x86/dts/tsc_timer.dtsi

index b487bc6655286eba77d7a4299e4920e05d056252..b92729dd0b0bd7bd88730b1cce9b9a73c8bc9ae9 100644 (file)
@@ -14,8 +14,8 @@
 /include/ "serial.dtsi"
 /include/ "reset.dtsi"
 /include/ "rtc.dtsi"
-/include/ "tsc_timer.dtsi"
 
+#include "tsc_timer.dtsi"
 #include "smbios.dtsi"
 
 / {
index 9c9b5735d726671374304ce2ff02e70f001cefdb..e9b56de7927b2fcc54ad5da75fc2f1f27da80f2a 100644 (file)
@@ -14,8 +14,8 @@
 /include/ "serial.dtsi"
 /include/ "reset.dtsi"
 /include/ "rtc.dtsi"
-/include/ "tsc_timer.dtsi"
 
+#include "tsc_timer.dtsi"
 #include "smbios.dtsi"
 
 / {
index 54a9e566d1c64d6f76bde90c8da71005a6ac235b..7a273670bdecc3022c405bd42fa1d78655508292 100644 (file)
@@ -12,8 +12,8 @@
 /include/ "serial.dtsi"
 /include/ "reset.dtsi"
 /include/ "rtc.dtsi"
-/include/ "tsc_timer.dtsi"
 
+#include "tsc_timer.dtsi"
 #include "smbios.dtsi"
 
 / {
index 8e98e2d5e021267fcb0426947e500a67c31d7122..f0caaacfee2d09c2fae9693eb6981e5405de8b88 100644 (file)
@@ -8,7 +8,8 @@
 /include/ "keyboard.dtsi"
 /include/ "reset.dtsi"
 /include/ "rtc.dtsi"
-/include/ "tsc_timer.dtsi"
+
+#include "tsc_timer.dtsi"
 
 #if defined(CONFIG_CHROMEOS_VBOOT) && defined(CONFIG_ROM_SIZE)
 #include "chromeos-x86.dtsi"
index 4f8c65974b486808b31b9681bb09da30d838b322..11ff520ac2a21a33dc7bcdaf2b8a2964a4b373d7 100644 (file)
@@ -9,8 +9,8 @@
 /include/ "serial.dtsi"
 /include/ "reset.dtsi"
 /include/ "rtc.dtsi"
-/include/ "tsc_timer.dtsi"
 
+#include "tsc_timer.dtsi"
 #include "smbios.dtsi"
 
 / {
index e624264424ca9cd0f54dbea06a0c387386db4b41..930ec1ace0ecba44c1114bf483218f5029ba6b82 100644 (file)
@@ -7,8 +7,8 @@
 /include/ "serial.dtsi"
 /include/ "reset.dtsi"
 /include/ "rtc.dtsi"
-/include/ "tsc_timer.dtsi"
 
+#include "tsc_timer.dtsi"
 #include "smbios.dtsi"
 
 #if defined(CONFIG_CHROMEOS_VBOOT) && defined(CONFIG_ROM_SIZE)
index 71519ca2cd7cd17c77d1410ab433afed1f274c6e..b25f759c79d4c40bc53f0e6d7cc76761d7e6f277 100644 (file)
@@ -4,8 +4,8 @@
 /include/ "serial.dtsi"
 /include/ "reset.dtsi"
 /include/ "rtc.dtsi"
-/include/ "tsc_timer.dtsi"
 
+#include "tsc_timer.dtsi"
 #include "smbios.dtsi"
 
 / {
index 43fea11eb1a2386f66749a72b71048298cd2183e..705157ceaa3346846c32345215235a7fb5634224 100644 (file)
@@ -14,8 +14,8 @@
 /include/ "serial.dtsi"
 /include/ "reset.dtsi"
 /include/ "rtc.dtsi"
-/include/ "tsc_timer.dtsi"
 
+#include "tsc_timer.dtsi"
 #include "smbios.dtsi"
 
 / {
index 38ddaafa1981a12de5aabb0deb840a9c972e1897..d21978d6e094a535e192ea1380af6694cc46d55b 100644 (file)
@@ -12,7 +12,8 @@
 /include/ "pcspkr.dtsi"
 /include/ "reset.dtsi"
 /include/ "rtc.dtsi"
-/include/ "tsc_timer.dtsi"
+
+#include "tsc_timer.dtsi"
 
 / {
        model = "coreboot x86 payload";
                stdout-path = "/serial";
        };
 
-       tsc-timer {
-               clock-frequency = <1000000000>;
-       };
-
        pci {
                compatible = "pci-x86";
                u-boot,dm-pre-reloc;
index 94ec111db2bcd529548e89f127572debd99f3ffc..58395b5eb6b80fba5b1b9aa53c8b0f4e4a47318e 100644 (file)
@@ -12,8 +12,8 @@
 /include/ "keyboard.dtsi"
 /include/ "reset.dtsi"
 /include/ "rtc.dtsi"
-/include/ "tsc_timer.dtsi"
 
+#include "tsc_timer.dtsi"
 #include "smbios.dtsi"
 
 / {
index a7166a974916249410d5693553bf6150e171f024..576835253123f64198de092e80ffd50427a197b2 100644 (file)
@@ -13,8 +13,8 @@
 /include/ "pcspkr.dtsi"
 /include/ "reset.dtsi"
 /include/ "rtc.dtsi"
-/include/ "tsc_timer.dtsi"
 
+#include "tsc_timer.dtsi"
 #include "smbios.dtsi"
 
 / {
index 8d245bffc2f3d2094da690994b7053cb5260ec57..64b6228363779e196c28cd3306b415f7cb0a855b 100644 (file)
@@ -10,8 +10,8 @@
 
 /include/ "skeleton.dtsi"
 /include/ "rtc.dtsi"
-/include/ "tsc_timer.dtsi"
 
+#include "tsc_timer.dtsi"
 #include "smbios.dtsi"
 
 / {
index 20150f6ede4e8e6881ff4be4614a61b736955fa8..04e044a07a87265cbc40fd99e50da509a9b34f1c 100644 (file)
@@ -6,7 +6,8 @@
 /dts-v1/;
 
 /include/ "skeleton.dtsi"
-/include/ "tsc_timer.dtsi"
+
+#include "tsc_timer.dtsi"
 
 / {
        model = "EFI x86 Application";
                stdout-path = &serial;
        };
 
-       tsc-timer {
-               clock-frequency = <1000000000>;
-       };
-
        serial: serial {
                compatible = "efi,uart";
        };
index 5ccb98677498a1de2f0f6d8bbc55e3cff4f9f77d..087865f2256abcf1e8e1f715a48393c872211141 100644 (file)
@@ -12,7 +12,8 @@
 /include/ "keyboard.dtsi"
 /include/ "reset.dtsi"
 /include/ "rtc.dtsi"
-/include/ "tsc_timer.dtsi"
+
+#include "tsc_timer.dtsi"
 
 / {
        model = "EFI x86 Payload";
                stdout-path = "/serial";
        };
 
-       tsc-timer {
-               clock-frequency = <1000000000>;
-       };
-
        pci {
                compatible = "pci-x86";
                u-boot,dm-pre-reloc;
index b5ba1181ddb7430e1b7a9002329e87087ad89190..4120e8f5c4624ad380f3ab4d1fc757d29442c76d 100644 (file)
@@ -11,7 +11,8 @@
 /include/ "skeleton.dtsi"
 /include/ "reset.dtsi"
 /include/ "rtc.dtsi"
-/include/ "tsc_timer.dtsi"
+
+#include "tsc_timer.dtsi"
 
 / {
        model = "Intel Galileo";
                };
        };
 
-       tsc-timer {
-               clock-frequency = <CONFIG_X86_TSC_TIMER_FREQ>;
-       };
-
        mrc {
                compatible = "intel,quark-mrc";
                flags = <MRC_FLAG_SCRAMBLE_EN>;
index aa7718f31c4dda1c49f7334ed8e755398dfee4b5..68e0510c68d865cfd05a07fc278fd16d3b36a805 100644 (file)
@@ -13,8 +13,8 @@
 /include/ "serial.dtsi"
 /include/ "reset.dtsi"
 /include/ "rtc.dtsi"
-/include/ "tsc_timer.dtsi"
 
+#include "tsc_timer.dtsi"
 #include "smbios.dtsi"
 
 / {
index c33a11d593f5721185a6aad601d6fb6d55ee9bfb..6556e9ebcd86bf75afe4a7db2aaebb1a6e4dee49 100644 (file)
@@ -12,8 +12,8 @@
 /include/ "keyboard.dtsi"
 /include/ "reset.dtsi"
 /include/ "rtc.dtsi"
-/include/ "tsc_timer.dtsi"
 
+#include "tsc_timer.dtsi"
 #include "smbios.dtsi"
 
 / {
                };
        };
 
-       tsc-timer {
-               clock-frequency = <1000000000>;
-       };
-
        pci {
                compatible = "pci-x86";
                #address-cells = <3>;
index 9faae7fb5693783b5384535419543a0bcdb81e75..d0830892e83bba268488ee5cce4aced46e5ba3a7 100644 (file)
@@ -22,8 +22,8 @@
 /include/ "keyboard.dtsi"
 /include/ "reset.dtsi"
 /include/ "rtc.dtsi"
-/include/ "tsc_timer.dtsi"
 
+#include "tsc_timer.dtsi"
 #include "smbios.dtsi"
 
 / {
                };
        };
 
-       tsc-timer {
-               clock-frequency = <1000000000>;
-       };
-
        pci {
                compatible = "pci-x86";
                #address-cells = <3>;
index d04095c4f8eb4a131e52f147f3653695f44f0287..9b581c8489b45234562ff482a1bfce6cc6b28561 100644 (file)
@@ -7,7 +7,7 @@
 
 /include/ "skeleton.dtsi"
 /include/ "reset.dtsi"
-/include/ "tsc_timer.dtsi"
+#include "tsc_timer.dtsi"
 
 / {
        model = "slimbootloader x86 payload";
index 4f5021d96fe2e3ace6fcf517fba50054d0bb8b83..4df8e9d7fcfc9b4d1352fb13c9b1b2dbf82829fb 100644 (file)
@@ -1,6 +1,7 @@
 / {
        tsc-timer {
                compatible = "x86,tsc-timer";
+               clock-frequency = <CONFIG_X86_TSC_TIMER_FREQ>;
                u-boot,dm-pre-reloc;
        };
 };