linux/drivers/firmware/raspberrypi.c
/*
 * Sends a request to the firmware through the BCM2835 mailbox driver,
 * and synchronously waits for the reply.
 */
Sends a request to the firmware through the BCM2835 mailbox driver,
and synchronously waits for the reply.
Sends a request to the firmware through the BCM2835 mailbox driver and synchronously waits for the reply .
static int
rpi_firmware_transaction(struct rpi_firmware *fw, u32 chan, u32 data)
{
	u32 message = MBOX_MSG(chan, data);
	int ret;
	WARN_ON(data & 0xf);
	mutex_lock(&transaction_lock);
	reinit_completion(&fw->c);
	ret = mbox_send_message(fw->chan, &message);
	if (ret >= 0) {
		wait_for_completion(&fw->c);
		ret = 0;
	} else {
		dev_err(fw->cl.dev, "mbox_send_message returned %d\n", ret);
	}
	mutex_unlock(&transaction_lock);
	return ret;
}
static int rpi_firmware_transaction ( struct rpi_firmware * fw , u32 chan , u32 data ) { u32 message = MBOX_MSG ( chan , data ) ; int ret ; WARN_ON ( data & 0xf ) ; mutex_lock ( & transaction_lock ) ; reinit_completion ( & fw -> c ) ; ret = mbox_send_message ( fw -> chan , & message ) ; if ( ret >= 0 ) { wait_for_completion ( & fw -> c ) ; ret = 0 ; } else { dev_err ( fw -> cl . dev , " \n " , ret ) ; } mutex_unlock ( & transaction_lock ) ; return ret ; }
Sends a request to the firmware through the BCM2835 mailbox driver,
 and synchronously waits for the reply.
Sends a request to the firmware through the BCM2835 mailbox driver and synchronously waits for the reply .