19a0c3479SRui Paulo#- 29a0c3479SRui Paulo# Copyright (c) 2013 Rui Paulo 39a0c3479SRui Paulo# All rights reserved. 49a0c3479SRui Paulo# 59a0c3479SRui Paulo# Redistribution and use in source and binary forms, with or without 69a0c3479SRui Paulo# modification, are permitted provided that the following conditions 79a0c3479SRui Paulo# are met: 89a0c3479SRui Paulo# 1. Redistributions of source code must retain the above copyright 99a0c3479SRui Paulo# notice, this list of conditions and the following disclaimer. 109a0c3479SRui Paulo# 2. Redistributions in binary form must reproduce the above copyright 119a0c3479SRui Paulo# notice, this list of conditions and the following disclaimer in the 129a0c3479SRui Paulo# documentation and/or other materials provided with the distribution. 139a0c3479SRui Paulo# 149a0c3479SRui Paulo# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 159a0c3479SRui Paulo# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 169a0c3479SRui Paulo# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 179a0c3479SRui Paulo# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 189a0c3479SRui Paulo# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 199a0c3479SRui Paulo# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 209a0c3479SRui Paulo# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 219a0c3479SRui Paulo# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 229a0c3479SRui Paulo# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 239a0c3479SRui Paulo# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 249a0c3479SRui Paulo# SUCH DAMAGE. 259a0c3479SRui Paulo# 269a0c3479SRui Paulo# 279a0c3479SRui Paulo# Mailboxes are used as an IPC mechanism that allows subsystems to 289a0c3479SRui Paulo# communicate with each other. 299a0c3479SRui Paulo# A system can have multiple mailboxes (e.g. OMAP4) but there's usually a 309a0c3479SRui Paulo# system wide mailbox. 319a0c3479SRui Paulo# 329a0c3479SRui Paulo 339a0c3479SRui PauloINTERFACE mbox; 349a0c3479SRui Paulo 359a0c3479SRui PauloMETHOD int read { 369a0c3479SRui Paulo device_t dev; 379a0c3479SRui Paulo int channel; 389a0c3479SRui Paulo uint32_t *data; 399a0c3479SRui Paulo}; 409a0c3479SRui Paulo 419a0c3479SRui PauloMETHOD int write { 429a0c3479SRui Paulo device_t dev; 439a0c3479SRui Paulo int channel; 449a0c3479SRui Paulo uint32_t data; 459a0c3479SRui Paulo}; 46