mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Boris Brezillon <boris.brezillon@free-electrons.com>,
	Bo Shen <voice.shen@atmel.com>,
	Wenyou Yang <Wenyou.Yang@atmel.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Alexandre Belloni <alexandre.belloni@free-electrons.com>
Subject: [PATCH 02/17] ARM: at91: move sama5 specific code into per-soc files
Date: Thu, 15 Jan 2015 22:58:05 +0100	[thread overview]
Message-ID: <1421359100-8930-3-git-send-email-alexandre.belloni@free-electrons.com> (raw)
In-Reply-To: <1421359100-8930-1-git-send-email-alexandre.belloni@free-electrons.com>

From: Arnd Bergmann <arnd@arndb.de>

The common board-dt-sama5 file no longer contains any shared
code, so we can just move the machine descriptors into the
per-soc files for further cleanup.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 arch/arm/mach-at91/Makefile         |  3 --
 arch/arm/mach-at91/board-dt-sama5.c | 60 -------------------------------------
 arch/arm/mach-at91/sama5d3.c        | 28 +++++++++++++----
 arch/arm/mach-at91/sama5d4.c        | 33 ++++++++++++++++++--
 4 files changed, 54 insertions(+), 70 deletions(-)
 delete mode 100644 arch/arm/mach-at91/board-dt-sama5.c

diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
index d89c2437ef10..4bce1fac680e 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -21,9 +21,6 @@ obj-$(CONFIG_SOC_SAMA5D4)	+= sama5d4.o
 # AT91SAM board with device-tree
 obj-$(CONFIG_SOC_AT91SAM9) += board-dt-sam9.o
 
-# SAMA5 board with device-tree
-obj-$(CONFIG_SOC_SAMA5)		+= board-dt-sama5.o
-
 # Power Management
 obj-$(CONFIG_PM)		+= pm.o
 obj-$(CONFIG_AT91_SLOW_CLOCK)	+= pm_slowclock.o
diff --git a/arch/arm/mach-at91/board-dt-sama5.c b/arch/arm/mach-at91/board-dt-sama5.c
deleted file mode 100644
index 44d372a22a29..000000000000
--- a/arch/arm/mach-at91/board-dt-sama5.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- *  Setup code for SAMA5 Evaluation Kits with Device Tree support
- *
- *  Copyright (C) 2013 Atmel,
- *                2013 Ludovic Desroches <ludovic.desroches@atmel.com>
- *
- * Licensed under GPLv2 or later.
- */
-
-#include <linux/types.h>
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/gpio.h>
-#include <linux/micrel_phy.h>
-#include <linux/of.h>
-#include <linux/of_irq.h>
-#include <linux/of_platform.h>
-#include <linux/phy.h>
-#include <linux/clk-provider.h>
-
-#include <asm/setup.h>
-#include <asm/irq.h>
-#include <asm/mach/arch.h>
-#include <asm/mach/map.h>
-#include <asm/mach/irq.h>
-
-#include "generic.h"
-
-static void __init sama5_dt_device_init(void)
-{
-	at91_sam9260_pm_init();
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-}
-
-static const char *sama5_dt_board_compat[] __initconst = {
-	"atmel,sama5",
-	NULL
-};
-
-DT_MACHINE_START(sama5_dt, "Atmel SAMA5 (Device Tree)")
-	/* Maintainer: Atmel */
-	.map_io		= at91_map_io,
-	.init_early	= at91_dt_initialize,
-	.init_machine	= sama5_dt_device_init,
-	.dt_compat	= sama5_dt_board_compat,
-MACHINE_END
-
-static const char *sama5_alt_dt_board_compat[] __initconst = {
-	"atmel,sama5d4",
-	NULL
-};
-
-DT_MACHINE_START(sama5_alt_dt, "Atmel SAMA5 (Device Tree)")
-	/* Maintainer: Atmel */
-	.map_io		= at91_alt_map_io,
-	.init_early	= at91_dt_initialize,
-	.init_machine	= sama5_dt_device_init,
-	.dt_compat	= sama5_alt_dt_board_compat,
-	.l2c_aux_mask	= ~0UL,
-MACHINE_END
diff --git a/arch/arm/mach-at91/sama5d3.c b/arch/arm/mach-at91/sama5d3.c
index b7c64ca7107f..ecd35f135a9f 100644
--- a/arch/arm/mach-at91/sama5d3.c
+++ b/arch/arm/mach-at91/sama5d3.c
@@ -7,19 +7,18 @@
  * Licensed under GPLv2 or later.
  */
 
