mailbox: rename pl320-ipc specific mailbox.h

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: Introduce framework for mailbox

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>
Reviewed-by: Mark Brown <broonie@linaro.org>
doc: add documentation for mailbox framework

 Some explanations with examples of how to write to implement users
and providers of the mailbox framework.

Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
dt: mailbox: add generic bindings

Define generic bindings for the framework clients to
request mailbox channels.

Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Reviewed-by: Mark Brown <broonie@linaro.org>
ARM: bcm2835: enable USB_DWC2_HOST in defconfig

It broke when host was moved into a separate module, in 47a1685 ("usb:
dwc2/s3c-hsotg: move s3c-hsotg into dwc2 directory"),

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
bcm2835-mmc: driver for Arasan eMMC IP

This is driver for Arasan External Mass Media Controller provided in
Raspberry Pi single board computer.

Based on Gellert Weisz <gellert@raspberrypi.org> work.

Signed-off-by: Piotr Król <piotr.krol@3mdeb.com>

Conflicts:
	drivers/mmc/host/Kconfig
dt: bcm2835: add mmc node

Add MMC node, increase clk_mmc frequency and use bcm2835-mmc instead of
bcm2835-sdhci

Based on Noralf Tronnes code
https://github.com/notro/rpi-bcm2835/blob/3af7ed5b12d436829c4286baab94e68c93b2319d/Rakefile

Signed-off-by: Piotr Król <piotr.krol@3mdeb.com>
mailbox: Enable BCM2835 mailbox support

Implement BCM2835 mailbox support as a device registered with the
general purpose mailbox framework. Implementation based on commits by
Lubomir Rintel [1], Suman Anna and Jassi Brar [2] on which to base the
implementation.

[1] http://lists.infradead.org/pipermail/linux-rpi-kernel/2013-April/000528.html
[2] http://lists.infradead.org/pipermail/linux-rpi-kernel/2013-May/000546.html

[lkundrak@v3.sk: Squashed Craig's commit with original work]

Signed-off-by: Craig McGeachie <slapdau@yahoo.com.au>
Signed-off-by: Suman Ana <s-anna@ti.com>
Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>

Conflicts:
	arch/arm/configs/bcm2835_defconfig
	drivers/mailbox/Makefile

Conflicts:
	drivers/mailbox/Makefile
bcm2835-mbox: port to newer mailbox framework

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
mailbox: bcm2835-mbox should be available as a module

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
bcm2835-mbox: Remove mailbox channel names from the device tree

They're reundant, as with current version of framework the name is specified in
the user's device tree entry.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
bcm2835-mbox: Drop useless gotoes

Nothing to clean up, the errors can be handled in a more streamlined manner.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Add BCM2835 thermal driver

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

Conflicts:
	drivers/thermal/Makefile

Conflicts:
	drivers/thermal/Makefile
bcm2835-thermal: Update for newer completion API

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
bcm2835-thermal: Port to current version of mailbox api

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
WIP: bcm2835: Add Broadcom BCM2835 CPU frequency control to the device tree

This adds a device tree binding for CPU frequency control driven via mailbox
IPC present on Broadcom BCM2835 SoC, used in Raspberry Pi and Roku 2 devices.

Signed-off-by: Dom Cobley <popcornmix@gmail.com>
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: linux-rpi-kernel@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-pm@vger.kernel.org
WIP: cpufreq: Add Broadcom BCM2835 CPU frequency control driver

This adds a driver for a CPU frequency control driven via mailbox IPC present
on Broadcom BCM2835 SoC, used in Raspberry Pi and Roku 2 devices.

Signed-off-by: Dom Cobley <popcornmix@gmail.com>
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: cpufreq@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Cc: linux-rpi-kernel@lists.infradead.org
WIP: arm: Add Broadcom BCM2835 CPU frequency control to bcm2835_defconfig

This enables a driver for CPU frequency control driven via mailbox IPC
present on Broadcom BCM2835 SoC, used in Raspberry Pi and Roku 2 devices.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: linux-rpi-kernel@lists.infradead.org
bcm2836-mbox: last_tx_done should wait for handling on remote side

Previous code tried to verify if VPU->ARM (MAIL0) receiving queue is
empty after submitting message to ARM->VPU (MAIL1) queue. This patch
change mailbox used in last_tx_done to MAIL1.

Based on IRC advice from Ross Oldfield.

Signed-off-by: Piotr Król <piotr.krol@3mdeb.com>
bcm2835-mbox: fix check for -EBUSY in send_data

send_data should check if MAIL1 is not empty what indicates -EBUSY state
instead of checking if MAIL0 is full.

Based on IRC advice from Ross Oldfield.

Signed-off-by: Piotr Król <piotr.krol@3mdeb.com>