From patchwork Thu Jan 23 15:57:15 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: 3529911 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B9853C02DC for ; Thu, 23 Jan 2014 16:35:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A4B5820179 for ; Thu, 23 Jan 2014 16:35:19 +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 BCAF820122 for ; Thu, 23 Jan 2014 16:35:14 +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 1W6MlE-00073K-A7; Thu, 23 Jan 2014 16:04:10 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W6MkD-0005FW-Ti; Thu, 23 Jan 2014 16:03:05 +0000 Received: from mail-we0-f178.google.com ([74.125.82.178]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W6MiX-000532-MX for linux-arm-kernel@lists.infradead.org; Thu, 23 Jan 2014 16:01:22 +0000 Received: by mail-we0-f178.google.com with SMTP id t60so1395582wes.9 for ; Thu, 23 Jan 2014 08:00:59 -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=YjW/Z+d3M8wifN+qc4jAiZUtvU+5IPh9C8vqT7I885I=; b=b53kAvgLboxBZjhbJhmYsxz7smkbZKn8c5oOVlgkZa7q2pqdj7E3ZweQhgy8xtyABY OmclrtbmCUI1TvQc8RpMKT9d+l/XNByGljAkMVYV/HUcPWG4jSzL70Q1fJwpF6AU6zSF qiu74y9L+oAiEfgbYWaqmhQWWJ9kx5Qr/V/Y+BvEjpPet5hlwv6SVN+7YD4VNaut/fk8 nFqwTpZFDgfA6M6VIm/5GKJVt0+KZmnP/XZ5+8/vjE9LzIaUiz/i4I8qzaoPI/F0vm/J NQ3Cfpc+Po8c9TabHm0yauCSm3EkdACmWrOEe0q1NSzX1DpQh6zleTP/WzdWXtgsDsNx Da7g== X-Received: by 10.194.2.70 with SMTP id 6mr7181396wjs.25.1390492859906; Thu, 23 Jan 2014 08:00:59 -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 fz5sm16760691wic.11.2014.01.23.08.00.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Jan 2014 08:00:59 -0800 (PST) From: Jean-Jacques Hiblot To: nicolas.ferre@atmel.com, plagnioj@jcrosoft.com, b.brezillon@overkiz.com Subject: [PATCH v3 11/15] at91: dt: Adds support for the bus matrix declaration in the device tree Date: Thu, 23 Jan 2014 16:57:15 +0100 Message-Id: <1390492639-7299-12-git-send-email-jjhiblot@traphandler.com> X-Mailer: git-send-email 1.8.5.2 In-Reply-To: <1390492639-7299-1-git-send-email-jjhiblot@traphandler.com> References: <1390492639-7299-1-git-send-email-jjhiblot@traphandler.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140123_110121_854615_A3DF6663 X-CRM114-Status: GOOD ( 11.11 ) X-Spam-Score: -2.6 (--) Cc: Jean-Jacques Hiblot , 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.8 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 7d3f7cc..f61638d 100644 --- a/arch/arm/mach-at91/setup.c +++ b/arch/arm/mach-at91/setup.c @@ -483,6 +483,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(); @@ -502,6 +524,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();