From: Pankaj Dubey <pankaj.dubey@samsung.com> To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: m.szyprowski@samsung.com, robh+dt@kernel.org, frowand.list@gmail.com, hans.verkuil@cisco.com, krzk@kernel.org, kgene@kernel.org, Smitha T Murthy <smitha.t@samsung.com>, Pankaj Dubey <pankaj.dubey@samsung.com> Subject: [PATCH] of: reserved_mem: set dma_ops for devices using reserved mem Date: Wed, 21 Dec 2016 11:14:31 +0530 [thread overview] Message-ID: <1482299071-22637-1-git-send-email-pankaj.dubey@samsung.com> (raw) From: Smitha T Murthy <smitha.t@samsung.com> For some IPs, there may be virtual child devices created and for them its necessary to set the dma_ops if it's using reserved memory else it will call the dummy dma_ops during buffer operations for the child devices which will lead to memory mapping failure. Signed-off-by: Smitha T Murthy <smitha.t@samsung.com> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com> --- drivers/of/of_reserved_mem.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c index 366d8c3..d507c35 100644 --- a/drivers/of/of_reserved_mem.c +++ b/drivers/of/of_reserved_mem.c @@ -354,6 +354,10 @@ int of_reserved_mem_device_init_by_idx(struct device *dev, mutex_lock(&of_rmem_assigned_device_mutex); list_add(&rd->list, &of_rmem_assigned_device_list); mutex_unlock(&of_rmem_assigned_device_mutex); + /* ensure that dma_ops is set for virtual devices + * using reserved memory + */ + of_dma_configure(dev, np); dev_info(dev, "assigned reserved memory node %s\n", rmem->name); } else { -- 2.7.4
WARNING: multiple messages have this Message-ID (diff)
From: Pankaj Dubey <pankaj.dubey-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> To: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org, robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, hans.verkuil-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org, krzk-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, kgene-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, Smitha T Murthy <smitha.t-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>, Pankaj Dubey <pankaj.dubey-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> Subject: [PATCH] of: reserved_mem: set dma_ops for devices using reserved mem Date: Wed, 21 Dec 2016 11:14:31 +0530 [thread overview] Message-ID: <1482299071-22637-1-git-send-email-pankaj.dubey@samsung.com> (raw) From: Smitha T Murthy <smitha.t-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> For some IPs, there may be virtual child devices created and for them its necessary to set the dma_ops if it's using reserved memory else it will call the dummy dma_ops during buffer operations for the child devices which will lead to memory mapping failure. Signed-off-by: Smitha T Murthy <smitha.t-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> Signed-off-by: Pankaj Dubey <pankaj.dubey-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> --- drivers/of/of_reserved_mem.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c index 366d8c3..d507c35 100644 --- a/drivers/of/of_reserved_mem.c +++ b/drivers/of/of_reserved_mem.c @@ -354,6 +354,10 @@ int of_reserved_mem_device_init_by_idx(struct device *dev, mutex_lock(&of_rmem_assigned_device_mutex); list_add(&rd->list, &of_rmem_assigned_device_list); mutex_unlock(&of_rmem_assigned_device_mutex); + /* ensure that dma_ops is set for virtual devices + * using reserved memory + */ + of_dma_configure(dev, np); dev_info(dev, "assigned reserved memory node %s\n", rmem->name); } else { -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2016-12-21 5:43 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <CGME20161221054333epcas5p1e27800790de041d997b4fb297cb759c3@epcas5p1.samsung.com> 2016-12-21 5:44 ` Pankaj Dubey [this message] 2016-12-21 5:44 ` [PATCH] of: reserved_mem: set dma_ops for devices using reserved mem Pankaj Dubey 2016-12-28 10:55 ` Marek Szyprowski 2016-12-28 10:55 ` Marek Szyprowski 2017-01-04 20:02 ` Rob Herring 2017-01-04 20:02 ` Rob Herring
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1482299071-22637-1-git-send-email-pankaj.dubey@samsung.com \ --to=pankaj.dubey@samsung.com \ --cc=devicetree@vger.kernel.org \ --cc=frowand.list@gmail.com \ --cc=hans.verkuil@cisco.com \ --cc=kgene@kernel.org \ --cc=krzk@kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-samsung-soc@vger.kernel.org \ --cc=m.szyprowski@samsung.com \ --cc=robh+dt@kernel.org \ --cc=smitha.t@samsung.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.