irq: bcm2835: Re-implement the hardware IRQ handler.

The justification for doing this is:
 * Simplify the decode and dispatch logic to make it easier to under-
   stand and maintain.
 * Re-arrange the hardware IRQ numbers to match the numbering scheme of
   the FIQ register.
 * Restore the flow of control that re-reads the base pending register
   after handling any interrupt. The current version handles all
   interrupts found in a GPU pending register before re-reading the
   base pending register. In the original Broadcom assembly code, there
   appear to be defect tracking numbers next to code inserted to create
   this behaviour.
 * DTS IRQ specifications can refer to either a shortcut bit in base or
   the GPU bits.  E.g. UART can be either <0, 19> or <2, 25>.
 * Add .irq_ack to the chip operations.

Signed-off-by: Craig McGeachie <slapdau@yahoo.com.au>
Corrections as per Stephen Warren's comments:
 * Restore table lookup for IRQ enable/disable.
 * Move magic numbers to defines.
 * Extract and document dt_to_internal_bank().
 * Correct #include line ordering.
 * remove .irq_ack from the chip definition.  It's unneccesary. The
   interrupt framework calls .irq_mask if it's not defined.
 * Various other layout fixes.
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>

(cherry picked from commit 635c24eba19f67d1eb1ef7e7447f319c850b01e5)
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>

(cherry picked from commit 1940a6c202f83d47067b8a3b6e9a42d9e49fd352)
mbox: bcm2835: implement driver compatibile with generic mailbox subsystem.

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

Signed-off-by: Craig McGeachie <slapdau@yahoo.com.au>
(cherry picked from commit 76b1c5341aae46e428a46e67ec46c0bcec7d4bd9)
mbox: bcm2835: Enable BCM2835 mailbox driver by default.

Signed-off-by: Craig McGeachie <slapdau@yahoo.com.au>
(cherry picked from commit 42c7fbbfc0a48297bd2279ede96e3176bb322465)
mbox: bcm2835: Fix defects with bcm2835 mbox driver and clean up.

 * Complete mbox read in irq handler. Interrupt just kept re-firing
   before tasklet ran and cleared the incoming register.
 * Remove the single mbox device global.
 * Clean up logging messages as per kernel coding style.

(cherry picked from commit 819bf3396e166fc32483a799bf1f7b96061284a7)
mbox: bcm2835: Fix illegal use of common mailbox private data.

(cherry picked from commit 68b6e2098c325fc4afe62dd5eed224b22b888039)
mbox: bcm2835: Fix checkpatch.pl errors

(cherry picked from commit 1a7c31ce1ceda93a6a3502215d95a5a657428084)
Merge branch 'topic/mailbox'