aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/intel_scu_ipc.c
Commit message (Collapse)AuthorAgeFilesLines
* platform-drivers: x86: fix common misspellingsLucas De Marchi2011-03-281-1/+1
| | | | | Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* intel_scu_ipc: remove duplicated #includeHuang Weiyi2011-01-311-1/+0
| | | | | | | | Remove duplicated #include('s) in drivers/platform/x86/intel_scu_ipc.c Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* intel_scu_ipc: fix signedness bugAxel Lin2011-01-261-4/+3
| | | | | | | | | | | busy_loop() returns negative error code, thus change err variable from u32 to int to properly propagate correct error code. Also remove unneeded initialization for err and i variables. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* intel_scu_ipc: Utility driver for intel scu ipcSreedhara DS2011-01-071-2/+2
| | | | | | | | | | | This driver implements ioctl and interfaces with intel scu ipc driver. It is used to access pmic/msic registers from user space and firmware update utility. Signed-off-by: Sreedhara DS <sreedhara.ds@intel.com> [Extensive clean up and debug] Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* x86/mrst: Add SFI platform device parsing codeFeng Tang2010-11-091-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* scu_ipc: Fix warning caused by include changesAlan Cox2010-10-211-0/+1
| | | | | | | | | | We need to include the SFI headers. This is fine as the SCU is only relevant to x86 platforms with SFI. Fixes the -next warning report. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* intel_scu_ipc: fix IPC i2c write bugJianwei Yang2010-08-241-1/+1
| | | | | | | | We should pass the data to the data register. Signed-off-by: Jianwei Yang <jianwei.yang@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* intel_scu_ipc: fix size field for intel_scu_ipc_commandHong Liu2010-08-031-1/+1
| | | | | | | | | Size for PMIC read/write command is byte, while it is DWORD for other IPC commands. Signed-off-by: Hong Liu <hong.liu@intel.com> Signed-off-by: ALan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* intel_scu_ipc: return -EIO for error condition in busy_loopHong Liu2010-08-031-1/+4
| | | | | | Signed-off-by: Hong Liu <hong.liu@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* intel_scu_ipc: fix data packing of PMIC command on MoorestownHong Liu2010-08-031-5/+6
| | | | | | | | Data is 2-byte per entry for PMIC read-modify-update command. Signed-off-by: Hong Liu <hong.liu@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* Clean up command packing on MRST.Andy Ross2010-08-031-18/+11
| | | | | | | | Don't pass more bytes in the command length field than we filled. Signed-off-by: Andy Ross <andy.ross@windriver.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* zero the stack buffer before giving random garbage to the SCUArjan van de Ven2010-08-031-0/+2
| | | | | | | | | some messages take 4 bytes, but only fill 3 bytes.... this patch makes sure that whatever we send to the SCU is zeroed first Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* Fix stack buffer size for IPC writev messagesArjan van de Ven2010-08-031-2/+2
| | | | | | | | | | | | The stack buffer for IPC messages was 16 bytes, limiting messages to a size of 4 (each message is 32 bit). However, the touch screen driver is trying to send messages of size 5.... (AC: Set to 20 bytes having checked the max size allowed) Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* intel_scu_ipc: Use the new cpu identification functionAlan Cox2010-08-031-12/+5
| | | | | | | | This provides an architecture level board identify function to replace the cpuid direct usage Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* intel_scu_ipc: tidy up unused bitsSreedhara DS2010-08-031-4/+0
| | | | | | | | | Delete unused constants IPC_CMD_INDIRECT_RD and IPC_CMD_INDIRECT_WR Remove multiple inclusion of header file "asm/mrst.h" Signed-off-by: Sreedhara DS <sreedhara.ds@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* Remove indirect read write api support.Sreedhara DS2010-08-031-82/+0
| | | | | | | | | The firmware of production devices does not support this interface so this is dead code. Signed-off-by: Sreedhara DS <sreedhara.ds@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* intel_scu_ipc: Support Medfield processorsSreedhara DS2010-08-031-20/+33
| | | | | | | | | | Changes to work on bothMmoorestown and Medfield New pci id added for Medfield Return type of ipc_data_readl chnaged from u8 to u32 Signed-off-by: Sreedhara DS <sreedhara.ds@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* intel_scu_ipc: detect CPU type automaticallySreedhara DS2010-08-031-7/+12
| | | | | | | | Intel SCU message formats depend upon the processor type. Replace the module option with automatic detection of the processor type. Signed-off-by: Sreedhara DS <sreedhara.ds@intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* intel_scu_ipc: Oops/crash fixesSreedhara DS2010-07-191-4/+8
| | | | | | | | | - fix reversing of command/sub arguments - fix a crash if the i2c interface is called before the device is found Signed-off-by: Sreedhara DS <sreedhara.ds@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* intel_scu_ipc: Length fixAlan Cox2010-06-011-1/+1
| | | | | | | Commands with data must set the length in the message. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* IPC driver for Intel Mobile Internet Device (MID) platformsSreedhara DS2010-05-171-0/+829
The IPC (inter processor communications) is used to provide the communications between kernel and system control units on some embedded Intel x86 platforms. (Various bits of clean up and restructuring by Alan Cox) Signed-off-by: Sreedhara DS <sreedhara.ds@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com>