[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 3 Mar 2014 11:05:54 +0100
From: Jean-Jacques Hiblot <jjhiblot@...phandler.com>
To: nicolas.ferre@...el.com
Cc: plagnioj@...osoft.com, b.brezillon@...rkiz.com,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
gregory.clement@...e-electrons.com, devicetree@...r.kernel.org,
thomas.petazzoni@...e-electrons.com,
alexandre.belloni@...e-electrons.com,
Jean-Jacques Hiblot <jjhiblot@...phandler.com>
Subject: [PATCH v5 1/9] at91: dt: Adds support for the bus matrix declaration in the DT
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@...phandler.com>
---
arch/arm/mach-at91/setup.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c
index f7ca97b..6a4e07e 100644
--- a/arch/arm/mach-at91/setup.c
+++ b/arch/arm/mach-at91/setup.c
@@ -487,6 +487,26 @@ end:
of_node_put(np);
}
+static struct of_device_id matrix_ids[] = {
+ { .compatible = "atmel,at91sam9260-bus-matrix", },
+ { /*sentinel*/ }
+};
+
+static void at91_dt_matrix(void)
+{
+ struct device_node *np;
+
+ np = of_find_matching_node(NULL, matrix_ids);
+ if (!np)
+ panic("AT91: unable to find compatible bus matrix controller node in dtb\n");
+
+ at91_matrix_base = of_iomap(np, 0);
+ if (!at91_matrix_base)
+ panic("Impossible to ioremap at91_matrix_base\n");
+
+ of_node_put(np);
+}
+
void __init at91rm9200_dt_initialize(void)
{
at91_dt_ramc();
@@ -506,6 +526,7 @@ void __init at91_dt_initialize(void)
at91_dt_rstc();
at91_dt_ramc();
at91_dt_shdwc();
+ at91_dt_matrix();
/* Init clock subsystem */
at91_dt_clock_init();
--
1.9.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists