Changeset 1b7b7af in mainline for kernel/genarch/src/drivers/bcm2835/mbox.c
- Timestamp:
- 2021-06-22T19:36:39Z (3 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 37d0dd4
- Parents:
- 73abf49
- git-author:
- Maurizio Lombardi <mlombard@…> (2021-06-22 19:26:24)
- git-committer:
- Maurizio Lombardi <mlombard@…> (2021-06-22 19:36:39)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/drivers/bcm2835/mbox.c
r73abf49 r1b7b7af 132 132 bool r; 133 133 MBOX_BUFF_ALLOC(msg, mbox_getfbsize_buf_t); 134 bcm2835_mbox_t *mbox; 135 136 mbox = (void *) km_map(BCM2835_MBOX0_ADDR, sizeof(bcm2835_mbox_t), 137 KM_NATURAL_ALIGNMENT, PAGE_NOT_CACHEABLE); 138 assert(mbox); 134 139 135 140 msg->buf_hdr.size = sizeof(mbox_getfbsize_buf_t); … … 140 145 msg->zero = 0; 141 146 142 mbox_write( (bcm2835_mbox_t *)BCM2835_MBOX0_ADDR,147 mbox_write(mbox, 143 148 MBOX_CHAN_PROP_A2V, KA2VCA((uint32_t)msg)); 144 mbox_read((bcm2835_mbox_t *)BCM2835_MBOX0_ADDR, 145 MBOX_CHAN_PROP_A2V); 149 mbox_read(mbox, MBOX_CHAN_PROP_A2V); 146 150 147 151 r = msg->buf_hdr.code == MBOX_PROP_CODE_RESP_OK; … … 151 155 } 152 156 157 km_unmap((uintptr_t) mbox, sizeof(bcm2835_mbox_t)); 153 158 return r; 154 159 }
Note:
See TracChangeset
for help on using the changeset viewer.