diff options
author | Feng Tang <feng.tang@intel.com> | 2010-11-09 06:22:58 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-11-09 08:45:52 -0500 |
commit | 1da4b1c6a4dfb5a13d7147a27c1ac53fed09befd (patch) | |
tree | 7b68a2afaa2972217cb0eabc1aa30b8109955f41 /drivers | |
parent | 814ce2521121c2459e16cea8c7221e157edbeddd (diff) |
x86/mrst: Add SFI platform device parsing code
SFI provides a series of tables. These describe the platform devices present
including SPI and I²C devices, as well as various sensors, keypads and other
glue as well as interfaces provided via the SCU IPC mechanism (intel_scu_ipc.c)
This patch is a merge of the core elements and relevant fixes from the
Intel development code by Feng, Alek, myself into a single coherent patch
for upstream submission.
It provides the needed infrastructure to register I2C, SPI and platform devices
described by the tables, as well as handlers for some of the hardware already
supported in kernel. The 0.8 firmware also provides GPIO tables.
Devices are created at boot time or if they are SCU dependant at the point an
SCU is discovered. The existing Linux device mechanisms will then handle the
device binding. At an abstract level this is an SFI to Linux device translator.
Device/platform specific setup/glue is in this file. This is done so that the
drivers for the generic I²C and SPI bus devices remain cross platform as they
should.
(Updated from RFC version to correct the emc1403 name used by the firmware
and a wrongly used #define)
Signed-off-by: Alek Du <alek.du@linux.intel.com>
LKML-Reference: <20101109112158.20013.6158.stgit@localhost.localdomain>
[Clean ups, removal of 0.7 support]
Signed-off-by: Feng Tang <feng.tang@linux.intel.com>
[Clean ups]
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/platform/x86/intel_scu_ipc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/platform/x86/intel_scu_ipc.c b/drivers/platform/x86/intel_scu_ipc.c index 41a9e34899ac..ca35b0ce944a 100644 --- a/drivers/platform/x86/intel_scu_ipc.c +++ b/drivers/platform/x86/intel_scu_ipc.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/sfi.h> | 26 | #include <linux/sfi.h> |
27 | #include <asm/mrst.h> | 27 | #include <asm/mrst.h> |
28 | #include <asm/intel_scu_ipc.h> | 28 | #include <asm/intel_scu_ipc.h> |
29 | #include <asm/mrst.h> | ||
29 | 30 | ||
30 | /* IPC defines the following message types */ | 31 | /* IPC defines the following message types */ |
31 | #define IPCMSG_WATCHDOG_TIMER 0xF8 /* Set Kernel Watchdog Threshold */ | 32 | #define IPCMSG_WATCHDOG_TIMER 0xF8 /* Set Kernel Watchdog Threshold */ |
@@ -699,6 +700,9 @@ static int ipc_probe(struct pci_dev *dev, const struct pci_device_id *id) | |||
699 | iounmap(ipcdev.ipc_base); | 700 | iounmap(ipcdev.ipc_base); |
700 | return -ENOMEM; | 701 | return -ENOMEM; |
701 | } | 702 | } |
703 | |||
704 | intel_scu_devices_create(); | ||
705 | |||
702 | return 0; | 706 | return 0; |
703 | } | 707 | } |
704 | 708 | ||
@@ -720,6 +724,7 @@ static void ipc_remove(struct pci_dev *pdev) | |||
720 | iounmap(ipcdev.ipc_base); | 724 | iounmap(ipcdev.ipc_base); |
721 | iounmap(ipcdev.i2c_base); | 725 | iounmap(ipcdev.i2c_base); |
722 | ipcdev.pdev = NULL; | 726 | ipcdev.pdev = NULL; |
727 | intel_scu_devices_destroy(); | ||
723 | } | 728 | } |
724 | 729 | ||
725 | static const struct pci_device_id pci_ids[] = { | 730 | static const struct pci_device_id pci_ids[] = { |