From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] ARM: dts: dove: Integrate devicetree support
Date: Sat, 07 Jul 2012 14:34:09 -0500 [thread overview]
Message-ID: <4FF88F31.7050402@gmail.com> (raw)
In-Reply-To: <1341318868-24567-6-git-send-email-sebastian.hesselbarth@googlemail.com>
On 07/03/2012 07:34 AM, Sebastian Hesselbarth wrote:
> This integrates devicetree support for Marvell Dove and currently
> suppported boards.
>
> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@googlemail.com>
> Cc: Jason Cooper <jason@lakedaemon.net>
> Cc: Andrew Lunn <andrew@lunn.ch>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: linux-arm-kernel at lists.infradead.org
> ---
> arch/arm/mach-dove/Kconfig | 20 ++++++++++++++++++++
> arch/arm/mach-dove/Makefile | 4 ++++
> arch/arm/mach-dove/Makefile.boot | 3 +++
> arch/arm/mach-dove/common.c | 17 +++++++++--------
> arch/arm/mach-dove/common.h | 25 +++++++++++++++++++++++++
> 5 files changed, 61 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm/mach-dove/Kconfig b/arch/arm/mach-dove/Kconfig
> index dd937c5..8dff8fc 100644
> --- a/arch/arm/mach-dove/Kconfig
> +++ b/arch/arm/mach-dove/Kconfig
> @@ -15,6 +15,26 @@ config MACH_CM_A510
> Say 'Y' here if you want your kernel to support the
> CompuLab CM-A510 Board.
>
> +config ARCH_DOVE_DT
> + bool "Marvell Dove Flattened Device Tree"
> + select USE_OF
> + help
> + Say 'Y' here if you want your kernel to support the
> + Marvell Dove using flattened device tree.
> +
> +config MACH_DOVE_DB_DT
> + bool "Marvell DB-MV88AP510 Development Board (Flattened Device Tree)"
> + select ARCH_DOVE_DT
> + help
> + Say 'Y' here if you want your kernel to support the
> + Marvell DB-MV88AP510 Development Board (Flattened Device Tree).
> +
> +config MACH_CM_A510_DT
> + bool "CompuLab CM-A510 Board (Flattened Device Tree)"
> + help
> + Say 'Y' here if you want your kernel to support the
> + CompuLab CM-A510 Board (Flattened Device Tree).
> +
You should remove these board config options. A goal with DT is to
remove board related code.
> endmenu
>
> endif
> diff --git a/arch/arm/mach-dove/Makefile b/arch/arm/mach-dove/Makefile
> index fa0f018..bdb39f5 100644
> --- a/arch/arm/mach-dove/Makefile
> +++ b/arch/arm/mach-dove/Makefile
> @@ -2,3 +2,7 @@ obj-y += common.o addr-map.o irq.o pcie.o mpp.o
>
> obj-$(CONFIG_MACH_DOVE_DB) += dove-db-setup.o
> obj-$(CONFIG_MACH_CM_A510) += cm-a510.o
> +
> +obj-$(CONFIG_ARCH_DOVE_DT) += board-dt.o
> +obj-$(CONFIG_MACH_DOVE_DB_DT) += board-dove-db.o
> +obj-$(CONFIG_MACH_CM_A510_DT) += board-cm-a510.o
> diff --git a/arch/arm/mach-dove/Makefile.boot b/arch/arm/mach-dove/Makefile.boot
> index 760a0ef..185e988 100644
> --- a/arch/arm/mach-dove/Makefile.boot
> +++ b/arch/arm/mach-dove/Makefile.boot
> @@ -1,3 +1,6 @@
> zreladdr-y += 0x00008000
> params_phys-y := 0x00000100
> initrd_phys-y := 0x00800000
> +
> +dtb-$(CONFIG_MACH_DOVE_DB_DT) += dove-dove-db.dtb
> +dtb-$(CONFIG_MACH_CM_A510_DT) += dove-cm-a510.dtb
> diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c
> index 9493076..6236035 100644
> --- a/arch/arm/mach-dove/common.c
> +++ b/arch/arm/mach-dove/common.c
> @@ -33,8 +33,6 @@
> #include <plat/addr-map.h>
> #include "common.h"
>
> -static int get_tclk(void);
> -
> /*****************************************************************************
> * I/O Address Mapping
> ****************************************************************************/
> @@ -72,10 +70,10 @@ void __init dove_map_io(void)
> ****************************************************************************/
> static struct clk *tclk;
>
> -static void __init clk_init(void)
> +void __init dove_clk_init(void)
> {
> tclk = clk_register_fixed_rate(NULL, "tclk", NULL, CLK_IS_ROOT,
> - get_tclk());
> + dove_tclk);
>
> orion_clkdev_init(tclk);
> }
> @@ -187,7 +185,9 @@ void __init dove_init_early(void)
> orion_time_set_base(TIMER_VIRT_BASE);
> }
>
> -static int get_tclk(void)
> +int dove_tclk;
> +
> +static int __init dove_find_tclk(void)
> {
> /* use DOVE_RESET_SAMPLE_HI/LO to detect tclk */
> return 166666667;
> @@ -195,8 +195,9 @@ static int get_tclk(void)
>
> static void __init dove_timer_init(void)
> {
> + dove_tclk = dove_find_tclk();
> orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR,
> - IRQ_DOVE_BRIDGE, get_tclk());
> + IRQ_DOVE_BRIDGE, dove_tclk);
> }
>
> struct sys_timer dove_timer = {
> @@ -285,7 +286,7 @@ void __init dove_sdio1_init(void)
> void __init dove_init(void)
> {
> printk(KERN_INFO "Dove 88AP510 SoC, ");
> - printk(KERN_INFO "TCLK = %dMHz\n", (get_tclk() + 499999) / 1000000);
> + printk(KERN_INFO "TCLK = %dMHz\n", (dove_tclk + 499999) / 1000000);
>
> #ifdef CONFIG_CACHE_TAUROS2
> tauros2_init();
> @@ -293,7 +294,7 @@ void __init dove_init(void)
> dove_setup_cpu_mbus();
>
> /* Setup root of clk tree */
> - clk_init();
> + dove_clk_init();
>
> /* internal devices that every board has */
> dove_rtc_init();
> diff --git a/arch/arm/mach-dove/common.h b/arch/arm/mach-dove/common.h
> index 6432a3b..a11f842 100644
> --- a/arch/arm/mach-dove/common.h
> +++ b/arch/arm/mach-dove/common.h
> @@ -40,4 +40,29 @@ void dove_sdio0_init(void);
> void dove_sdio1_init(void);
> void dove_restart(char, const char *);
>
> +/* board init functions for boards not fully converted to fdt */
> +#ifdef CONFIG_MACH_DOVE_DB_DT
> +void dove_db_init(void);
> +#else
> +static inline void dove_db_init(void) {};
> +#endif
> +
> +#ifdef CONFIG_MACH_CM_A510_DT
> +void cm_a510_init(void);
> +#else
> +static inline void cm_a510_init(void) {};
> +#endif
> +
> +/* early init functions not converted to fdt yet */
> +void dove_clk_init(void);
> +void dove_rtc_init(void);
> +void dove_xor0_init(void);
> +void dove_xor1_init(void);
> +
> +extern int dove_tclk;
> +
> +#ifdef CONFIG_CACHE_TAUROS2
> +#include <asm/hardware/cache-tauros2.h>
> +#endif
> +
> #endif
>
next prev parent reply other threads:[~2012-07-07 19:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-03 12:34 [PATCH 0/3] ARM: dts: dove: Basic devicetree support for Marvell Dove Sebastian Hesselbarth
2012-07-03 12:34 ` [PATCH 1/3] ARM: dts: dove: Add devicetree descriptors Sebastian Hesselbarth
2012-07-07 19:37 ` Rob Herring
2012-07-03 12:34 ` [PATCH 2/3] ARM: dts: dove: Add devicetree-based board setup Sebastian Hesselbarth
2012-07-07 19:42 ` Rob Herring
2012-07-03 12:34 ` [PATCH 3/3] ARM: dts: dove: Integrate devicetree support Sebastian Hesselbarth
2012-07-07 19:34 ` Rob Herring [this message]
2012-07-07 21:08 ` Sebastian Hesselbarth
2012-07-08 18:57 ` Arnd Bergmann
2012-07-03 12:50 ` [PATCH 0/3] ARM: dts: dove: Basic devicetree support for Marvell Dove Andrew Lunn
2012-07-03 13:03 ` Sebastian Hesselbarh
2012-07-03 13:12 ` Andrew Lunn
2012-07-07 17:31 ` Jason Cooper
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=4FF88F31.7050402@gmail.com \
--to=robherring2@gmail.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.