SFI: add support for v0.81 spec

There are 2 major changes from v0.81 to v0.7:
1. Consolidating the SPIB/I2CB tables into a new DEVS table,
which is more expandable and can support other bus types
than spi/i2c.
2. Creating a new GPIO table, which list all the GPIO pins
used in the platform.

However, to avoid breaking current platforms who use SFI v0.7
version firmware, the definitions for SPIB/I2CB will still
be kept for a while

Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>

authored by Feng Tang and committed by Len Brown 5487ab4a e40152ee

+24 -2
+1 -1
drivers/sfi/sfi_core.c
··· 390 390 if (sfi_disabled) 391 391 return; 392 392 393 - pr_info("Simple Firmware Interface v0.7 http://simplefirmware.org\n"); 393 + pr_info("Simple Firmware Interface v0.81 http://simplefirmware.org\n"); 394 394 395 395 if (sfi_find_syst() || sfi_parse_syst() || sfi_platform_init()) 396 396 disable_sfi();
+23 -1
include/linux/sfi.h
··· 73 73 #define SFI_SIG_SPIB "SPIB" 74 74 #define SFI_SIG_I2CB "I2CB" 75 75 #define SFI_SIG_GPEM "GPEM" 76 + #define SFI_SIG_DEVS "DEVS" 77 + #define SFI_SIG_GPIO "GPIO" 76 78 77 79 #define SFI_SIGNATURE_SIZE 4 78 80 #define SFI_OEM_ID_SIZE 6 ··· 147 145 u32 irq; 148 146 } __packed; 149 147 148 + struct sfi_device_table_entry { 149 + u8 type; /* bus type, I2C, SPI or ...*/ 150 + #define SFI_DEV_TYPE_SPI 0 151 + #define SFI_DEV_TYPE_I2C 1 152 + #define SFI_DEV_TYPE_UART 2 153 + #define SFI_DEV_TYPE_HSI 3 154 + #define SFI_DEV_TYPE_IPC 4 155 + 156 + u8 host_num; /* attached to host 0, 1...*/ 157 + u16 addr; 158 + u8 irq; 159 + u32 max_freq; 160 + char name[16]; 161 + } __packed; 162 + 163 + struct sfi_gpio_table_entry { 164 + char controller_name[16]; 165 + u16 pin_no; 166 + char pin_name[16]; 167 + } __packed; 168 + 150 169 struct sfi_spi_table_entry { 151 170 u16 host_num; /* attached to host 0, 1...*/ 152 171 u16 cs; /* chip select */ ··· 188 165 u16 logical_id; /* logical id */ 189 166 u16 phys_id; /* physical GPE id */ 190 167 } __packed; 191 - 192 168 193 169 typedef int (*sfi_table_handler) (struct sfi_table_header *table); 194 170