From: Lubomir Rintel

This adds a driver for mailbox IPC mechanism present on Broadcom
BCM2835 SoC, used in Raspberry Pi and Roku 2 devices.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Craig McGeachie <slapdau@yahoo.com.au>
---

Changes made since v1:
 * Re-position memory barriers in accordance with the advice from
   section 1.3 of the BCM2835 Arm Peripherals document.
 * Even if the caller wishes to discard the reply, wait for it anyway
   to prevent incorrect correlation of requests and replies.
 * Replace of_ioremap() call with devm_request_and_ioremap().
 * Update device tree in line with documentation.
 * Invoke INIT_COMPLETION before re-using the channel completion.
From: Lubomir Rintel

This adds a driver for mailbox IPC mechanism present on Broadcom
BCM2835 SoC, used in Raspberry Pi and Roku 2 devices.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Craig McGeachie <slapdau@yahoo.com.au>
---

Changes made since v1:
 * Re-position memory barriers in accordance with the advice from
   section 1.3 of the BCM2835 Arm Peripherals document.
 * Even if the caller wishes to discard the reply, wait for it anyway
   to prevent incorrect correlation of requests and replies.
 * Replace of_ioremap() call with devm_request_and_ioremap().
 * Update device tree in line with documentation.
 * Invoke INIT_COMPLETION before re-using the channel completion.
mailbox: Introduce a new common API

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

Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>

Conflicts:
mailbox: move the internal definitions into a private file

This is needed for extracting the omap_mbox. The OMAP mailbox
code has a need for exporting some pre-existing API to not
break the current clients.

Signed-off-by: Suman Anna <s-anna@ti.com>
Move board variant of BCM2835 mailbox to drivers.
Add Kconfig and make file entries for it.
Re-implement the BCM2835 mailbox driver to be registered with, and driven
from, the generic mailbox driver.

Signed-off-by: Craig McGeachie <slapdau@yahoo.com.au>
Use spinlock instead of device mutex to avoid blocking.

Signed-off-by: Craig McGeachie <slapdau@yahoo.com.au>
Enable BCM2835 mailbox driver by default.

Signed-off-by: Craig McGeachie <slapdau@yahoo.com.au>