SFI v0.8 has better abstract of listing non-detectable peripherals,
and most of Intel MID systems have adopted SFI 0.8, so remove the
old code.

Signed-off-by: Feng Tang <[email protected]>
---
 arch/x86/kernel/mrst.c |  135 +-----------------------------------------------
 1 files changed, 1 insertions(+), 134 deletions(-)

diff --git a/arch/x86/kernel/mrst.c b/arch/x86/kernel/mrst.c
index f418f6c..fd0ba3c 100644
--- a/arch/x86/kernel/mrst.c
+++ b/arch/x86/kernel/mrst.c
@@ -512,7 +512,7 @@ static void *pmic_gpio_platform_data(void *info)
        int gpio_base = get_gpio_by_name("pmic_gpio_base");
 
        if (gpio_base == -1)
-               gpio_base = 64; /* Needed for 0.7 SFI firmware */
+               gpio_base = 64;
        pmic_gpio_pdata.gpio_base = gpio_base;
        pmic_gpio_pdata.irq_base = gpio_base + MRST_IRQ_OFFSET;
        pmic_gpio_pdata.gpiointr = 0xffffeff8;
@@ -1327,141 +1327,8 @@ static int __init sfi_parse_devs(struct 
sfi_table_header *table)
        return 0;
 }
 
-#define MRST_SPI2_CS_START     4
-static struct intel_pmic_gpio_platform_data pmic_gpio_pdata;
-
-static int __init sfi_parse_spib(struct sfi_table_header *table)
-{
-       struct sfi_table_simple *sb;
-       struct sfi_spi_table_entry *pentry;
-       struct spi_board_info *info;
-       int num, i, j;
-       int ioapic;
-       struct io_apic_irq_attr irq_attr;
-
-       sb = (struct sfi_table_simple *)table;
-       num = SFI_GET_NUM_ENTRIES(sb, struct sfi_spi_table_entry);
-       pentry = (struct sfi_spi_table_entry *) sb->pentry;
-
-       info = kzalloc(num * sizeof(*info), GFP_KERNEL);
-       if (!info) {
-               pr_info("%s(): Error in kzalloc\n", __func__);
-               return -ENOMEM;
-       }
-
-       if (num)
-               pr_info("Moorestown SPI devices info:\n");
-
-       for (i = 0, j = 0; i < num; i++, pentry++) {
-               strncpy(info[j].modalias, pentry->name, 16);
-               info[j].irq = pentry->irq_info;
-               info[j].bus_num = pentry->host_num;
-               info[j].chip_select = pentry->cs;
-               info[j].max_speed_hz = 3125000; /* hard coded */
-               if (info[i].chip_select >= MRST_SPI2_CS_START) {
-                       /* these SPI2 devices are not exposed to system as PCI
-                        * devices, but they have separate RTE entry in IOAPIC
-                        * so we have to enable them one by one here
-                        */
-                       ioapic = mp_find_ioapic(info[j].irq);
-                       irq_attr.ioapic = ioapic;
-                       irq_attr.ioapic_pin = info[j].irq;
-                       irq_attr.trigger = 1;
-                       irq_attr.polarity = 1;
-                       io_apic_set_pci_routing(NULL, info[j].irq,
-                                                       &irq_attr);
-               }
-               info[j].platform_data = pentry->dev_info;
-
-               if (!strcmp(pentry->name, "pmic_gpio")) {
-                       memcpy(&pmic_gpio_pdata, pentry->dev_info, 8);
-                       pmic_gpio_pdata.gpiointr = 0xffffeff8;
-                       info[j].platform_data = &pmic_gpio_pdata;
-               }
-               pr_info("info[%d]: name = %16.16s, irq = 0x%04x, bus = %d, "
-                       "cs = %d\n", j, info[j].modalias, info[j].irq,
-                       info[j].bus_num, info[j].chip_select);
-               sfi_handle_spi_dev(&info[j]);
-               j++;
-       }
-       kfree(info);
-       return 0;
-}
-
-#define MRST_I2C_BUSNUM        3
-static struct pca953x_platform_data max7315_pdata;
-static struct pca953x_platform_data max7315_pdata_2;
-static struct lis3lv02d_platform_data lis3lv02d_pdata;
-
-static int __init sfi_parse_i2cb(struct sfi_table_header *table)
-{
-       struct sfi_table_simple *sb;
-       struct sfi_i2c_table_entry *pentry;
-       struct i2c_board_info info;
-       int num, i, busnum;
-
-       sb = (struct sfi_table_simple *)table;
-       num = SFI_GET_NUM_ENTRIES(sb, struct sfi_i2c_table_entry);
-       pentry = (struct sfi_i2c_table_entry *) sb->pentry;
-
-       if (num <= 0)
-               return -ENODEV;
-
-       for (i = 0; i < num; i++, pentry++) {
-               busnum = pentry->host_num;
-               if (busnum >= MRST_I2C_BUSNUM || busnum < 0)
-                       continue;
-
-               memset(&info, 0, sizeof(info));
-               strncpy(info.type, pentry->name, 16);
-               info.irq = pentry->irq_info;
-               info.addr = pentry->addr;
-               info.platform_data = pentry->dev_info;
-
-               if (!strcmp(pentry->name, "i2c_max7315")) {
-                       strcpy(info.type, "max7315");
-                       max7315_pdata.irq_base = *(int *)pentry->dev_info;
-                       max7315_pdata.gpio_base =
-                               *((u32 *)pentry->dev_info + 1);
-                       info.platform_data = &max7315_pdata;
-               } else if (!strcmp(pentry->name, "i2c_max7315_2")) {
-                       strcpy(info.type, "max7315");
-                       max7315_pdata_2.irq_base = *(int *)pentry->dev_info;
-                       max7315_pdata_2.gpio_base =
-                               *((u32 *)pentry->dev_info + 1);
-                       info.platform_data = &max7315_pdata_2;
-               } else if (!strcmp(pentry->name, "i2c_accel")) {
-                       strcpy(info.type, "lis3lv02d");
-                       info.platform_data = &lis3lv02d_pdata;
-               } else if (!strcmp(pentry->name, "i2c_als")) {
-                       strcpy(info.type, "isl29020");
-                       info.platform_data = NULL;
-               } else if (!strcmp(pentry->name, "i2c_thermal")) {
-                       strcpy(info.type, "emc1403");
-                       info.platform_data = NULL;
-               } else if (!strcmp(pentry->name, "i2c_compass")) {
-                       strcpy(info.type, "hmc6352");
-                       info.platform_data = NULL;
-               }
-
-               pr_info("info[%d]: bus = %d, name = %16.16s, irq = 0x%04x, "
-                       "addr = 0x%x\n", i, busnum, info.type,
-                      info.irq, info.addr);
-
-               i2c_register_board_info(busnum, &info, 1);
-       }
-
-       return 0;
-}
-
-
 static int __init mrst_platform_init(void)
 {
-       /* Keep for back compatibility for SFI 0.7 and before */
-       sfi_table_parse(SFI_SIG_SPIB, NULL, NULL, sfi_parse_spib);
-       sfi_table_parse(SFI_SIG_I2CB, NULL, NULL, sfi_parse_i2cb);
-
-       /* For SFi 0.8 version */
        sfi_table_parse(SFI_SIG_GPIO, NULL, NULL, sfi_parse_gpio);
        sfi_table_parse(SFI_SIG_DEVS, NULL, NULL, sfi_parse_devs);
        return 0;
-- 
1.7.0.4

_______________________________________________
Meego-kernel mailing list
[email protected]
http://lists.meego.com/listinfo/meego-kernel

Reply via email to