summaryrefslogtreecommitdiff
path: root/drivers/staging/ipack/devices
AgeCommit message (Collapse)Author
2012-11-16Staging: ipack: move out of stagingGreg Kroah-Hartman
The ipack subsystem is cleaned up enough to now move out of the staging tree, and into drivers/ipack. Cc: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Cc: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16Staging: ipack: adapt copyright to CERN guidelinesSamuel Iglesias Gonsalvez
Adapt the copyright clause to CERN guidelines, as it has the copyright over them. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-19Staging: ipack: remove blank line at EOF warning in Kconfig filesSamuel Iglesias Gonsalvez
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-19staging: ipack: Rename IPACK_MEM_SPACE to IPACK_MEM8_SPACE.Jens Taprogge
There also is a MEM16 space. This will make it clear which one is which, once support for MEM16 space is added. 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-10-19staging: ipack: swich to regular ioremap and friends.Jens Taprogge
Use the regular ioremap functions and their managed counterparts instead of the ones provided through IPack callbacks. 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-10-19staging: ipack/devices/ipoctal: obtain model from dev->id_device.Jens Taprogge
By doing so we can remove ipoctal_check_model() and we also no longer need to map the IPACK_ID_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-10-19staging: ipack/devices/ipoctal: fix ipoctal_inst_slot error path.Jens Taprogge
The ordering was wrong. 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-10-19Staging: ipack: get rid of ipack_device->bus_nr.Jens Taprogge
It is replicating information contained in ipack_device->bus->bus_nr. 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-10-01Merge tag 'tty-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/ttyLinus Torvalds
Pull TTY changes from Greg Kroah-Hartman: "As we skipped the merge window for 3.6-rc1 for the tty tree, everything is now settled down and working properly, so we are ready for 3.7-rc1. Here's the patchset, it's big, but the large changes are removing a firmware file and adding a staging tty driver (it depended on the tty core changes, so it's going through this tree instead of the staging tree.) All of these patches have been in the linux-next tree for a while. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" Fix up more-or-less trivial conflicts in - drivers/char/pcmcia/synclink_cs.c: tty NULL dereference fix vs tty_port_cts_enabled() helper function - drivers/staging/{Kconfig,Makefile}: add-add conflict (dgrp driver added close to other staging drivers) - drivers/staging/ipack/devices/ipoctal.c: "split ipoctal_channel from iopctal" vs "TTY: use tty_port_register_device" * tag 'tty-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (235 commits) tty/serial: Add kgdb_nmi driver tty/serial/amba-pl011: Quiesce interrupts in poll_get_char tty/serial/amba-pl011: Implement poll_init callback tty/serial/core: Introduce poll_init callback kdb: Turn KGDB_KDB=n stubs into static inlines kdb: Implement disable_nmi command kernel/debug: Mask KGDB NMI upon entry serial: pl011: handle corruption at high clock speeds serial: sccnxp: Make 'default' choice in switch last serial: sccnxp: Remove mask termios caps for SW flow control serial: sccnxp: Report actual baudrate back to core serial: samsung: Add poll_get_char & poll_put_char Powerpc 8xx CPM_UART setting MAXIDL register proportionaly to baud rate Powerpc 8xx CPM_UART maxidl should not depend on fifo size Powerpc 8xx CPM_UART too many interrupts Powerpc 8xx CPM_UART desynchronisation serial: set correct baud_base for EXSYS EX-41092 Dual 16950 serial: omap: fix the reciever line error case 8250: blacklist Winbond CIR port 8250_pnp: do pnp probe before legacy probe ...
2012-09-14Staging: ipack/devices/ipoctal: simplify ipoctal_write_tty()Samuel Iglesias Gonsalvez
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-14Staging: ipack/devices/ipoctal: acknowledge BREAK condition.Samuel Iglesias Gonsalvez
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-14staging: ipack: remove irq field in struct ipack_device.Jens Taprogge
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-14Staging: ipack: move the responsibility to clear interrupts to the IPack ↵Jens Taprogge
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-12Staging: ipack/devices/ipoctal: Unmap memory on device removal.Jens Taprogge
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-12Staging: ipack/devices/ipoctal: read more than one character from RX FIFO.Samuel Iglesias Gonsalvez
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-12Staging: ipack/devices/ipoctal: Get rid of ipoctal_list.Jens Taprogge
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-12Staging: ipack/devices/ipoctal: Use KBUILD_MODNAME instead of hardcoded string.Jens Taprogge
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-12Staging: ipack/devices/ipoctal: Check tty_register_device return value.Jens Taprogge
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-12Staging: ipack/devices/ipoctal: Clean up device removal.Jens Taprogge
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-12Staging: ipack: Let interrupts return irqreturn_t.Jens Taprogge
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-12Staging: ipack/devices/ipoctal: remove superfluous function.Jens Taprogge
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-12Staging: ipack/devices/ipoctal: Split interrupt service routine.Jens Taprogge
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-12Staging: ipack/devices/ipoctal: Store isr masks in ipoctal_channelJens Taprogge
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-12Staging: ipack/devices/ipoctal: put ipoctal_channel into tty->driver_data.Jens Taprogge
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-12Staging: ipack/devices/ipoctal: Directly use ioread/iowrite function.Jens Taprogge
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-12Staging: ipack/devices/ipoctal: split ipoctal_channel from ipoctal.Jens Taprogge
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-11Staging: ipack/devices/ipoctal: free the IRQ.Samuel Iglesias Gonsálvez
As the IRQ was requested by the driver, it should free it also. Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11Staging: ipack/devices/ipoctal: change exiting procedureSamuel Iglesias Gonsálvez
The ipoctal devices can be uninstalled from the ipack_driver_unregister() call as the device model calles the bus's .remove() function for each device registered by the driver and it will execute the .remove() function of the ipoctal driver. Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04Staging: ipack: Implement device matching on the bus level.Jens Taprogge
Devices are match based upon their vendor and device ids. Since the individual drivers provide a list of supported ids they do not need to implement the matching themselves. Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04Staging: ipack/devices/ipoctal: Expose DEVICE_TABLE for ipoctal.Jens Taprogge
The modalias entries for the module are now created. Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04Staging: ipack: Make ipack_driver_ops const.Jens Taprogge
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04Staging: ipack: Move device ids from ipoctal.c to ipack_ids.h.Jens Taprogge
Rename them in the process. Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04Staging: ipack/devices/ipoctal: Tidy up ipoctal some more.Jens Taprogge
No need to have a struct when it has only one field. Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04Staging: ipack/devices/ipoctal: ipoctal cleanups.Jens Taprogge
Define memory address space, fix sparse warnings and mark the structs reflecting hardware memory layout "packed" to be on the safe side. Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04Staging: ipack/devices/ipoctal: Convert ipoctal to directly use ioread/write ↵Jens Taprogge
functions. Before it was using the functions in ipack_bus_ops. Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04Staging: ipack/bridges/tpci200: Use the TPCI200 in big endian mode.Jens Taprogge
During initialization we configure the TPCI200 so it does not swap data lanes on IndustryPack module access. The read and write functions are changed accordingly. We are taking this approach in the hope that all IP Carriers are able to present the Module memory layout unchanged. We can thus directly access the memory and registers of IP Modules without having to rely on the read and write wrappers currently exposed in ipack_bus_opts. A later patch will convert the existing driver and remove the wrappers. Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-13TTY: use tty_port_register_deviceJiri Slaby
Currently we have no way to assign tty->port while performing tty installation. There are two ways to provide the link tty_struct => tty_port. Either by calling tty_port_install from tty->ops->install or tty_port_register_device called instead of tty_register_device when the device is being set up after connected. In this patch we modify most of the drivers to do the latter. When the drivers use tty_register_device and we have tty_port already, we switch to tty_port_register_device. So we have the tty_struct => tty_port link for free for those. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-10ipoctal: make it compile with the termios changesAlan Cox
Also fix the silly speed setting bug. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-17Staging: ipack/devices/ipoctal: initialize the device in probe functionSamuel Iglesias Gonsálvez
Initialize the device when registering it. Sometimes the user access to it and the device is in an unknown state, so it could fail. Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-17Staging: ipack/devices/ipoctal: fix dereference NULL pointerSamuel Iglesias Gonsálvez
After opening and closing the file /dev/ipoctal.X.Y.Z for the second time, it gives a kernel oops due to a dereference of a NULL pointer. The problem was that tty->driver_data was not properly initialized when accessing the file for the second time. Reported-by: Alberto Garcia Gonzalez <agarcia@igalia.com> Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-06Staging: ipack/devices/ipoctal: save IRQ vector in MEM spaceSamuel Iglesias Gonsálvez
The IRQ vector should be saved in MEM space base address according to the datasheet. Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25Staging: ipack/devices/ipoctal: remove unneeded lock in IRQ handlerSamuel Iglesias Gonsalvez
In the rest of the code, the data is protected with spin_lock_irqsave(). Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25Staging: ipack/devices/ipoctal: remove unneeded includesSamuel Iglesias Gonsalvez
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25Staging: ipack/devices/ipoctal: fix oops when accessing "buffer"Samuel Iglesias Gonsalvez
The buffer[][] field was replaced by tty_port->xmit_buf field but there was some places that "buffer" was still accessed, giving a kernel oops because it was uninitialized. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-09Staging: ipack/devices/ipoctal: remove unused enum uart_parity_e.Miguel Gómez
Signed-off-by: Miguel Gómez <magomez@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-09Staging: ipack/devices/ipoctal: remove error_flag field from ipoctal struct.Miguel Gómez
Remove the error_flag field from the ipoctal structure, as the error code is handled through the tty abstraction. Remove the values definition as well. Signed-off-by: Miguel Gómez <magomez@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-09Staging: ipack/devices/ipoctal: remove ipoctal_config structure.Miguel Gómez
The configuration of the communication channel is handled by the tty abstraction, so the ipoctal_config structure has become useless and it's only used to store values that are never accesed. Remove it. Signed-off-by: Miguel Gómez <magomez@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-07Staging: ipack/devices/ipoctal: change pr_* usage for dev_* functionsSamuel Iglesias Gonsalvez
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-07Staging: ipack/devices/ipoctal: avoid kernel oops when uninstallingSamuel Iglesias Gonsalvez
When uninstalling a device, there is a loop of calls that produces, at the end, two calls to __ipoctal_remove() function with the same ipack_device argument. The first time works fine, but the second will fail in tty_unregister_driver() To avoid this situation, the call to __ipoctal_remove() it is done only from the ipack bus driver and not from the ipack device driver. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-19Staging: ipack: improve the register of a bus and a device in the bus.Samuel Iglesias Gonsalvez
It adds and removes some fields in the struct ipack_device and ipack_bus_device to make it cleaner. The API has change to group all the operations on these structures inside of the ipack driver. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>