Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 10f57114 authored by Rama Krishna Phani A's avatar Rama Krishna Phani A
Browse files

mhi: core: update iova start and stop addresses



Few usecases needs the iova addresses to be updated during mhi
initialization. Update iova start and stop addresses accordingly.

Change-Id: Ib06cc323f3971d104eae80000dec6d5b46500fb5
Signed-off-by: default avatarRama Krishna Phani A <rphani@codeaurora.org>
parent 2ba5ea33
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include <linux/slab.h>
#include <linux/wait.h>
#include <linux/mhi.h>
#include <linux/memblock.h>
#include "mhi_internal.h"

const char * const mhi_log_level_str[MHI_MSG_LVL_MAX] = {
@@ -1328,6 +1329,11 @@ int of_register_mhi_controller(struct mhi_controller *mhi_cntrl)
	if (!mhi_cntrl->status_cb || !mhi_cntrl->link_status)
		return -EINVAL;

	if (!mhi_cntrl->iova_stop) {
		mhi_cntrl->iova_start = memblock_start_of_DRAM();
		mhi_cntrl->iova_stop = memblock_end_of_DRAM();
	}

	ret = of_parse_dt(mhi_cntrl, mhi_cntrl->of_node);
	if (ret)
		return -EINVAL;