-#include <linux/module.h>
-#include <linux/dma-mapping.h>
-#include <linux/clk/at91_pmc.h>
+#include <linux/init.h>
+#include <linux/of_platform.h>
 
-#include <asm/irq.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
+#include <asm/mach/irq.h>
+
 #include <mach/sama5d3.h>
 #include <mach/cpu.h>
 
 #include "soc.h"
 #include "generic.h"
-#include "sam9_smc.h"
 
 /* --------------------------------------------------------------------
  *  AT91SAM9x5 processor initialization
@@ -27,3 +26,22 @@
 
 AT91_SOC_START(sama5d3)
 AT91_SOC_END
+
+static void __init sama5_dt_device_init(void)
+{
+	at91_sam9260_pm_init();
+	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+}
+
+static const char *sama5_dt_board_compat[] __initconst = {
+	"atmel,sama5",
+	NULL
+};
+
+DT_MACHINE_START(sama5_dt, "Atmel SAMA5 (Device Tree)")
+	/* Maintainer: Atmel */
+	.map_io		= at91_map_io,
+	.init_early	= at91_dt_initialize,
+	.init_machine	= sama5_dt_device_init,
+	.dt_compat	= sama5_dt_board_compat,
+MACHINE_END
diff --git a/arch/arm/mach-at91/sama5d4.c b/arch/arm/mach-at91/sama5d4.c
index fa127fb79221..68573cd9d8f9 100644
--- a/arch/arm/mach-at91/sama5d4.c
+++ b/arch/arm/mach-at91/sama5d4.c
@@ -10,17 +10,27 @@
 #include <linux/module.h>
 #include <linux/dma-mapping.h>
 #include <linux/clk/at91_pmc.h>
+#include <linux/types.h>
+#include <linux/init.h>
+#include <linux/gpio.h>
+#include <linux/micrel_phy.h>
+#include <linux/of.h>
+#include <linux/of_irq.h>
+#include <linux/of_platform.h>
+#include <linux/phy.h>
+#include <linux/clk-provider.h>
 
 #include <asm/irq.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
+#include <asm/mach/irq.h>
+
 #include <mach/sama5d4.h>
 #include <mach/cpu.h>
 #include <mach/hardware.h>
 
 #include "soc.h"
 #include "generic.h"
