• Home
  • Raw
  • Download

Lines Matching +full:bcm2835 +full:- +full:firmware

2  * Defines interfaces for interacting wtih the Raspberry Pi firmware's
12 #include <linux/dma-mapping.h>
18 #include <soc/bcm2835/raspberrypi-firmware.h>
39 complete(&fw->c); in response_callback()
43 * Sends a request to the firmware through the BCM2835 mailbox driver,
55 reinit_completion(&fw->c); in rpi_firmware_transaction()
56 ret = mbox_send_message(fw->chan, &message); in rpi_firmware_transaction()
58 wait_for_completion(&fw->c); in rpi_firmware_transaction()
61 dev_err(fw->cl.dev, "mbox_send_message returned %d\n", ret); in rpi_firmware_transaction()
69 * rpi_firmware_property_list - Submit firmware property list
70 * @fw: Pointer to firmware structure from rpi_firmware_get().
74 * Submits a set of concatenated tags to the VPU firmware through the
79 * See struct rpi_firmware_property_tag_header for the per-tag
92 return -EINVAL; in rpi_firmware_property_list()
94 buf = dma_alloc_coherent(fw->cl.dev, PAGE_ALIGN(size), &bus_addr, in rpi_firmware_property_list()
97 return -ENOMEM; in rpi_firmware_property_list()
99 /* The firmware will error out without parsing in this case. */ in rpi_firmware_property_list()
105 buf[size / 4 - 1] = RPI_FIRMWARE_PROPERTY_END; in rpi_firmware_property_list()
116 * But single-tag is the most common, so go with it. in rpi_firmware_property_list()
118 dev_err(fw->cl.dev, "Request 0x%08x returned status 0x%08x\n", in rpi_firmware_property_list()
120 ret = -EINVAL; in rpi_firmware_property_list()
123 dma_free_coherent(fw->cl.dev, PAGE_ALIGN(size), buf, bus_addr); in rpi_firmware_property_list()
130 * rpi_firmware_property - Submit single firmware property
131 * @fw: Pointer to firmware structure from rpi_firmware_get().
136 * Submits a single tag to the VPU firmware through the mailbox
157 return -ENOMEM; in rpi_firmware_property()
160 header->tag = tag; in rpi_firmware_property()
161 header->buf_size = buf_size; in rpi_firmware_property()
162 header->req_resp_size = 0; in rpi_firmware_property()
188 dev_info(fw->cl.dev, in rpi_firmware_print_firmware_revision()
189 "Attached to firmware from %04ld-%02d-%02d %02d:%02d\n", in rpi_firmware_print_firmware_revision()
205 rpi_hwmon = platform_device_register_data(dev, "raspberrypi-hwmon", in rpi_register_hwmon_driver()
206 -1, NULL, 0); in rpi_register_hwmon_driver()
211 struct device *dev = &pdev->dev; in rpi_firmware_probe()
216 return -ENOMEM; in rpi_firmware_probe()
218 fw->cl.dev = dev; in rpi_firmware_probe()
219 fw->cl.rx_callback = response_callback; in rpi_firmware_probe()
220 fw->cl.tx_block = true; in rpi_firmware_probe()
222 fw->chan = mbox_request_channel(&fw->cl, 0); in rpi_firmware_probe()
223 if (IS_ERR(fw->chan)) { in rpi_firmware_probe()
224 int ret = PTR_ERR(fw->chan); in rpi_firmware_probe()
225 if (ret != -EPROBE_DEFER) in rpi_firmware_probe()
230 init_completion(&fw->c); in rpi_firmware_probe()
246 mbox_free_channel(fw->chan); in rpi_firmware_remove()
252 * rpi_firmware_get - Get pointer to rpi_firmware structure.
253 * @firmware_node: Pointer to the firmware Device Tree node.
255 * Returns NULL is the firmware device is not ready.
269 { .compatible = "raspberrypi,bcm2835-firmware", },
276 .name = "raspberrypi-firmware",
285 MODULE_DESCRIPTION("Raspberry Pi firmware driver");