vchiq - allow suspend/resume from non-VCHIQ services

Add an API to allow drivers other than vchiq to interact
with the suspend/resume logic.

Currently this API just hooks into VCHIQ; eventually the
suspend/resume code needs to be factored out of vchiq
entirely.

Change-Id: I0efc41bd5b48664859bd31d46e9a489717f2d158
Refs: IMG-346
Reviewed-on: http://mps-gerrit.broadcom.com/24434
Branch-Open: Branch Status <branch_status_noreply@broadcom.com>
Reviewed-by: Checkpatch Status <checkpatch_status_noreply@broadcom.com>
Reviewed-by: Luke Diamand <luked@broadcom.com>
Reviewed-by: Pierre Couillaud <pierre@broadcom.com>
Tested-by: AutoSubmit Status <autosubmit_status_noreply@broadcom.com>
Signed-off-by: Luke Diamand <luked@broadcom.com>
vc_mem: add functions for use in kernel code

Add functions for reading VC memory from kernel space.
This is to support the VC debug symbols.

Signed-off-by: Luke Diamand <luked@broadcom.com>
vc debug variables: adding support

Add in-kernel support for accessing VC debug
variables.

Signed-off-by: Luke Diamand <luked@broadcom.com>
rpmsg: Avoid expensive calls to print_hex_dump in non-debug builds

print_hex_dump(KERN_DEBUG, ...) does a lot of processing even if printk
is going to filter out the DEBUG level messages. rpmsg does this for
every message receive/send, which significantly affects performance.
Disable the hex dump in non-debug kernel builds.

Change-Id: I1c5587fb7bebda891cd7d04c23e35f32f8a68d42
Refs: IMG-346
Reviewed-on: http://mps-gerrit.broadcom.com/24436
Branch-Open: Branch Status <branch_status_noreply@broadcom.com>
Reviewed-by: Checkpatch Status <checkpatch_status_noreply@broadcom.com>
Reviewed-by: Luke Diamand <luked@broadcom.com>
Reviewed-by: Pierre Couillaud <pierre@broadcom.com>
Tested-by: AutoSubmit Status <autosubmit_status_noreply@broadcom.com>
Signed-off-by: Luke Diamand <luked@broadcom.com>
rpmsg: Allow devices to use custom buffer allocator

Some remote processors can't access arbitrary memory allocated with
dma_alloc_coherent. Add a virtio feature bit for devices to indicate
they want to use a custom buffer allocator instead.

Signed-off-by: Luke Diamand <luked@broadcom.com>
vc_rpmsg: VideoCore support for rpmsg

The vc_rpmsg driver implements a virtio device that connects to rpmsg's
virtio-based messaging bus, allowing other drivers to communicate with
VideoCore over shared memory.

Signed-off-by: Luke Diamand <luked@broadcom.com>
vc_rpmsg_service: Userspace interface to stateful VideoCore services

The vc_rpmsg_service driver communicates with VC over the "hostexport"
channel to determine which services to export, and then creates a char
device for each one. Clients can open the char device and then send
and receive messages with the protocol defined in vc_rpmsg_service.h,
with support for passing shared-memory buffers to VC and automatically
cleaning up all resources when the char device is closed.

Signed-off-by: Luke Diamand <luked@broadcom.com>
vchiq - share the doorbell interrupt

Allows other VC device drivers to make use of the doorbell
interrupt.

Signed-off-by: Luke Diamand <luked@broadcom.com>
vc_rpmsg: Update to latest protocol version

Protocol version 2 uses larger OPEN_REPLY messages. Remove unnecessary
size checks in the kernel, so that future protocol changes can expand
the messages without breaking compatibility.

This is required for running the latest ISYS on Capri.

Change-Id: I752e21f73d7d8a648065917300b8605c1856e653
Signed-off-by: Luke Diamand <luked@broadcom.com>