From patchwork Thu Sep 1 17:25:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benoit Cousson X-Patchwork-Id: 1120042 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p81HXdPS026493 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 1 Sep 2011 17:34:00 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QzB4z-0002Vv-Rr; Thu, 01 Sep 2011 17:29:30 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QzB3V-0000Cz-Ew; Thu, 01 Sep 2011 17:27:57 +0000 Received: from arroyo.ext.ti.com ([192.94.94.40]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QzB1F-0007xw-3q for linux-arm-kernel@lists.infradead.org; Thu, 01 Sep 2011 17:25:41 +0000 Received: from dlep33.itg.ti.com ([157.170.170.112]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id p81HPZX7006253 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 1 Sep 2011 12:25:35 -0500 Received: from dlep26.itg.ti.com (smtp-le.itg.ti.com [157.170.170.27]) by dlep33.itg.ti.com (8.13.7/8.13.8) with ESMTP id p81HPZHL017176; Thu, 1 Sep 2011 12:25:35 -0500 (CDT) Received: from DLEE74.ent.ti.com (localhost [127.0.0.1]) by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id p81HPZP5021835; Thu, 1 Sep 2011 12:25:35 -0500 (CDT) Received: from dlelxv22.itg.ti.com (172.17.1.197) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Thu, 1 Sep 2011 12:25:35 -0500 Received: from localhost.localdomain (lncpu04.tif.ti.com [137.167.102.15]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id p81HPE8e017785; Thu, 1 Sep 2011 12:25:33 -0500 From: Benoit Cousson To: , Subject: [PATCH 6/7] OMAP3: board-dt: Add generic board file for DT support Date: Thu, 1 Sep 2011 19:25:11 +0200 Message-ID: <1314897912-18178-7-git-send-email-b-cousson@ti.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1314897912-18178-1-git-send-email-b-cousson@ti.com> References: <1314897912-18178-1-git-send-email-b-cousson@ti.com> MIME-Version: 1.0 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110901_132537_423309_2BC26B24 X-CRM114-Status: GOOD ( 18.92 ) X-Spam-Score: -2.8 (--) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-2.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [192.94.94.40 listed in list.dnswl.org] -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain Cc: manjugk@ti.com, devicetree-discuss@lists.ozlabs.org, linux-omap@vger.kernel.org, Benoit Cousson , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 01 Sep 2011 17:34:00 +0000 (UTC) Create an OMAP3 generic board to start the DT migration. This file is doing the minimal initialization needed to boot properly on a RAMDISK filesystem. As soon as the OMAP3 specifics will be removed, that board will be converted to an even more generic board-dt.c that will support every OMAP2+ platforms. Based on original patch from Manju: http://www.spinics.net/lists/linux-omap/msg55832.html Signed-off-by: Benoit Cousson Cc: Tony Lindgren Cc: G, Manjunath Kondaiah --- arch/arm/mach-omap2/Kconfig | 10 +++++ arch/arm/mach-omap2/Makefile | 1 + arch/arm/mach-omap2/board-omap3-dt.c | 74 ++++++++++++++++++++++++++++++++++ 3 files changed, 85 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-omap2/board-omap3-dt.c diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 5d501d2..82f0df2 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -305,6 +305,16 @@ config MACH_OMAP_3630SDP default y select OMAP_PACKAGE_CBP +config MACH_OMAP3_DT + bool "Generic OMAP3 board (FDT support)" + depends on ARCH_OMAP3 + select OMAP_PACKAGE_CBB + select USE_OF + help + Support for generic TI OMAP3 boards using Flattened Device Tree. + Say Y here to enable OMAP3 device tree support + More information at Documentation/devicetree + config MACH_TI8168EVM bool "TI8168 Evaluation Module" depends on SOC_OMAPTI816X diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 6ab9116..5144c17 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -197,6 +197,7 @@ obj-$(CONFIG_MACH_OVERO) += board-overo.o obj-$(CONFIG_MACH_OMAP3EVM) += board-omap3evm.o obj-$(CONFIG_MACH_OMAP3_PANDORA) += board-omap3pandora.o obj-$(CONFIG_MACH_OMAP_3430SDP) += board-3430sdp.o +obj-$(CONFIG_MACH_OMAP3_DT) += board-omap3-dt.o obj-$(CONFIG_MACH_NOKIA_N8X0) += board-n8x0.o obj-$(CONFIG_MACH_NOKIA_RM680) += board-rm680.o \ sdram-nokia.o diff --git a/arch/arm/mach-omap2/board-omap3-dt.c b/arch/arm/mach-omap2/board-omap3-dt.c new file mode 100644 index 0000000..6eb56c6 --- /dev/null +++ b/arch/arm/mach-omap2/board-omap3-dt.c @@ -0,0 +1,74 @@ +/* + * OMAP3 Device tree boards support + * + * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include + +#include +#include + +#include "mux.h" +#include "common-board-devices.h" +#include "sdram-micron-mt46h32m32lf-6.h" + + +static void __init omap3_init_early(void) +{ + omap2_init_common_infrastructure(); + omap2_init_common_devices(mt46h32m32lf6_sdrc_params, + mt46h32m32lf6_sdrc_params); +} + +#ifdef CONFIG_OMAP_MUX +static struct omap_board_mux board_mux[] __initdata = { + { .reg_offset = OMAP_MUX_TERMINATOR }, +}; +#endif + +static struct of_device_id omap_dt_match_table[] __initdata = { + { .compatible = "simple-bus", }, + { .compatible = "ti,omap-infra", }, + {} +}; + +static struct of_device_id omap_dt_intc_match[] __initdata = { + { .compatible = "ti,omap3-intc", }, + {} +}; + +static void __init omap3_init(void) +{ + struct device_node *node; + + node = of_find_matching_node(NULL, omap_dt_intc_match); + if (node) + irq_domain_add_simple(node, 0); + + omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); + omap_serial_init(); + + of_platform_populate(NULL, omap_dt_match_table, NULL, NULL); +} + +static const char *omap3_dt_match[] __initdata = { + "ti,omap3", + NULL +}; + +DT_MACHINE_START(OMAP3_DT, "TI OMAP3 (Flattened Device Tree)") + .reserve = omap_reserve, + .map_io = omap3_map_io, + .init_early = omap3_init_early, + .init_irq = omap3_init_irq, + .init_machine = omap3_init, + .timer = &omap3_timer, + .dt_compat = omap3_dt_match, +MACHINE_END