From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH 3/5] ARM: shmobile: r8a7790: Add DU and LVDS support
Date: Wed, 07 Aug 2013 17:24:17 +0000 [thread overview]
Message-ID: <520282C1.4080801@cogentembedded.com> (raw)
In-Reply-To: <1375892397-5822-4-git-send-email-laurent.pinchart+renesas@ideasonboard.com>
Hello.
On 08/07/2013 08:19 PM, Laurent Pinchart wrote:
> Add a function to register the DU device with board-specific platform
> data.
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
> arch/arm/mach-shmobile/include/mach/r8a7790.h | 3 +++
> arch/arm/mach-shmobile/setup-r8a7790.c | 27 +++++++++++++++++++++++++++
> 2 files changed, 30 insertions(+)
> diff --git a/arch/arm/mach-shmobile/include/mach/r8a7790.h b/arch/arm/mach-shmobile/include/mach/r8a7790.h
> index 788d559..5ffa8ce 100644
> --- a/arch/arm/mach-shmobile/include/mach/r8a7790.h
> +++ b/arch/arm/mach-shmobile/include/mach/r8a7790.h
> @@ -1,8 +1,11 @@
> #ifndef __ASM_R8A7790_H__
> #define __ASM_R8A7790_H__
>
> +struct rcar_du_platform_data;
> +
> void r8a7790_add_standard_devices(void);
> void r8a7790_add_dt_devices(void);
> +void r8a7790_add_du_device(struct rcar_du_platform_data *pdata);
> void r8a7790_clock_init(void);
> void r8a7790_pinmux_init(void);
> void r8a7790_init_delay(void);
> diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
> index d0f5c9f..d1c22d2 100644
> --- a/arch/arm/mach-shmobile/setup-r8a7790.c
> +++ b/arch/arm/mach-shmobile/setup-r8a7790.c
> @@ -19,10 +19,12 @@
> */
>
> #include <linux/clocksource.h>
> +#include <linux/dma-mapping.h>
> #include <linux/irq.h>
> #include <linux/kernel.h>
> #include <linux/of_platform.h>
> #include <linux/platform_data/gpio-rcar.h>
> +#include <linux/platform_data/rcar-du.h>
It's easier to just include it into r8a7790.h.
> #include <linux/platform_data/irq-renesas-irqc.h>
> #include <linux/serial_sci.h>
> #include <linux/sh_timer.h>
> @@ -75,6 +77,31 @@ void __init r8a7790_pinmux_init(void)
> r8a7790_register_gpio(5);
> }
>
> +/* DU */
> +static const struct resource du_resources[] = {
Should be annotated with '__initdata' as platfrom_device_register_full()
will eventually kmemdup() these data anyway.
> + DEFINE_RES_MEM(0xfeb00000, 0x70000),
> + DEFINE_RES_MEM_NAMED(0xfeb90000, 0x1c, "lvds.0"),
> + DEFINE_RES_MEM_NAMED(0xfeb94000, 0x1c, "lvds.1"),
> + DEFINE_RES_IRQ(gic_spi(256)),
> + DEFINE_RES_IRQ(gic_spi(268)),
> + DEFINE_RES_IRQ(gic_spi(269)),
> +};
> +
> +void __init r8a7790_add_du_device(struct rcar_du_platform_data *pdata)
> +{
> + struct platform_device_info info = {
> + .name = "rcar-du-r8a7790",
> + .id = -1,
> + .res = du_resources,
> + .num_res = ARRAY_SIZE(du_resources),
> + .data = pdata,
> + .size_data = sizeof(*pdata),
> + .dma_mask = DMA_BIT_MASK(32),
> + };
> +
> + platform_device_register_full(&info);
> +}
> +
WBR, Sergei
prev parent reply other threads:[~2013-08-07 17:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-07 16:19 [PATCH 3/5] ARM: shmobile: r8a7790: Add DU and LVDS support Laurent Pinchart
2013-08-07 17:24 ` Sergei Shtylyov [this message]
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=520282C1.4080801@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=linux-sh@vger.kernel.org \
/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).