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: 1119942 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p81HPlda024968 for ; Thu, 1 Sep 2011 17:25:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756587Ab1IARZp (ORCPT ); Thu, 1 Sep 2011 13:25:45 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:40469 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756466Ab1IARZp (ORCPT ); Thu, 1 Sep 2011 13:25:45 -0400 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: , CC: , , , , Benoit Cousson 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 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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:25:47 +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