@@ -26,6 +26,7 @@
#include <linux/kernel.h>
#include <linux/io.h>
#include <linux/init.h>
+#include <linux/interconnect.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/interrupt.h>
@@ -392,6 +393,7 @@ struct bam_device {
const struct reg_offset_data *layout;
struct clk *bamclk;
+ struct icc_path *mem_path;
int irq;
/* dma start transaction tasklet */
@@ -1284,6 +1286,14 @@ static int bam_dma_probe(struct platform_device *pdev)
return ret;
}
+ /* Ensure that interconnects are initialized */
+ bdev->mem_path = devm_of_icc_get(bdev->dev, "memory");
+ if (IS_ERR(bdev->mem_path)) {
+ ret = PTR_ERR(bdev->mem_path);
+ dev_err(bdev->dev, "failed to acquire icc path %d\n", ret);
+ goto err_disable_clk;
+ }
+
ret = bam_init(bdev);
if (ret)
goto err_disable_clk;