aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* staging: comedi: addi_watchdog: all i/o registers are 32-bitH Hartley Sweeten2013-01-25
| | | | | | | | | | | All the i/o registers used by the watchdog device on the addi-data boards are 32-bit. Make sure all the i/o commands use outl/inl to access the registers. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_1516: use addi_watchdog moduleH Hartley Sweeten2013-01-25
| | | | | | | | | | Use the addi_watchdog module to provide support for the watchdog subdevice. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/comedi: Use comedi_pci_auto_unconfig directly for pci_driver.removePeter Huewe2013-01-25
| | | | | | | | | | | | (Almost) all comedi pci drivers have some wrapper for their pci_driver.remove function which simply calls comedi_pci_auto_unconfig which has the same function prototype as the wrapper. -> we can remove these wrappers and call comedi_pci_auto_unconfig directly. This removes a lot some boilerplate code and saves some bytes. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/comedi: Move comedi_pci_auto_unconfig to drivers.cPeter Huewe2013-01-25
| | | | | | | | | | Since comedi_pci_auto_unconfig cannot be inlined anymore after staging/comedi: Use comedi_pci_auto_unconfig directly for pci_driver.remove is applied, it makes sense to move it drivers.c Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: cleanup comments in hwdrv_apci3501.cH Hartley Sweeten2013-01-25
| | | | | | | | | | | | | | The watchdog/timer subdevice in this driver is basically broke. The subdevice functions abuse the comedi API and the (*insn_config) simply doesn't work due to it's treating data[0] as a parameter and not as the config "instruction". For now, cleanup the comments for the functions so they are at least readable. Then we can figure out how to fix the subdevice. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: define the timer i/o registersH Hartley Sweeten2013-01-25
| | | | | | | | | Create, and use, defines for the i/o registers used with the timer subdevice. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: change the MODULE_DESCRIPTIONH Hartley Sweeten2013-01-25
| | | | | | | | | | Change the MODULE_DESCRIPTION to something more useful than the generic "Comedi low-level driver" so that modinfo provides a better description of the driver. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: move the copyright informationH Hartley Sweeten2013-01-25
| | | | | | | | | | Move the copyright information from hwrdv_apci3501.c to the main driver file. Reformat it to fix the > 80 char lines. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: rewrite the analog output supportH Hartley Sweeten2013-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the analog output subdevice has two support functions: (*insn_config) - i_APCI3501_ConfigAnalogOutput() (*insn_write) - i_APCI3501_WriteAnalogOutput() The (*insn_config) function is used to configure the analog outputs in either bipolar or unipolar mode. This function abuses the comedi API since it treats the data[0] value as a parameter instead of as the config "instruction". The (*insn_write) function then writes a single value to the desired analog output channel after doing some sanity checking on the channel number. The sanity checking is not required since the comedi core has already done it. Also, the (*insn_write) functions are supposed to write all the data, indicated by insn->n, to the channel not just a single value. Rewrite the support code so it works properly with the comedi API. The bipolar/unipolar configuration can be determine in the (*insn_write) by checking the passed insn->chanspec. Since the unipolar configuration only has 13-bit resolution, we need to check that the data is in range because the subdevice 'maxdata' is set to 14-bits for the bipolar mode. If the data is out of range, output a dev_warn() and return -EINVAL. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: cleanup apci3501_reset()H Hartley Sweeten2013-01-25
| | | | | | | | | | | | | | Rename the CamelCase local variables. Refactor the code a bit to remove the need for some of the local variables. Add a couple defines to the register map to help make the code more concise. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: introduce apci3501_wait_for_dac()H Hartley Sweeten2013-01-25
| | | | | | | | | | | | | | | Refactor the code that waits for the DAC to be ready into a helper function. A timeout of some sort should be added to this helper so code the users to expect the error condition. In i_APCI3501_WriteAnalogOutput() just return the error and don't actually write the new value to the DAC. In apci3501_reset() output a dev_warn() that the DAC was not ready. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: move range_apci3501_ao to driverH Hartley Sweeten2013-01-25
| | | | | | | | | | | | Move the analog output range definition from hwdrv_apci3501.c into the main driver file. For aesthetic reasons, rename the range table so it has namespace associated with the driver. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: reorder code a bitH Hartley Sweeten2013-01-25
| | | | | | | | | | Move the private struct definition and the #include of the low-level support code to prepare for merging the code in hwdrv_apci3501.c into the driver. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: start defining i/o mapH Hartley Sweeten2013-01-25
| | | | | | | | | Create, and use, defines for the analog output and digital i/o registers. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: remove dependency on addi_common.hH Hartley Sweeten2013-01-25
| | | | | | | | | | Create a struct to hold the private data still used by this driver. This removes the last dependencies on the addi-data "common" code so we can also remove the #include of addi_common.h. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: only allocate needed subdevicesH Hartley Sweeten2013-01-25
| | | | | | | | | | The addi-data "common" code always allocated 7 subdevices. This driver only uses 5. Change the allocation and remove the unused subdevices. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: remove boardinfoH Hartley Sweeten2013-01-25
| | | | | | | | | With the eeprom support code now local to this driver, we can remove the boardinfo since it's not necessary. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: simplify reading the eepromH Hartley Sweeten2013-01-25
| | | | | | | | | | | | The only value in the eeprom that is used by this driver is the number of analog output channels. Copy the necessary code from addi_eeprom.c to this driver and refactor it so that we can get the value needed. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: board has an eepromH Hartley Sweeten2013-01-25
| | | | | | | | | | | | | The board supported by this driver has an on-board eeprom. Since we need to read it to get the number of analog output channels, expose the eeprom as a readable subdevice to the user. Rename the i_ADDIDATA_InsnReadEeprom() function to give it namespace associated with the driver. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: remove analog output boardinfoH Hartley Sweeten2013-01-25
| | | | | | | | | There is not need to pass the analog output subdevice information in the boardinfo. Just initialize the subdevice directly. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: analog output resolution is fixedH Hartley Sweeten2013-01-25
| | | | | | | | | | | | | | The analog outputs of this board are always 14-bit. Remove this information from the boardinfo and just set the 'maxdata' directly in the subdevice init. Initialize with a hex value as that is more standard in the comedi drivers. Since devpriv->s_EeParameters.i_AoMaxdata is not longer being used, don't bother initializing it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: don't read the unused PCI barsH Hartley Sweeten2013-01-25
| | | | | | | | | This driver only uses PCI bar 0 and 1, don't bother reading the unused PCI bars. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: board does not support dmaH Hartley Sweeten2013-01-25
| | | | | | | | | The board supported by this driver does not use dma. Remove the unnecessary initialization of devpriv->s_EeParameters.i_Dma. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: remove devpriv->iobase usageH Hartley Sweeten2013-01-25
| | | | | | | | | The iobase address stored in devpriv->iobase is also stored in dev->iobase. Use that instead. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: simplify the PCI bar readingH Hartley Sweeten2013-01-25
| | | | | | | | | | | | | | The board supported by this driver has an eeprom connected to an AMCC S5933 PCI controller chip. Knowing this, we can simplify the code that reads the PCI bars to get the iobase addresses used in the driver. Also, since the dw_AiBase is not ioremap'ed, we can remove the iounmap in the detach. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: simplify eeprom readH Hartley Sweeten2013-01-25
| | | | | | | | | | | | This driver needs to read the on-board eeprom to determine the number of analog output channels (4 or 8) on the board. But, sinde we know the board has an eeprom and the PCI controller chip is an AMCC S5933, we can simplify the code and remove the code that sets the extra wait state neede for the AMCC S5920. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: absorb v_APCI3501_Interrupt()H Hartley Sweeten2013-01-25
| | | | | | | | | | | | | This driver only has one 'interrupt' function. Absorb the v_APCI3501_Interrupt() function from hwdrv_apci3501.c into the driver. Rename v_ADDI_Interrupt() to apci3501_interrupt() so that the function has namespace associated with the driver. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: absorb i_APCI3501_Reset()H Hartley Sweeten2013-01-25
| | | | | | | | | | | | This driver only has one 'reset' function. Absorb the i_APCI3501_Reset() function from hwdrv_apci3501.c into the driver. Rename i_ADDI_Reset() to apci3501_reset() so that the function has namespace associated with the driver. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: board does not have analog inputsH Hartley Sweeten2013-01-25
| | | | | | | | | | | | The board supported by this driver does not have analog inputs. Remove the subdevice init for it. Since the devpriv->s_EeParameters for the analog input subdevice are not used, remove the initialization of them also. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: cleanup the digital input subdeviceH Hartley Sweeten2013-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The board supported by this driver has 2 digital input. Remove the conditional and always init the subdevice. Also, move the subdevice insn_bits function pointer as well as the n_chan out of the boardinfo and use them to initialize the subdevice directly. Since devpriv->s_EeParameters.i_NbrDiChannel for the digital input subdevice is no longer being used, remove initialization of it also. Copy the apci3501_di_insn_bits() function from hwrdv_apci3501.c into the main driver file. Fix the subdev_flags for the subdevice. The only required flag is SDF_READABLE. The SDF_GROUND and SDF_COMMON flags only have meaning for analog subdevices. Remove the len_chanlist initialization, it only has meaning for subdevices that support commands. Remove the io_bits initialization, it only has meaning for digital i/o subdevices that have configurable outputs. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: cleanup the digital output subdeviceH Hartley Sweeten2013-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The board supported by this driver has 2 digital outputs. Remove the conditional and always init the subdevice. Also, move the subdevice insn_bits function pointer as well as the n_chan out of the boardinfo and use them to initialize the subdevice directly. Since devpriv->s_EeParameters for the digital output subdevice are no longer being used, remove initialization of them also. Copy the apci3501_do_insn_bits() function from hwrdv_apci3501.c into the main driver file. Fix the subdev_flags for the subdevice. The only required flag is SDF_WRITEABLE. The SDF_GROUND and SDF_COMMON flags only have meaning for analog subdevices and the SDF_READABLE flag is not required. Fix the maxdata for the subdevice. Digital outputs can only be 1 or 0. Remove the len_chanlist initialization, it only has meaning for subdevices that support commands. Remove the io_bits initialization, it only has meaning for digital i/o subdevices that have configurable outputs. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: board has a timerH Hartley Sweeten2013-01-25
| | | | | | | | | | | | | | | The board supported by this driver has a timer device. Remove the conditional and always init the subdevice. Also, move the subdevice insn_* function pointers out of the boardinfo and use them to initialize the subdevice directly. Since devpriv->s_EeParameters.i_Timer is not longer being used, remove its initialization also. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: board does not have ttl i/oH Hartley Sweeten2013-01-25
| | | | | | | | | The board supported by this driver does not have ttl i/o. Remove the subdevice init for it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: addi_apci_3501: separate from addi_common.cH Hartley Sweeten2013-01-25
| | | | | | | | | | | | | | | | | | This driver is for a simple analog output board with 4 or 8, 14-bit outputs. The board also has 4 digital i/o channels (2 out/2 in) as well as a watchdog or timer. Using the addi-data "common" code in this driver introduces a lot of bloat. Copy the code in addi_common.c to this driver and remove the #include that caused it to be compiled with the driver. This will allow removing the bloat. Rename the auto_attach and detach functions so they have namespace associated with this driver. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/comedi: use comedi_usb_driver_(un)register for init/deinitPeter Huewe2013-01-25
| | | | | | | | | | Instead of coding calling comedi_driver_(un)register and usb_(de)register directly we can use the comedi_usb_driver_(un)register wrapper. This removes some boilerplate and is less error prone. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: zcache: fix ppc64 and other arches where PAGE_SIZE!=4KDan Magenheimer2013-01-25
| | | | | | | | Replace raw constant 12 with PAGE_SHIFT to fix non-x86 arches and provoke build failure if PAGE_SHIFT is too big Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:ozwpan: Change email address.Rupesh Gujare2013-01-25
| | | | | | | | As part of transition caused due to acquisition of Ozmo Devices by Atmel, my email address is changed. Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:ozwpan: Removed myself (Chris Kelly) as maintainer.Chris Kelly2013-01-25
| | | | | | | Removed myself (ckelly@ozmodevices.com) as maintainer of ozwpan. Removed my email address from the TODO file. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: cxt1e1: buffer overflow in do_del_chan()Dan Carpenter2013-01-25
| | | | | | | | If we don't restrict "cp.channum" to 3 digits then the sprintf() will overflow. I've added a check and changed the sprintf() to snprintf(). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: vt6656: Revert: 64bit fixes: dpc.c incorrect addressing of void ↵Malcolm Priestley2013-01-25
| | | | | | | | | | | | | | | structure. The patch was totally wrong and is reverted. The problem was ultimately fixed by upstream commit. 1ee4c55fc9620451b2a825d793042a7e0775391b staging: vt6656: Fix inconsistent structure packing Reported-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Cc: stable@vger.kernel.org # 3.8 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: vt6656: revert : 64 bit- Correctly address void structure.Malcolm Priestley2013-01-25
| | | | | | | | | | | | | | | The patch is wrong and is partially reverted. The NULL check of pTransmitKey->pvKeyTable is kept. The problem was ultimately fixed by upstream commit. 1ee4c55fc9620451b2a825d793042a7e0775391b staging: vt6656: Fix inconsistent structure packing Reported-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Cc: stable@vger.kernel.org # 3.8 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* goldfish: NAND flash driverArve Hjønnevåg2013-01-24
| | | | | | | | | | | | | | | | | | | | | | | Fold together the NAND driver for Goldfish from Arve with cleanups by Jun Nakajima and a tidy up to 3.7 and checkpatch. This provides a virtual flash driver for the Goldfish Android Virtual Platform, and which is normally used as the root file system when testing emulated devices. Signed-off-by: Mike A. Chan <mikechan@google.com> Signed-off-by: Arve Hjønnevåg <arve@android.com> [Ported to handle x86] Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com> Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com> Signed-off-by: Jun Nakajima <jun.nakajima@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com> [Ported to 3.4] Signed-off-by: Tom Keel <thomas.keel@intel.com> [Ported to 3.7 and tided for checkpatch etc] Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* goldfish: audio supportAlan Cox2013-01-24
| | | | | | | | | | | | | | | | | | | | | (remove change to another file that escaped into the patch set) From: Mike Lockwood <lockwood@google.com> Provide a simple audio channel between the kernel and the emulator that host sit. Queued for staging right now as this ought to be an ALSA driver not just a dumb device of its own making. Signed-off-by: Mike A. Chan <mikechan@google.com> [x86 support] Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com> Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com> Signed-off-by: Jun Nakajima <jun.nakajima@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com> [Clean up] Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* goldfish: Add a FIXME note to the pipe driverAlan Cox2013-01-24
| | | | | | | Note a point in the pipe driver that wants future attention Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* goldfish: add QEMU pipe driverDavid 'Digit' Turner2013-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | A QEMU pipe is a very fast communication channel between the guest system and the emulator. Usage from the guest is simply something like; // connect to special device fd = open("/dev/qemu_pipe", O_RDWR); // tell which service we want to talk to (must be zero-terminated) write(fd, "pipeName", strlen("pipeName")+1); // do read()/write() through fd now ... // close channel close(fd); Signed-off-by: David 'Digit' Turner <digit@android.com> [Added support for parameter buffers for speed] igned-off-by: Xin, Xiaohui <xiaohui.xin@intel.com> Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com> Signed-off-by: Nakajima, Jun <jun.nakajima@intel.com> [Ported to 3.6] Signed-off-by: Tom Keel <thomas.keel@intel.com> [Ported to 3.7, moved to platform/goldfish] Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* goldfish: add the goldfish virtual busJun Nakajima2013-01-24
| | | | | | | | | | | | | | | | | | | | | | | This imports the current Google code and cleans it up slightly to use pr_ and to properly request its resources. Goldfish is an emulator used for Android development. It has a virtual bus where the emulator passes platform device information to the guest which then creates the appropriate devices. This part of the emulation is not architecture specific so should not be hiding in architecture trees as it does in the Google Android tree. The constants it uses do depend on the platform and the platform creates the bus device which then talks to the emulator to ascertain the actual devices present. Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com> Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com> Signed-off-by: Jun Nakajima <jun.nakajima@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com> [Moved out of x86, cleaned up headers] Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: et131x: Fix all sparse warningsMark Einon2013-01-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dan Carpenter has pointed out that there are several sparse warnings from et131x.c, listed below. This patch fixes all these errors. drivers/staging/et131x/et131x.c:1870:33: warning: incorrect type in assignment (different address spaces) drivers/staging/et131x/et131x.c:1870:33:    expected unsigned int [usertype] *num_des drivers/staging/et131x/et131x.c:1870:33:    got unsigned int [noderef] <asn:2>*<noident> drivers/staging/et131x/et131x.c:1871:37: warning: incorrect type in assignment (different address spaces) drivers/staging/et131x/et131x.c:1871:37:    expected unsigned int [usertype] *full_offset drivers/staging/et131x/et131x.c:1871:37:    got unsigned int [noderef] <asn:2>*<noident> drivers/staging/et131x/et131x.c:1872:33: warning: incorrect type in assignment (different address spaces) drivers/staging/et131x/et131x.c:1872:33:    expected unsigned int [usertype] *min_des drivers/staging/et131x/et131x.c:1872:33:    got unsigned int [noderef] <asn:2>*<noident> drivers/staging/et131x/et131x.c:1873:33: warning: incorrect type in assignment (different address spaces) drivers/staging/et131x/et131x.c:1873:33:    expected unsigned int [usertype] *base_hi drivers/staging/et131x/et131x.c:1873:33:    got unsigned int [noderef] <asn:2>*<noident> drivers/staging/et131x/et131x.c:1874:33: warning: incorrect type in assignment (different address spaces) drivers/staging/et131x/et131x.c:1874:33:    expected unsigned int [usertype] *base_lo drivers/staging/et131x/et131x.c:1874:33:    got unsigned int [noderef] <asn:2>*<noident> drivers/staging/et131x/et131x.c:1876:33: warning: incorrect type in assignment (different address spaces) drivers/staging/et131x/et131x.c:1876:33:    expected unsigned int [usertype] *num_des drivers/staging/et131x/et131x.c:1876:33:    got unsigned int [noderef] <asn:2>*<noident> drivers/staging/et131x/et131x.c:1877:37: warning: incorrect type in assignment (different address spaces) drivers/staging/et131x/et131x.c:1877:37:    expected unsigned int [usertype] *full_offset drivers/staging/et131x/et131x.c:1877:37:    got unsigned int [noderef] <asn:2>*<noident> drivers/staging/et131x/et131x.c:1878:33: warning: incorrect type in assignment (different address spaces) drivers/staging/et131x/et131x.c:1878:33:    expected unsigned int [usertype] *min_des drivers/staging/et131x/et131x.c:1878:33:    got unsigned int [noderef] <asn:2>*<noident> drivers/staging/et131x/et131x.c:1879:33: warning: incorrect type in assignment (different address spaces) drivers/staging/et131x/et131x.c:1879:33:    expected unsigned int [usertype] *base_hi drivers/staging/et131x/et131x.c:1879:33:    got unsigned int [noderef] <asn:2>*<noident> drivers/staging/et131x/et131x.c:1880:33: warning: incorrect type in assignment (different address spaces) drivers/staging/et131x/et131x.c:1880:33:    expected unsigned int [usertype] *base_lo drivers/staging/et131x/et131x.c:1880:33:    got unsigned int [noderef] <asn:2>*<noident> drivers/staging/et131x/et131x.c:1898:24: warning: incorrect type in argument 2 (different address spaces) drivers/staging/et131x/et131x.c:1898:24:    expected void volatile [noderef] <asn:2>*addr drivers/staging/et131x/et131x.c:1898:24:    got unsigned int [usertype] *base_hi drivers/staging/et131x/et131x.c:1900:24: warning: incorrect type in argument 2 (different address spaces) drivers/staging/et131x/et131x.c:1900:24:    expected void volatile [noderef] <asn:2>*addr drivers/staging/et131x/et131x.c:1900:24:    got unsigned int [usertype] *base_lo drivers/staging/et131x/et131x.c:1901:60: warning: incorrect type in argument 2 (different address spaces) drivers/staging/et131x/et131x.c:1901:60:    expected void volatile [noderef] <asn:2>*addr drivers/staging/et131x/et131x.c:1901:60:    got unsigned int [usertype] *num_des drivers/staging/et131x/et131x.c:1902:39: warning: incorrect type in argument 2 (different address spaces) drivers/staging/et131x/et131x.c:1902:39:    expected void volatile [noderef] <asn:2>*addr drivers/staging/et131x/et131x.c:1902:39:    got unsigned int [usertype] *full_offset drivers/staging/et131x/et131x.c:1910:24: warning: incorrect type in argument 2 (different address spaces) drivers/staging/et131x/et131x.c:1910:24:    expected void volatile [noderef] <asn:2>*addr drivers/staging/et131x/et131x.c:1910:24:    got unsigned int [usertype] *min_des drivers/staging/et131x/et131x.c:2583:32: warning: incorrect type in assignment (different address spaces) drivers/staging/et131x/et131x.c:2583:32:    expected unsigned int [usertype] *offset drivers/staging/et131x/et131x.c:2583:32:    got unsigned int [noderef] <asn:2>*<noident> drivers/staging/et131x/et131x.c:2585:32: warning: incorrect type in assignment (different address spaces) drivers/staging/et131x/et131x.c:2585:32:    expected unsigned int [usertype] *offset drivers/staging/et131x/et131x.c:2585:32:    got unsigned int [noderef] <asn:2>*<noident> drivers/staging/et131x/et131x.c:2602:24: warning: incorrect type in argument 2 (different address spaces) drivers/staging/et131x/et131x.c:2602:24:    expected void volatile [noderef] <asn:2>*addr drivers/staging/et131x/et131x.c:2602:24:    got unsigned int [usertype] *offset drivers/staging/et131x/et131x.c:4093:13: warning: symbol 'et131x_isr' was not declared. Should it be static? Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: usbip: replace the interrupt safe spinlocks with common ones.Harvey Yang2013-01-22
| | | | | | | | | | | On the client side, we have a virtual hcd driver, there actually no hardware interrupts, so we do not need worry about race conditions caused by irq with spinlock held. Turning off irq is not good for system performance after all. Just replace them with a non interrupt safe version. Signed-off-by: Harvey Yang <harvey.huawei.yang@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: usbip: use interrupt safe spinlock to avoid potential deadlock.Harvey Yang2013-01-22
| | | | | | | | | | | The function 'usbip_event_add()' may be called in interrupt context on the stub side: 'stub_complete'->'stub_enqueue_ret_unlink'->'usbip_event_add'. In this function it tries to get the lock 'ud->lock', so we should disable irq when we get this lock in process context. Signed-off-by: Harvey Yang <harvey.huawei.yang@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: et131x: Modify block comments to fit with networking styleMark Einon2013-01-22
| | | | | | | | | In preparation for moving et131x to drivers/net, fixup the block comments to match the preferred networking style - no /* on separate line, but */ are on a seperate line. Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>