aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mailbox
Commit message (Collapse)AuthorAge
* Merge branch 'mailbox-for-linus' of ↵Linus Torvalds2014-10-21
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.linaro.org/landing-teams/working/fujitsu/integration Pull mailbox framework from Jassi Brar: "A framework for Mailbox controllers and clients have been cooking for more than a year now. Everybody in the CC list had been copied on patchset revisions and most of them have made sounds of approval, though just one concrete Reviewed-by. The patchset has also been in linux-next for a couple of weeks now and no conflict has been reported. The framework has the backing of at least 5 platforms, though I can't say if/when they upstream their drivers (some businesses have 'changed')" (Further acked-by by Arnd Bergmann and Suman Anna in the pull request thread) * 'mailbox-for-linus' of git://git.linaro.org/landing-teams/working/fujitsu/integration: dt: mailbox: add generic bindings doc: add documentation for mailbox framework mailbox: Introduce framework for mailbox mailbox: rename pl320-ipc specific mailbox.h
| * mailbox: Introduce framework for mailboxJassi Brar2014-10-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce common framework for client/protocol drivers and controller drivers of Inter-Processor-Communication (IPC). Client driver developers should have a look at include/linux/mailbox_client.h to understand the part of the API exposed to client drivers. Similarly controller driver developers should have a look at include/linux/mailbox_controller.h Reviewed-by: Mark Brown <broonie@linaro.org> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
| * mailbox: rename pl320-ipc specific mailbox.hSuman Anna2014-10-08
| | | | | | | | | | | | | | | | | | | | | | | | | | The patch 30058677 "ARM / highbank: add support for pl320 IPC" added a pl320 IPC specific header file as a generic mailbox.h. This file has been renamed appropriately to allow the introduction of the generic mailbox API framework. Acked-by: Mark Langsdorf <mark.langsdorf@calxeda.com> Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Suman Anna <s-anna@ti.com> Reviewed-by: Mark Brown <broonie@linaro.org> Acked-by: Arnd Bergmann <arnd@arndb.de>
* | mailbox/omap: add support for parsing dt devicesSuman Anna2014-09-11
|/ | | | | | | | | | | | | | | | | | | | | | | Logic has been added to the OMAP2+ mailbox code to parse the mailbox dt nodes and construct the different sub-mailboxes associated with the instance. The DT representation of the sub-mailbox devices is different from legacy platform data representation to allow flexibility of interrupt configuration between Tx and Rx fifos (to also possibly allow simplex devices in the future). The DT representation gathers similar information that was being passed previously through the platform data, except for the interrupt type information, which is gathered through driver compatible match data. The non-DT support has to be maintained for now to not break OMAP3 legacy boot, and the legacy-style code will be cleaned up once OMAP3 is also converted to DT-boot only. Cc: Jassi Brar <jassisinghbrar@gmail.com> Cc: Rob Herring <robh+dt@kernel.org> Signed-off-by: Suman Anna <s-anna@ti.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Tony Lindgren <tony@atomide.com>
* mailbox/omap: add a parent structure for every IP instanceSuman Anna2014-07-29
| | | | | | | | | | | | | | | | | | A new structure, omap_mbox_device, is added to contain the global variables pertinent to a mailbox h/w IP block. This enables the support for having multiple instances of the same h/w IP block in the SoC. This is in preparation to support the DRA7 SoC, which is the first SoC in the OMAP family to have multiple mailbox IP instances. The changes include enhancements to the sub-mailbox registration logic and mbox startup sequencing, removing the usage of single global configuration variables for all h/w instances, and storing the registered sub-mailboxes with the parent mailbox device structure. Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* mailbox/omap: remove the private mailbox structureSuman Anna2014-07-29
| | | | | | | | | | | | | | | | | The structure omap_mbox_priv is used previously to store arch specific (OMAP1 vs OMAP2+) data, and is no longer required to be maintained separately. Instead, absorb its elements into either the sub-mailbox device structure, omap_mbox, or the individual fifo descriptor structure, omap_mbox_fifo. The newmsg_bit and notfull_bit used on Rx and Tx fifos respectively are represented by the new intr_bit field in the fifo descriptor structure. The interrupt configuration registers are also moved into the fifo descriptor structure to allow the Rx and Tx fifos to use different interrupt lines/users. Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* mailbox/omap: consolidate OMAP mailbox driverSuman Anna2014-07-29
| | | | | | | | | | | | | | | | | | | | | | | | There is no need for a separate common OMAP mailbox module now that the OMAP1 mailbox driver has been removed. So, consolidate the two individual OMAP mailbox modules into a single driver. This streamlines the driver for converting to mailbox framework. The following are the main changes: - collapse mailbox-omap2.c into omap-mailbox.c - remove omap_mbox_ops and replace the ops calls with the equivalent functionality. - simplify the sub-mailbox startup/shutdown functionality, the one-time operations are moved into probe, and the pm_runtime_get_sync and pm_runtime_put_sync can be invoked without using a configuration counter. - move all definitions from private omap_mbox.h into the source code, and eliminate this internal header. - rename some variables that used the omap2_mbox prefix with a generic omap_mbox prefix. Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* mailbox/omap: simplify the fifo assignment by using macrosSuman Anna2014-07-29
| | | | | | | | | | The OMAP mailbox IP has two different type of interrupt configuration registers between OMAP4+ SoCs and OMAP2/3 SoCs. Simplify the current interrupt configuration by using a single macro that translates the two variants. Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* mailbox/omap: remove omap_mbox_type_t from mailbox opsSuman Anna2014-07-29
| | | | | | | | | | | The type definition omap_mbox_type_t used for distinguishing OMAP1 from OMAP2+ mailboxes is no longer needed after the removal of OMAP1 mailbox driver, and has therefore been cleaned up. This cleanup also eliminates the need for the polling logic used for checking the transmit readiness. Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* mailbox/omap: remove OMAP1 mailbox driverSuman Anna2014-07-29
| | | | | | | | | | | | | | | | There are no existing users for OMAP1 mailbox driver in kernel. Commit ab6f775 "Removing dead OMAP_DSP" has cleaned up all the dead code related to the only possible user, including the creation of the mailbox platform device. Remove this stale driver so that the OMAP mailbox driver can be simplified and streamlined better for converting to mailbox framework. Signed-off-by: Suman Anna <s-anna@ti.com> Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Tony Lindgren <tony@atomide.com>
* mailbox/omap: use devm_* interfacesSuman Anna2014-07-29
| | | | | | | | Use the various devm_ interfaces to simplify the cleanup in probe and remove functions in OMAP2+ mailbox driver. Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* drivers/mailbox/omap: make mbox->irq signed for error handlingDan Carpenter2014-01-23
| | | | | | | | | | | | | | | | | There is a bug in omap2_mbox_probe() where we try do: mbox->irq = platform_get_irq(pdev, info->irq_id); if (mbox->irq < 0) { The problem is that mbox->irq is unsigned so the error handling doesn't work. I've changed it to a signed integer. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Suman Anna <s-anna@ti.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Omar Ramirez Luna <omar.ramirez@copitl.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* mailbox: remove unnecessary platform_set_drvdata()Jingoo Han2013-09-18
| | | | | | | | | | The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Suman Anna <s-anna@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* mailbox/omap: move the OMAP mailbox framework to driversSuman Anna2013-06-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mailbox hardware (in OMAP) uses a queued mailbox interrupt mechanism that provides a communication channel between processors through a set of registers and their associated interrupt signals by sending and receiving messages. The OMAP mailbox framework/driver code is moved to be under drivers/mailbox, in preparation for adapting to a common mailbox driver framework. This allows the build for OMAP mailbox to be enabled (it was disabled during the multi-platform support). As part of the migration from plat and mach code: - Kconfig symbols have been renamed to build OMAP1 or OMAP2+ drivers. - mailbox.h under plat-omap/plat/include has been split into a public and private header files. The public header has only the API related functions and types. - The module name mailbox.ko from plat-omap is changed to omap-mailbox.ko - The module name mailbox_mach.ko from mach-omapX is changed as mailbox_omap1.ko for OMAP1 mailbox_omap2.ko for OMAP2+ Cc: Tony Lindgren <tony@atomide.com> [gregkh@linuxfoundation.org: ack for staging part] Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Omar Ramirez Luna <omar.ramirez@copitl.com> Signed-off-by: Suman Anna <s-anna@ti.com>
* mailbox, pl320-ipc: remove __init from probe functionMark Langsdorf2013-03-04
| | | | | | | Avoids a section mismatch. Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ARM / highbank: add support for pl320 IPCRob Herring2013-02-01
The pl320 IPC allows for interprocessor communication between the highbank A9 and the EnergyCore Management Engine. The pl320 implements a straightforward mailbox protocol. Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com> Signed-off-by: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>