From: Grant Likely <grant.likely@secretlab.ca>
To: linux-arm-kernel@lists.infradead.org,
linaro-mm-sig@lists.linaro.org, devicetree@vger.kernel.org
Cc: Mark Rutland <mark.rutland@arm.com>,
Laura Abbott <lauraa@codeaurora.org>,
Pawel Moll <pawel.moll@arm.com>, Arnd Bergmann <arnd@arndb.de>,
Stephen Warren <swarren@wwwdotorg.org>,
Tomasz Figa <t.figa@samsung.com>,
Tomasz Figa <tomasz.figa@gmail.com>,
Michal Nazarewicz <mina86@mina86.com>,
Marc <marc.ceeeee@gmail.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
Kumar Gala <galak@codeaurora.org>,
Olof Johansson <olof@lixom.net>,
Ian Campbell <ian.campbell@citrix.com>,
Nishanth Peethambaran <nishanth.p@gmail.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [PATCH v7 3/4] drivers: of: add initialization code for dma reserved memory
Date: Thu, 29 Aug 2013 23:48:25 +0100 [thread overview]
Message-ID: <20130829224825.714F33E1222@localhost> (raw)
In-Reply-To: <1377527959-5080-4-git-send-email-m.szyprowski@samsung.com>
On Mon, 26 Aug 2013 16:39:18 +0200, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> index e0a6514..eeca8a5 100644
> --- a/drivers/of/platform.c
> +++ b/drivers/of/platform.c
> @@ -21,6 +21,7 @@
> #include <linux/of_device.h>
> #include <linux/of_irq.h>
> #include <linux/of_platform.h>
> +#include <linux/of_reserved_mem.h>
> #include <linux/platform_device.h>
>
> const struct of_device_id of_default_bus_match_table[] = {
> @@ -218,6 +219,8 @@ struct platform_device *of_platform_device_create_pdata(
> dev->dev.bus = &platform_bus_type;
> dev->dev.platform_data = platform_data;
>
> + of_reserved_mem_device_init(&dev->dev);
> +
One more comment. This only covers platform devices. What about AMBA
devices?
> /* We do not fill the DMA ops for platform devices by default.
> * This is currently the responsibility of the platform code
> * to do such, possibly using a device notifier
> @@ -225,6 +228,7 @@ struct platform_device *of_platform_device_create_pdata(
>
> if (of_device_add(dev) != 0) {
> platform_device_put(dev);
> + of_reserved_mem_device_release(&dev->dev);
> return NULL;
> }
>
> diff --git a/include/linux/of_reserved_mem.h b/include/linux/of_reserved_mem.h
> new file mode 100644
> index 0000000..c841282
> --- /dev/null
> +++ b/include/linux/of_reserved_mem.h
> @@ -0,0 +1,14 @@
> +#ifndef __OF_RESERVED_MEM_H
> +#define __OF_RESERVED_MEM_H
> +
> +#ifdef CONFIG_OF_RESERVED_MEM
> +void of_reserved_mem_device_init(struct device *dev);
> +void of_reserved_mem_device_release(struct device *dev);
> +void early_init_dt_scan_reserved_mem(void);
> +#else
> +static inline void of_reserved_mem_device_init(struct device *dev) { }
> +static inline void of_reserved_mem_device_release(struct device *dev) { }
> +static inline void early_init_dt_scan_reserved_mem(void) { }
> +#endif
> +
> +#endif /* __OF_RESERVED_MEM_H */
> --
> 1.7.9.5
>
next prev parent reply other threads:[~2013-08-29 22:48 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-26 14:39 [PATCH v7 0/4] Device Tree support for CMA (Contiguous Memory Allocator) Marek Szyprowski
2013-08-26 14:39 ` [PATCH v7 1/4] drivers: dma-contiguous: clean source code and prepare for device tree Marek Szyprowski
2013-08-26 14:39 ` [PATCH v7 2/4] drivers: of: add function to scan fdt nodes given by path Marek Szyprowski
2013-08-29 21:40 ` Grant Likely
2013-08-30 10:42 ` Marek Szyprowski
2013-08-30 10:46 ` Grant Likely
2013-08-26 14:39 ` [PATCH v7 3/4] drivers: of: add initialization code for dma reserved memory Marek Szyprowski
2013-08-29 22:46 ` Grant Likely
2013-08-30 12:39 ` Marek Szyprowski
2013-08-30 20:26 ` Kumar Gala
2013-09-09 16:01 ` Grant Likely
2013-09-10 19:53 ` Kumar Gala
[not found] ` <BA65D7E3-8C15-4B44-95E2-E5DC862DDDE0-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2013-09-15 12:48 ` Grant Likely
2013-09-12 18:22 ` Kumar Gala
[not found] ` <13185491-534E-4547-8412-5704346EA2DC-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2013-09-15 12:50 ` Grant Likely
2013-09-16 7:12 ` Marek Szyprowski
2013-09-16 7:25 ` Benjamin Herrenschmidt
2013-09-16 13:43 ` Grant Likely
[not found] ` <CACxGe6s_JY7GpjXN7gwADV0oE+BnQfJX4AaXTZURumfepa3NiA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-18 3:48 ` Grant Likely
[not found] ` <20130918034848.A8E76C42CF4-WNowdnHR2B42iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2013-09-18 11:07 ` Marek Szyprowski
[not found] ` <5236AF64.80607-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-09-16 8:17 ` Marek Szyprowski
2013-09-09 13:05 ` Grant Likely
2013-08-29 22:48 ` Grant Likely [this message]
[not found] ` <1377527959-5080-4-git-send-email-m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-09-27 15:47 ` Kumar Gala
2013-09-27 17:06 ` Matt Sealey
2013-08-26 14:39 ` [PATCH v7 4/4] ARM: init: add support for reserved memory defined by device tree Marek Szyprowski
2013-08-29 22:49 ` Grant Likely
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=20130829224825.714F33E1222@localhost \
--to=grant.likely@secretlab.ca \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=ian.campbell@citrix.com \
--cc=kyungmin.park@samsung.com \
--cc=lauraa@codeaurora.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=m.szyprowski@samsung.com \
--cc=marc.ceeeee@gmail.com \
--cc=mark.rutland@arm.com \
--cc=mina86@mina86.com \
--cc=nishanth.p@gmail.com \
--cc=olof@lixom.net \
--cc=pawel.moll@arm.com \
--cc=s.hauer@pengutronix.de \
--cc=s.nawrocki@samsung.com \
--cc=swarren@wwwdotorg.org \
--cc=t.figa@samsung.com \
--cc=tomasz.figa@gmail.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).