All of lore.kernel.org
 help / color / mirror / Atom feed
From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 10/10] ARM: clps711x: Add initial DT support
Date: Fri, 2 Aug 2013 12:15:31 +0100	[thread overview]
Message-ID: <20130802111531.GH2884@e106331-lin.cambridge.arm.com> (raw)
In-Reply-To: <1374172501-26796-11-git-send-email-shc_work@mail.ru>

On Thu, Jul 18, 2013 at 07:35:01PM +0100, Alexander Shiyan wrote:
> This patch adds initial support for Cirrus Logic CLPS711X based platforms
> using the device tree for discovery.
> The basic devices is not yet DT-capable, so the CLPS711X DT option is marked
> as experimental.
> 
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> ---
>  arch/arm/mach-clps711x/Kconfig    |  7 +++++
>  arch/arm/mach-clps711x/Makefile   |  1 +
>  arch/arm/mach-clps711x/board-dt.c | 56 +++++++++++++++++++++++++++++++++++++++
>  3 files changed, 64 insertions(+)
>  create mode 100644 arch/arm/mach-clps711x/board-dt.c
> 
> diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig
> index bea6295..8ef38c6 100644
> --- a/arch/arm/mach-clps711x/Kconfig
> +++ b/arch/arm/mach-clps711x/Kconfig
> @@ -33,6 +33,13 @@ config ARCH_P720T
>  	  Say Y here if you intend to run this kernel on the ARM Prospector
>  	  720T.
>  
> +config CLPS711X_DT
> +	bool "Support CLPS711X platforms from device tree (Very Experimental!)"
> +	depends on USE_OF
> +	help
> +	  Include support for Cirrus Logic CLPS711X based platforms
> +	  using the device tree for discovery.
> +
>  config EP72XX_ROM_BOOT
>  	bool "EP721x/EP731x ROM boot"
>  	help
> diff --git a/arch/arm/mach-clps711x/Makefile b/arch/arm/mach-clps711x/Makefile
> index f04151e..77d3a76 100644
> --- a/arch/arm/mach-clps711x/Makefile
> +++ b/arch/arm/mach-clps711x/Makefile
> @@ -11,3 +11,4 @@ obj-$(CONFIG_ARCH_CDB89712)	+= board-cdb89712.o
>  obj-$(CONFIG_ARCH_CLEP7312)	+= board-clep7312.o
>  obj-$(CONFIG_ARCH_EDB7211)	+= board-edb7211.o
>  obj-$(CONFIG_ARCH_P720T)	+= board-p720t.o
> +obj-$(CONFIG_CLPS711X_DT)	+= board-dt.o
> diff --git a/arch/arm/mach-clps711x/board-dt.c b/arch/arm/mach-clps711x/board-dt.c
> new file mode 100644
> index 0000000..5b6f3f1
> --- /dev/null
> +++ b/arch/arm/mach-clps711x/board-dt.c
> @@ -0,0 +1,56 @@
> +/*
> + *  CLPS711X Generic DT board
> + *
> + *  Author: Alexander Shiyan <shc_work@mail.ru>, 2013
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + */
> +
> +#include <linux/clocksource.h>
> +#include <linux/clk-provider.h>
> +#include <linux/init.h>
> +#include <linux/of_platform.h>
> +
> +#include <asm/mach/arch.h>
> +
> +#include <mach/hardware.h>
> +
> +#include "common.h"
> +
> +void __init clps711x_timer_init_dt(void)
> +{
> +	of_clk_init(NULL);
> +	clocksource_of_init();
> +}

Doesn't generic code do that now if you don't provide this callback?

> +
> +static struct of_dev_auxdata clps711x_auxdata_lookup[] __initdata = {
> +	OF_DEV_AUXDATA("cirrus,clps711x-syscon", CLPS711X_PHYS_BASE + SYSCON1,
> +		       "syscon.1", NULL),
> +	OF_DEV_AUXDATA("cirrus,clps711x-syscon", CLPS711X_PHYS_BASE + SYSCON2,
> +		       "syscon.2", NULL),
> +	OF_DEV_AUXDATA("cirrus,clps711x-syscon", CLPS711X_PHYS_BASE + SYSCON3,
> +		       "syscon.3", NULL),
> +	{ }
> +};

Is there any reason these can't sit in the syscon driver? What are they
used for?

> +
> +static void __init clps711x_init_dt(void)
> +{
> +	of_platform_populate(NULL, of_default_bus_match_table,
> +			     clps711x_auxdata_lookup, NULL);
> +}

