|
@@ -25,6 +25,7 @@
|
|
|
#include "venc-starfive.h"
|
|
|
|
|
|
#include <linux/of_device.h>
|
|
|
+#include <linux/of_irq.h>
|
|
|
|
|
|
#define starfive_flush_dcache(start, len) \
|
|
|
sifive_l2_flush64_range(start, len)
|
|
@@ -1288,6 +1289,19 @@ static int vpu_probe(struct platform_device *pdev)
|
|
|
}
|
|
|
|
|
|
#ifdef VPU_SUPPORT_CLOCK_CONTROL
|
|
|
+ vpu_dev->of_node = of_find_node_by_name(NULL, "vpu_enc");
|
|
|
+ if (!(vpu_dev->of_node))
|
|
|
+ printk("The node of vpu_enc is not found in device tree.\n");
|
|
|
+
|
|
|
+ err = of_address_to_resource(vpu_dev->of_node, 0, &venc_resource[0]);
|
|
|
+ if (err) {
|
|
|
+ printk(KERN_ERR "could not find venc register address\n");
|
|
|
+ goto ERROR_PROVE_DEVICE;
|
|
|
+ }
|
|
|
+
|
|
|
+ venc_resource[1].start = irq_of_parse_and_map(vpu_dev->of_node, 0);
|
|
|
+ venc_resource[1].end = venc_resource[1].start;
|
|
|
+
|
|
|
err = platform_device_add_resources(pdev, venc_resource, 2);
|
|
|
if (err) {
|
|
|
printk(KERN_ERR "could not add venc resource\n");
|