]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
x86: Move coreboot timestamp info into coreboot_tables.h
authorSimon Glass <sjg@chromium.org>
Mon, 15 Mar 2021 05:00:19 +0000 (18:00 +1300)
committerSimon Glass <sjg@chromium.org>
Sat, 27 Mar 2021 00:59:37 +0000 (13:59 +1300)
This all relates to the sysinfo structure provided by coreboot. Put the
timestamp definitions into the same file as the others. Tidy up a few
comments at the same time.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/x86/cpu/coreboot/timestamp.c
arch/x86/include/asm/arch-coreboot/timestamp.h
arch/x86/include/asm/coreboot_tables.h

index b1e29558826fa60e31d014b5913567d1cf072909..7f133cefae343606c61f89ccff0a7caef028b6b2 100644 (file)
 #include <asm/cb_sysinfo.h>
 #include <linux/compiler.h>
 
-struct timestamp_entry {
-       uint32_t        entry_id;
-       uint64_t        entry_stamp;
-} __packed;
-
-struct timestamp_table {
-       uint64_t        base_time;
-       uint32_t        max_entries;
-       uint32_t        num_entries;
-       struct timestamp_entry entries[0]; /* Variable number of entries */
-} __packed;
-
 static struct timestamp_table *ts_table  __attribute__((section(".data")));
 
 void timestamp_init(void)
index 85d42c02c46aaca2894f3caf387e47f9433e5563..531526b314187950c4b0f55784d6fd1b58872c60 100644 (file)
@@ -8,30 +8,7 @@
 #ifndef __COREBOOT_TIMESTAMP_H__
 #define __COREBOOT_TIMESTAMP_H__
 
-enum timestamp_id {
-       /* coreboot specific timestamp IDs */
-       TS_START_ROMSTAGE = 1,
-       TS_BEFORE_INITRAM = 2,
-       TS_AFTER_INITRAM = 3,
-       TS_END_ROMSTAGE = 4,
-       TS_START_COPYRAM = 8,
-       TS_END_COPYRAM = 9,
-       TS_START_RAMSTAGE = 10,
-       TS_DEVICE_ENUMERATE = 30,
-       TS_DEVICE_CONFIGURE = 40,
-       TS_DEVICE_ENABLE = 50,
-       TS_DEVICE_INITIALIZE = 60,
-       TS_DEVICE_DONE = 70,
-       TS_CBMEM_POST = 75,
-       TS_WRITE_TABLES = 80,
-       TS_LOAD_PAYLOAD = 90,
-       TS_ACPI_WAKE_JUMP = 98,
-       TS_SELFBOOT_JUMP = 99,
-
-       /* U-Boot entry IDs start at 1000 */
-       TS_U_BOOT_INITTED = 1000, /* This is where u-boot starts */
-       TS_U_BOOT_START_KERNEL = 1100, /* Right before jumping to kernel. */
-};
+#include <asm/cb_sysinfo.h>
 
 void timestamp_init(void);
 void timestamp_add(enum timestamp_id id, uint64_t ts_time);
index 7e1576768bee29f0ccf85bf915438cef9da6a989..dec0c14ec71cfe01f88d754af0bf9a8ddd86c386 100644 (file)
@@ -8,6 +8,44 @@
 #ifndef _COREBOOT_TABLES_H
 #define _COREBOOT_TABLES_H
 
+struct timestamp_entry {
+       u32     entry_id;
+       u64     entry_stamp;
+} __packed;
+
+struct timestamp_table {
+       u64     base_time;
+       u16     max_entries;
+       u16     tick_freq_mhz;
+       u32     num_entries;
+       struct timestamp_entry entries[0]; /* Variable number of entries */
+} __packed;
+
+enum timestamp_id {
+       /* coreboot specific timestamp IDs */
+       TS_START_ROMSTAGE = 1,
+       TS_BEFORE_INITRAM = 2,
+       TS_AFTER_INITRAM = 3,
+       TS_END_ROMSTAGE = 4,
+       TS_START_COPYRAM = 8,
+       TS_END_COPYRAM = 9,
+       TS_START_RAMSTAGE = 10,
+       TS_DEVICE_ENUMERATE = 30,
+       TS_DEVICE_CONFIGURE = 40,
+       TS_DEVICE_ENABLE = 50,
+       TS_DEVICE_INITIALIZE = 60,
+       TS_DEVICE_DONE = 70,
+       TS_CBMEM_POST = 75,
+       TS_WRITE_TABLES = 80,
+       TS_LOAD_PAYLOAD = 90,
+       TS_ACPI_WAKE_JUMP = 98,
+       TS_SELFBOOT_JUMP = 99,
+
+       /* U-Boot entry IDs start at 1000 */
+       TS_U_BOOT_INITTED = 1000, /* This is where U-Boot starts */
+       TS_U_BOOT_START_KERNEL = 1100, /* Right before jumping to kernel */
+};
+
 struct memory_area;
 
 struct cbuint64 {