Thread (7 messages) 7 messages, 1 author, 2016-08-08
STALE3587d
Revisions (6)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v3 [diff vs current]
  4. v4 [diff vs current]
  5. v5 [diff vs current]
  6. v6 current

[PATCH v6 1/6] ARM: at91: sama5: Add a new DT_MACHINE for SAMA5D2

From: Wenyou Yang <hidden>
Date: 2016-08-08 10:17:55
Also in: linux-arm-kernel, linux-clk, lkml
Subsystem: arm port, arm/microchip (at91) soc support, the rest · Maintainers: Russell King, Nicolas Ferre, Alexandre Belloni, Claudiu Beznea, Linus Torvalds

To support the SAMA5D2 specific pm_init function, add a new
DT_MACHINE for SAMA5D2.

Signed-off-by: Wenyou Yang <redacted>
---

Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/arm/mach-at91/sama5.c | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-at91/sama5.c b/arch/arm/mach-at91/sama5.c
index 922b85f..2debfe2 100644
--- a/arch/arm/mach-at91/sama5.c
+++ b/arch/arm/mach-at91/sama5.c
@@ -59,7 +59,7 @@ static const struct at91_soc sama5_socs[] = {
 	{ /* sentinel */ },
 };
 
-static void __init sama5_dt_device_init(void)
+static void __init sama5_common_init(void)
 {
 	struct soc_device *soc;
 	struct device *soc_dev = NULL;
@@ -69,6 +69,11 @@ static void __init sama5_dt_device_init(void)
 		soc_dev = soc_device_to_device(soc);
 
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, soc_dev);
+}
+
+static void __init sama5_dt_device_init(void)
+{
+	sama5_common_init();
 	sama5_pm_init();
 }
 
@@ -84,7 +89,6 @@ DT_MACHINE_START(sama5_dt, "Atmel SAMA5")
 MACHINE_END
 
 static const char *const sama5_alt_dt_board_compat[] __initconst = {
-	"atmel,sama5d2",
 	"atmel,sama5d4",
 	NULL
 };
@@ -95,3 +99,20 @@ DT_MACHINE_START(sama5_alt_dt, "Atmel SAMA5")
 	.dt_compat	= sama5_alt_dt_board_compat,
 	.l2c_aux_mask	= ~0UL,
 MACHINE_END
+
+static void __init sama5d2_dt_device_init(void)
+{
+	sama5_common_init();
+}
+
+static const char *const sama5d2_dt_board_compat[] __initconst = {
+	"atmel,sama5d2",
+	NULL
+};
+
+DT_MACHINE_START(sama5d2_dt, "Atmel SAMA5")
+	/* Maintainer: Atmel */
+	.init_machine	= sama5d2_dt_device_init,
+	.dt_compat	= sama5d2_dt_board_compat,
+	.l2c_aux_mask	= ~0UL,
+MACHINE_END
-- 
2.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help