forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/arch/ia64/kernel/esi.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Extensible SAL Interface (ESI) support routines.
34 *
....@@ -17,10 +18,6 @@
1718 MODULE_LICENSE("GPL");
1819
1920 #define MODULE_NAME "esi"
20
-
21
-#define ESI_TABLE_GUID \
22
- EFI_GUID(0x43EA58DC, 0xCF28, 0x4b06, 0xB3, \
23
- 0x91, 0xB7, 0x50, 0x59, 0x34, 0x2B, 0xD4)
2421
2522 enum esi_systab_entry_type {
2623 ESI_DESC_ENTRY_POINT = 0
....@@ -47,27 +44,18 @@
4744
4845 static struct ia64_sal_systab *esi_systab;
4946
47
+extern unsigned long esi_phys;
48
+
5049 static int __init esi_init (void)
5150 {
52
- efi_config_table_t *config_tables;
5351 struct ia64_sal_systab *systab;
54
- unsigned long esi = 0;
5552 char *p;
5653 int i;
5754
58
- config_tables = __va(efi.systab->tables);
59
-
60
- for (i = 0; i < (int) efi.systab->nr_tables; ++i) {
61
- if (efi_guidcmp(config_tables[i].guid, ESI_TABLE_GUID) == 0) {
62
- esi = config_tables[i].table;
63
- break;
64
- }
65
- }
66
-
67
- if (!esi)
55
+ if (esi_phys == EFI_INVALID_TABLE_ADDR)
6856 return -ENODEV;
6957
70
- systab = __va(esi);
58
+ systab = __va(esi_phys);
7159
7260 if (strncmp(systab->signature, "ESIT", 4) != 0) {
7361 printk(KERN_ERR "bad signature in ESI system table!");