[PATCH v3 5/7] ARM: shmobile: r8a7740: add DT nodes for three DMAC instance

Magnus Damm magnus.damm at gmail.com
Wed Jul 3 15:36:05 EST 2013


Hi Guennadi,

On Wed, Jun 26, 2013 at 11:40 PM, Guennadi Liakhovetski
<g.liakhovetski at gmx.de> wrote:
> This patch adds Device Tree support for the three DMA controller instances
> on r8a7740 in a DMA multiplexer node.
>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas at gmail.com>
> ---
>  arch/arm/boot/dts/r8a7740.dtsi         |   62 ++++++++++++++++++++++++++++++++
>  arch/arm/mach-shmobile/setup-r8a7740.c |   12 ++++++
>  2 files changed, 74 insertions(+), 0 deletions(-)

Thanks for your work on this.

> --- a/arch/arm/mach-shmobile/setup-r8a7740.c
> +++ b/arch/arm/mach-shmobile/setup-r8a7740.c
> @@ -996,7 +996,19 @@ void __init r8a7740_add_early_devices(void)
>
>  #ifdef CONFIG_USE_OF
>
> +static struct of_dev_auxdata r8a7740_dmac_auxdata[] = {
> +       OF_DEV_AUXDATA("renesas,shdma", 0xfe008020, "sh-dma-engine.0",
> +                      &dma_platform_data),
> +       OF_DEV_AUXDATA("renesas,shdma", 0xfe018020, "sh-dma-engine.1",
> +                      &dma_platform_data),
> +       OF_DEV_AUXDATA("renesas,shdma", 0xfe028020, "sh-dma-engine.2",
> +                      &dma_platform_data),
> +       { }
> +};
> +
>  static const struct of_dev_auxdata r8a7740_auxdata_lookup[] __initconst = {
> +       OF_DEV_AUXDATA("renesas,shdma-mux", 0, "shdma-of.0",
> +                      r8a7740_dmac_auxdata),
>         { }
>  };

Uhm, what is the reason for adding AUXDATA? For all other cases we
have clearly separated the DT reference bits from the C version
without using AUXDATA. With that approach we can use the default NULL
callbacks for ->init_machine(). Now with this patch we're going in the
totally different direction...

Why can't you use DT only for these?

Cheers,

/ magnus


More information about the devicetree-discuss mailing list