2 * (C) Copyright 2012 Stephen Warren
4 * SPDX-License-Identifier: GPL-2.0+
9 #include <asm/arch/mbox.h>
11 struct msg_set_power_state {
12 struct bcm2835_mbox_hdr hdr;
13 struct bcm2835_mbox_tag_set_power_state set_power_state;
17 int bcm2835_power_on_module(u32 module)
19 ALLOC_CACHE_ALIGN_BUFFER(struct msg_set_power_state, msg_pwr, 1);
22 BCM2835_MBOX_INIT_HDR(msg_pwr);
23 BCM2835_MBOX_INIT_TAG(&msg_pwr->set_power_state,
25 msg_pwr->set_power_state.body.req.device_id = module;
26 msg_pwr->set_power_state.body.req.state =
27 BCM2835_MBOX_SET_POWER_STATE_REQ_ON |
28 BCM2835_MBOX_SET_POWER_STATE_REQ_WAIT;
30 ret = bcm2835_mbox_call_prop(BCM2835_MBOX_PROP_CHAN,
33 printf("bcm2835: Could not set module %u power state\n",