-#include "sam9_smc.h"
 
 /* --------------------------------------------------------------------
  *  Processor initialization
@@ -52,7 +62,6 @@ static struct map_desc at91_io_desc[] __initdata = {
 	},
 };
 
-
 static void __init sama5d4_map_io(void)
 {
 	iotable_init(at91_io_desc, ARRAY_SIZE(at91_io_desc));
@@ -61,3 +70,23 @@ static void __init sama5d4_map_io(void)
 AT91_SOC_START(sama5d4)
 	.map_io = sama5d4_map_io,
 AT91_SOC_END
+
+static void __init sama5d4_dt_device_init(void)
+{
+	at91_sam9260_pm_init();
+	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+}
+
+static const char *sama5_alt_dt_board_compat[] __initconst = {
+	"atmel,sama5d4",
+	NULL
+};
+
+DT_MACHINE_START(sama5_alt_dt, "Atmel SAMA5 (Device Tree)")
+	/* Maintainer: Atmel */
+	.map_io		= at91_alt_map_io,
+	.init_early	= at91_dt_initialize,
+	.init_machine	= sama5d4_dt_device_init,
+	.dt_compat	= sama5_alt_dt_board_compat,
+	.l2c_aux_mask	= ~0UL,
+MACHINE_END
-- 
2.1.0


  parent reply	other threads:[~2015-01-15 21:59 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-15 21:58 [PATCH 00/17] AT91 cleanup for 3.20 #3 Alexandre Belloni
2015-01-15 21:58 ` [PATCH 01/17] ARM: at91: merge at91rm9200 files Alexandre Belloni
2015-01-15 21:58 ` Alexandre Belloni [this message]
2015-01-15 21:58 ` [PATCH 03/17] ARM: at91:remove unused mach/system_rev.h Alexandre Belloni
2015-01-15 21:58 ` [PATCH 04/17] ARM: at91: fix sam9n12 and sam9x5 arm_pm_idle Alexandre Belloni
2015-01-15 21:58 ` [PATCH 05/17] ARM: at91: sam9: set arm_pm_idle from sam9_dt_device_init Alexandre Belloni
2015-01-15 21:58 ` [PATCH 06/17] ARM: at91: remove unused at91_ioremap_matrix and header Alexandre Belloni
2015-01-15 21:58 ` [PATCH 07/17] ARM: at91: remove unused _matrix.h headers Alexandre Belloni
2015-01-15 21:58 ` [PATCH 08/17] ARM: at91: stop using HAVE_AT91_DBGUx Alexandre Belloni
2015-01-20 10:34   ` Nicolas Ferre
2015-01-20 15:12     ` Alexandre Belloni
2015-01-15 21:58 ` [PATCH 09/17] ARM: at91: pm: remove warning to remove SOC_AT91SAM9263 usage Alexandre Belloni
2015-01-15 21:58 ` [PATCH 10/17] ARM: at91: merge SOC_AT91SAM9xxx Alexandre Belloni
2015-01-22 10:22   ` Nicolas Ferre
2015-01-22 16:36     ` Alexandre Belloni
2015-01-26 17:49   ` [PATCH v2] " Nicolas Ferre
2015-01-15 21:58 ` [PATCH 11/17] ARM: at91: remove at91_boot_soc Alexandre Belloni
2015-01-26 18:08   ` [PATCH v2] ARM: at91: at91rm9200: set idle and restart from rm9200_dt_device_init() Nicolas Ferre
2015-01-26 19:01     ` Alexandre Belloni
2015-01-15 21:58 ` [PATCH 12/17] ARM: at91: rework initialization for rm9200 based boards Alexandre Belloni
2015-01-15 21:58 ` [PATCH 13/17] ARM: at91: rework initialization for sam9 " Alexandre Belloni
2015-01-15 21:58 ` [PATCH 14/17] ARM: at91: rework initialization for sama5 " Alexandre Belloni
2015-01-15 21:58 ` [PATCH 15/17] ARM: at91: remove old setup Alexandre Belloni
2015-01-21 16:29   ` Nicolas Ferre
2015-01-21 20:40     ` Alexandre Belloni
2015-01-15 21:58 ` [PATCH 16/17] ARM: at91: mark const init data with __initconst instead of __initdata Alexandre Belloni
2015-01-15 21:58 ` [PATCH 17/17] ARM: at91: remove at91_dt_initialize Alexandre Belloni
2015-01-22 10:31 ` [PATCH 00/17] AT91 cleanup for 3.20 #3 Nicolas Ferre

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=1421359100-8930-3-git-send-email-alexandre.belloni@free-electrons.com \
    --to=alexandre.belloni@free-electrons.com \
    --cc=Wenyou.Yang@atmel.com \
    --cc=arnd@arndb.de \
    --cc=boris.brezillon@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.ferre@atmel.com \
    --cc=plagnioj@jcrosoft.com \
    --cc=voice.shen@atmel.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

all inboxes | Powered by JetHome®