Commit Graph

323003 Commits

Author SHA1 Message Date
Aaro Koskinen d42bb0fbd9 staging: xgifb: delete bogus video RAM configuration
The driver reconfigures DRAM size register to 8M (regardless what the
actual size was) once the init has been completed, overwriting the
correct value written during the early init. As a result if the driver
is unloaded and reloaded, the user will be limited to 8M video memory
and may lose some of the available video modes.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:41:57 -07:00
Aaro Koskinen 98f4eade14 staging: xgifb: setup initial video RAM size for systems without BIOS
On embedded systems without a BIOS, the DRAM sizing register is 0 after
the boot, and the driver thinks we have only 1 MB video memory. On such
cases, use the PCI window size for the initial size. This information
is needed only to create the I/O mapping - the driver will later detect
and configure the memory size correctly. Limit the size to 16 MB as it
should be sufficient for all supported video modes.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:41:56 -07:00
Macpaul Lin 1839c7ebd9 staging/gdm72xx: usb_boot: replace firmware upgrade API
Replace file I/O of reading firmware usb_boot()
by request_firmware().

Signed-off-by: Macpaul Lin <macpaul@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:40:17 -07:00
Macpaul Lin 443242d2fe staging/gdm72xx: usb_boot: coding style cleanup
1. Coding style re-formatting (tabs).
2. Remove unused MIN() marco.

Signed-off-by: Macpaul Lin <macpaul@gmail.com>
Cc: Paul Stewart <pstew@chromium.org>
Cc: Ben Chan <benchan@chromium.org>
Cc: Sage Ahn <syahn@gctsemi.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:40:10 -07:00
Kevin McKinney ae1cbea5f9 Staging: bcm: Convert INT to int in Transmit.c
This patch converts INT to int in Transmit.c

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:35:40 -07:00
Kevin McKinney b9e25f81c5 Staging: bcm: Properly format comments in Transmit.c
This patch properly formats comments
as reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:35:40 -07:00
Kevin McKinney d5873d3817 Staging: bcm: Remove initialization from if statement in Transmit.c
This patch Remove initialization from
if statement in Transmit.c as reported
by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:35:40 -07:00
Kevin McKinney 97e0a509d9 Staging: bcm: Properly format braces in Transmit.c
This patch cuddles braces as reported
by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:32:47 -07:00
Kevin McKinney 22976bc354 Staging: bcm: Fix all white space issues in Transmit.c
This patch fixes all white space issues
as reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:31:46 -07:00
Devendra Naga 5d6f5054e8 staging:wlan-ng: remove the remaining return at the end of void function
this removes the remaining return which the function actually
wants to return, for that it used goto failed and failed lable
have the return statement at the end of function, which is all
unnecessary, remove this and make the function return at the
places where it does the goto failed

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:22:25 -07:00
Devendra Naga 2b970b2d30 staging:wlan-ng: remove all the return statements at the end of functions
this file is having all unnecessary return statements at the end of functions
which return void, remove all of them.

some of the functions still uses the return for having the goto end,
which the label end defined at the end of the function which returns
void, this will be cleaned up in next change

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:22:25 -07:00
Devendra Naga 675be12f45 staging:wlan-ng: clean hfa384x_usbctlx_submit
else is not required as such we can do with just with a single if

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:22:24 -07:00
Devendra Naga 3f45932720 staging:wlan-ng: make wlan_unsetup void
this is because this function does a deinit job and most of the
deinit functions are expected to return void. Also this function
doesn't fail anywhere..

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:22:24 -07:00
Samuel Iglesias Gonsalvez d04600679b Staging: ipack/devices/ipoctal: simplify ipoctal_write_tty()
Remove count_wr and the assigment of nb_bytes = 0 in that function as is
useless. Now it returns the count of the characters actually sent.

