From patchwork Wed Feb 12 10:06:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Jacques Hiblot X-Patchwork-Id: 3636181 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B73919F334 for ; Wed, 12 Feb 2014 10:17:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 461622018E for ; Wed, 12 Feb 2014 10:17:29 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D57DD2016C for ; Wed, 12 Feb 2014 10:17:27 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WDWsd-0007BZ-Gl; Wed, 12 Feb 2014 10:17:23 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WDWsb-0004NU-4K; Wed, 12 Feb 2014 10:17:21 +0000 Received: from mail-we0-f173.google.com ([74.125.82.173]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WDWsW-0004MT-SI for linux-arm-kernel@lists.infradead.org; Wed, 12 Feb 2014 10:17:18 +0000 Received: by mail-we0-f173.google.com with SMTP id x48so16838wes.32 for ; Wed, 12 Feb 2014 02:16:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=o+5TTXhB/Ri4R//zhWH/7LFA5UA+cS4efuXhM8TIsNI=; b=Q79fL2Pm3uHUdv3fYlD+BmK0xnlWcbH/HLMYGFyBo8Ffhfi8Bt9VXg1oML9EazCMBc JNzvifjRBI0+q5VHcl/+h026e/Ih3hInUbdpumtPe1zNhwiqtlYY1JbOi2xWwix5k/Ka b8V3YHqZbWHDWFKxa7UTZDIt6TQ7g/Gy7jHjmTP9qispp35p9eNFvbN+Qsbrojh4eQ2e dj34a2Zk0xzGSfwGgP2mAoCxr21EVxq6YgrrW+q6iA0wBacsfKZwBayy1Wl3ezAnNg/x mgq0z9U0WGrN/TMQ5fxjuol5+0JNbUuZiHVAYVufNoKIbvXGxtYahqyufOvn1AVtNkfS xA/g== X-Received: by 10.180.185.197 with SMTP id fe5mr1126821wic.56.1392199802893; Wed, 12 Feb 2014 02:10:02 -0800 (PST) Received: from stedf17-labo202.ds.jdsu.net. (4-161.80-90.static-ip.oleane.fr. [90.80.161.4]) by mx.google.com with ESMTPSA id jd2sm4483352wic.9.2014.02.12.02.10.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 12 Feb 2014 02:10:02 -0800 (PST) From: Jean-Jacques Hiblot To: nicolas.ferre@atmel.com, plagnioj@jcrosoft.com, b.brezillon@overkiz.com Subject: [PATCH v4 1/8] at91: dt: Adds support for the bus matrix declaration in the DT Date: Wed, 12 Feb 2014 11:06:40 +0100 Message-Id: <1392199607-27452-2-git-send-email-jjhiblot@traphandler.com> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1392199607-27452-1-git-send-email-jjhiblot@traphandler.com> References: <1392199607-27452-1-git-send-email-jjhiblot@traphandler.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140212_051717_016403_070F704E X-CRM114-Status: GOOD ( 10.34 ) X-Spam-Score: -2.6 (--) Cc: gregory.clement@free-electrons.com, Jean-Jacques Hiblot , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Jean-Jacques Hiblot --- arch/arm/mach-at91/setup.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c index f7ca97b..b8d0b66 100644 --- a/arch/arm/mach-at91/setup.c +++ b/arch/arm/mach-at91/setup.c @@ -487,6 +487,28 @@ end: of_node_put(np); } +static struct of_device_id matrix_ids[] = { + { .compatible = "atmel,at91sam9261-bus-matrix", }, + { /*sentinel*/ } +}; + +static void at91_dt_matrix(void) +{ + struct device_node *np; + + np = of_find_matching_node(NULL, matrix_ids); + if (!np) { + pr_debug("AT91: unable to find compatible bus matrix controller node in dtb\n"); + return; + } + + 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 +528,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();