From patchwork Mon Mar 3 10:05:54 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: 3753751 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 DB3B29F3E8 for ; Mon, 3 Mar 2014 11:33:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 111E72039E for ; Mon, 3 Mar 2014 11:33:11 +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 7F0B320035 for ; Mon, 3 Mar 2014 11:33:09 +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 1WKPqD-0001FL-V1; Mon, 03 Mar 2014 10:11:24 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WKPpM-0001ho-D4; Mon, 03 Mar 2014 10:10:28 +0000 Received: from mail-we0-f177.google.com ([74.125.82.177]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WKPpB-0001dp-OI for linux-arm-kernel@lists.infradead.org; Mon, 03 Mar 2014 10:10:18 +0000 Received: by mail-we0-f177.google.com with SMTP id u57so1080985wes.36 for ; Mon, 03 Mar 2014 02:09:53 -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=IQHyc++MVBYkcGn31v5c52EGue9QmjKHnMInDqM/06o=; b=XKOa64F4IsgZu9ZfTahZUeg+32HuLZpqqHfzv+y8zPsIjrVq91RnF4umm8zmaLo7BC cRBnf/KXwknaOrovIzLodsoKRFZEOmYLXux/5keahnPcuydBC5MyDSx03ipsYk5Jvmo/ 2caRSXBLex8n69qSvs4opJRgBzgfR3lrHnrJiBMkY640w7G3r45+AbWqmwBarGK9VRY3 AfVMsrfHwW+Si3CxGfUkIiftw5LrmlldPGG0ry8gIWdgavj4l61uN7Mn4evLOs7yo3Hf NM+jzsmf8sHiEtYskRdyKqs9lWMX4p2cDAu/7bPG8/tQBfr9oXNEEET/iKjDpRHDfmOW yirA== X-Received: by 10.194.85.75 with SMTP id f11mr7895487wjz.47.1393841392296; Mon, 03 Mar 2014 02:09:52 -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 t5sm32769710wjw.15.2014.03.03.02.09.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 03 Mar 2014 02:09:51 -0800 (PST) From: Jean-Jacques Hiblot To: nicolas.ferre@atmel.com Subject: [PATCH v5 1/9] at91: dt: Adds support for the bus matrix declaration in the DT Date: Mon, 3 Mar 2014 11:05:54 +0100 Message-Id: <1393841162-25339-2-git-send-email-jjhiblot@traphandler.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1393841162-25339-1-git-send-email-jjhiblot@traphandler.com> References: <1393841162-25339-1-git-send-email-jjhiblot@traphandler.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140303_051017_910173_014A3FFA X-CRM114-Status: GOOD ( 10.53 ) X-Spam-Score: -2.6 (--) Cc: thomas.petazzoni@free-electrons.com, devicetree@vger.kernel.org, Jean-Jacques Hiblot , linux-kernel@vger.kernel.org, b.brezillon@overkiz.com, alexandre.belloni@free-electrons.com, gregory.clement@free-electrons.com, plagnioj@jcrosoft.com, 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.2 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 | 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();