There is other nb_bytes = 0 deleted that has a duplicate a few lines before.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:21:38 -07:00
Samuel Iglesias Gonsalvez 4514108c5b Staging: ipack/devices/ipoctal: acknowledge BREAK condition.
Clear the BREAK flag from the ISR register. Doing that, we avoid to read
the same condition for the next character received.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:21:38 -07:00
Jens Taprogge c6e2dfaa52 staging: ipack: remove irq field in struct ipack_device.
The field irq currently is identical to the slot number.  It does not seem to
have any real use.  The number is written to hardware in ipoctal but it seems
the value that is written does not matter.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:21:38 -07:00
Jens Taprogge ea991147ec Staging: ipack: move the responsibility to clear interrupts to the IPack devices.
Now the IPack device acknowledges its own IRQ.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:21:38 -07:00
Jens Taprogge e4af9497b6 Staging: ipack: Add IPACK_INT_SPACE memory space.
This will allow us to correctly access the IPack INT space.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:21:38 -07:00
Devendra Naga 7505817603 staging:ccg: cleanup a bit of binding
the ccg_bind_function uses ret variable and a logic around the
ccg_bind_enabled_functions to return a value other than 0 if
bind function fail, other wise returns 0, this can be achieved
with just a return ccg_bind_enabled_functions(dev, c);

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:20:28 -07:00
Devendra Naga 99d4b1a6cb staging:ccg: fix a class_destroy when kmalloc fails after the class_create
we do class_create and call kmalloc to allocate dev pointer,
and if kmalloc fail we forget destoying class

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:20:28 -07:00
Davidlohr Bueso 43bf2f4bfe staging: keucr: remove String func prototypes
Commit 1b9f644dfe already got rid of
StringCopy and StringCmp, so remove the left over prototypes.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:20:27 -07:00
Ben Chan 129575f2a8 staging: gdm72xx: simplify alloc_tx_struct and alloc_rx_struct
This patch simplifies alloc_tx_struct and alloc_rx_struct in gdm_sdio.c
and gdm_usb.c by replacing kmalloc+memset with kzalloc and reorganizing
the code.

Signed-off-by: Ben Chan <benchan@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:15:41 -07:00
H Hartley Sweeten b37c1aeed8 staging: comedi: 8255_pci: move ni_pcidio 8255 board support
The 8255 based boards in the ni_pcidio driver are all simple
memory mapped 8255 boards that don't require the dma support
provided by the mite driver.

Move the support for these boards from the ni_pcidio driver to
the generic 8255_pci 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>
2012-09-13 20:13:03 -07:00
H Hartley Sweeten 77f17d3714 staging: comedi: 8255_pci: support memory mapped i/o boards
Some of the PCI based 8255 boards that can be supported by this driver
use memory mapped i/o. Add the code needed to support these boards.

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>
2012-09-13 20:13:03 -07:00
H Hartley Sweeten 6b79db383f staging: comedi: 8255_pci: add vendor id to boardinfo
This driver supports PCI boards from multiple vendors. It's
possible for boards from different vendors to have the same
device id.

Add the vendor id to the boardinfo so pci_8255_find_boardinfo()
matches the pci_dev to the correct boardinfo.

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>
2012-09-13 20:12:30 -07:00
H Hartley Sweeten 606b04707e staging: comedi: 8255_pci: add support for the PCI-DIO96H board
Add support for the Measurement Computing PCI-DIO96H board to the
generic 8255_pci 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>
2012-09-13 20:11:14 -07:00
H Hartley Sweeten df1a3f8796 staging: comedi: remove cb_pcidio driver
Move the support for the boards in the cb_pcidio driver to
the generic 8255_pci driver and remove the cb_pcidio 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>
2012-09-13 20:11:14 -07:00
H Hartley Sweeten f7c2286826 staging: comedi: 8255_pci: fix namespace due to rename of driver
Due to the rename of this file, change all the adl_pci7296_* to
pci_8255_* so that everything has namespace associated with this
driver.

Also, fix the comedi description comment based on the rename of
the file. Remove the extra comment about the driver attach.