Depending on the answer to the above, you may not need this.

Thanks,
Mark.

> +
> +static const char *clps711x_dt_compat[] __initdata = {
> +	"cirrus,clps711x",
> +	NULL
> +};
> +
> +DT_MACHINE_START(CLPS711X_DT, "Cirrus Logic CLPS711X (Device Tree Support)")
> +	.dt_compat	= clps711x_dt_compat,
> +	.map_io		= clps711x_map_io,
> +	.init_time	= clps711x_timer_init,
> +	.init_machine	= clps711x_init_dt,
> +	.restart	= clps711x_restart,
> +MACHINE_END
> -- 
> 1.8.1.5
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

  reply	other threads:[~2013-08-02 11:15 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-18 18:34 [PATCH 00/10] ARM: clps711x: Initial DT support / Fixes Alexander Shiyan
2013-07-18 18:34 ` [PATCH 01/10] ARM: clps711x: Remove the special name for the syscon driver Alexander Shiyan
2013-08-14  6:29   ` Olof Johansson
2013-08-14  6:29   ` Olof Johansson
2013-07-18 18:34 ` [PATCH 02/10] ARM: clps711x: Drop fortunet board support Alexander Shiyan
2013-08-14  6:29   ` Olof Johansson
2013-07-18 18:34 ` [PATCH 03/10] ARM: clps711x: autcpu12: Remove incorrect config checking Alexander Shiyan
2013-08-14  6:30   ` Olof Johansson
2013-07-18 18:34 ` [PATCH 04/10] ARM: clps711x: edb7211: Remove extra iotable_init() call Alexander Shiyan
2013-08-14  6:30   ` Olof Johansson
2013-07-18 18:34 ` [PATCH 05/10] ARM: clps711x: Add CLPS711X clk driver Alexander Shiyan
2013-08-02 10:25   ` Mark Rutland
2013-07-18 18:34 ` [PATCH 06/10] ARM: clps711x: Add CLPS711X clocksource driver Alexander Shiyan
2013-07-19 14:38   ` Daniel Lezcano
2013-07-20  3:44     ` Alexander Shiyan
2013-07-20 21:48       ` Daniel Lezcano
2013-07-21  4:30         ` Alexander Shiyan
2013-08-02 10:46   ` Mark Rutland
2013-08-04 12:31     ` Alexander Shiyan
2013-08-05 17:02       ` Mark Rutland
2013-07-18 18:34 ` [PATCH 07/10] ARM: clps711x: Add CLPS711X irqchip driver Alexander Shiyan
2013-08-02 10:57   ` Mark Rutland
2013-08-02 15:55     ` Alexander Shiyan
2013-08-03 19:45       ` Arnd Bergmann
2013-08-04  4:50         ` Alexander Shiyan
2013-08-04 20:46           ` Arnd Bergmann
2013-08-04 20:57             ` Arnd Bergmann
2013-08-05 18:16               ` Alexander Shiyan
2013-08-05 19:26                 ` Arnd Bergmann
2013-08-05 20:42                   ` Alexander Shiyan
2013-08-05 21:00                     ` Arnd Bergmann
2013-08-06 15:25                       ` Alexander Shiyan
2013-08-05 16:36         ` H Hartley Sweeten
2013-07-18 18:34 ` [PATCH 08/10] ARM: clps711x: Add CLPS711X cpuidle driver Alexander Shiyan
2013-07-20 21:42   ` Daniel Lezcano
2013-07-21  4:11     ` Alexander Shiyan
2013-07-21  8:32       ` Daniel Lezcano
2013-07-21 10:04         ` Alexander Shiyan
2013-07-22 11:40       ` Russell King - ARM Linux
2013-08-02 11:10   ` Mark Rutland
2013-07-18 18:35 ` [PATCH 09/10] ARM: clps711x: Migrate CLPS711X subarch to the new basic drivers Alexander Shiyan
2013-07-18 18:35 ` [PATCH 10/10] ARM: clps711x: Add initial DT support Alexander Shiyan
2013-08-02 11:15   ` Mark Rutland [this message]
2013-08-03  3:54 ` [PATCH 00/10] ARM: clps711x: Initial DT support / Fixes Alexander Shiyan
2013-08-14  6:29   ` Olof Johansson
2013-08-17  4:32     ` Alexander Shiyan
2013-08-22  5:00       ` Olof Johansson
2013-08-14  6:31 ` Olof Johansson

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=20130802111531.GH2884@e106331-lin.cambridge.arm.com \
    --to=mark.rutland@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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 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.