Modify the PCI_DEVICE_ID_* defines in preparation of moving
additional vendor/device ids into 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>
2012-09-13 20:11:13 -07:00
H Hartley Sweeten 41518de2e1 staging: comedi: rename adl_pci7296 driver
This driver will be used for all generic PCI based 8255 digital
i/o boards. Rename the driver accordingly..

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>
2012-09-13 20:11:13 -07:00
Jens Taprogge 7dd73b866e staging: ipack/bridges/tpci200: Use endianess-aware types where applicable.
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:56:02 -07:00
Jens Taprogge 6f89221683 Staging: ipack/devices/ipoctal: Unmap memory on device removal.
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:56:02 -07:00
Samuel Iglesias Gonsalvez cacd55c1b7 Staging: ipack: update TODO file
With the latest patches, the TODO file was outdated.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:56:02 -07:00
Samuel Iglesias Gonsalvez ab0a71f06d Staging: ipack/devices/ipoctal: read more than one character from RX FIFO.
The RX FIFO has a size of 3 characters. Check if when we are picking the
oldest one, we have more to read.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:56:02 -07:00
Jens Taprogge 9c1d784afc Staging: ipack/devices/ipoctal: Get rid of ipoctal_list.
Use tty_dev->dev's drdata to associate struct ipocal_channel to the
respective tty_struct.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:56:02 -07:00
Jens Taprogge 3f3a592798 Staging: ipack/devices/ipoctal: Use KBUILD_MODNAME instead of hardcoded string.
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:56:02 -07:00
Jens Taprogge 2afb41d9d3 Staging: ipack/devices/ipoctal: Check tty_register_device return value.
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:56:02 -07:00
Jens Taprogge 1adda49706 Staging: ipack/devices/ipoctal: Clean up device removal.
Make use of dev_set_drvdata() and dev_get_drvdata() to store and obtain
a pointer to the ipoctal struct corresponding to a struct dev.
Previously we relied on a private list of devices.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:56:01 -07:00
Jens Taprogge faa75c406e Staging: ipack: Let interrupts return irqreturn_t.
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:56:01 -07:00
Jens Taprogge 40733ed763 Staging: ipack/bridges/tpci200: move tpci200_free_irq() and tpci200_request_irq()
Now, all the interrupt related functions are next to each other.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:56:01 -07:00
Jens Taprogge 877adc406c Staging: ipack/bridges/tpci200: More cleanups.
Rename __tpci_request_irq() to tpci_enable_irq() and __tpci_free_irq()
to tpci_disable_irq().  Change their second argument, move them above
tpci200_interrupt(), and use tpci_disable_irq() in the latter

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:56:01 -07:00
Jens Taprogge ab0deffcb9 Staging: ipack/bridges/tpci200: Cleanup in tpci200_slot_irq() and tpci200_interrupt()
Minor cleanup.  No functional changes.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:56:01 -07:00
Jens Taprogge 88ff8480d3 Staging: ipack/bridges/tpci200: Clean up interrupt handling.
Previously the return value from tpci200_interrupt was not quite correct
if a slot had caused an interrupt but no handler was instellalled:
IRQ_NONE was returned.  However in this case we react to the interrupt
by disabling the IPack device interrupt.

Basically there are two cases the code now distinguishes:
 - The tpci200 has raised an interrupt.  We handle it and return
   IRQ_HANDLED.
 - Our device did not raise an interrupt. We return IRQ_NONE.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:56:01 -07:00
Jens Taprogge 487e0a608d Staging: ipack/bridges/tpci200: Protect device registers with spinlock.
Some of the device registers are accessed from both interrupt and
non-interrupt context.  To ensure proper read-modify-write modification
of these registers we can not use the  "global" tpci200 mutex.  Instead
a spin-lock is used.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:56:01 -07:00
Jens Taprogge b8d61d49b2 Staging: ipack/bridges/tpci200: RCU protect slot_irq pointers.
In tpci200_request_irq as well as tpci200_free_irq we set and unset the
pointer to struct slot_irq.  This pointer is accessed in
tpci200_interrupt.  To ensure that the pointer is not freed after it has
been fetched in tpci200_interrupt() it is now protected through RCU.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:54:16 -07:00
Jens Taprogge 699a89f1e2 Staging: ipack/devices/ipoctal: remove superfluous function.
ipoctal_write_tty and ipoctal_write are merged.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:54:16 -07:00
Jens Taprogge 87cfb95500 Staging: ipack/devices/ipoctal: Split interrupt service routine.
Split the IRQ service routing in TX part and RX part.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:54:16 -07:00
Jens Taprogge 4e4732aca9 Staging: ipack/devices/ipoctal: Store isr masks in ipoctal_channel
This way interrupt handling becomes independent of the channel number.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:54:15 -07:00
Jens Taprogge ef79de0314 Staging: ipack/devices/ipoctal: put ipoctal_channel into tty->driver_data.
Each tty's driver_data is now pointing to the channel it is talking to.  struct
ipoctal_channel contains all the information the callbacks require to do their
work.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:54:15 -07:00
Jens Taprogge 459e6d7c93 Staging: ipack/devices/ipoctal: Directly use ioread/iowrite function.
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:54:15 -07:00
Jens Taprogge 70a32811e5 Staging: ipack/devices/ipoctal: split ipoctal_channel from ipoctal.
By moving everything channel related into a separate struct we will be
able to clean up a lot of code.  In the end tty->driver_data will no
longer need to point to ipoctal but instead can point to the respective
channel.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:54:15 -07:00