From patchwork Thu Aug 18 21:50:47 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Gardiner X-Patchwork-Id: 1078102 Received: from arroyo.ext.ti.com (arroyo.ext.ti.com [192.94.94.40]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7ILuZoG019121 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 18 Aug 2011 21:56:55 GMT Received: from dlep36.itg.ti.com ([157.170.170.91]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id p7ILptag032377 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Aug 2011 16:52:11 -0500 Received: from linux.omap.com (smtp-le.itg.ti.com [157.170.170.27]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id p7ILptqt021099; Thu, 18 Aug 2011 16:51:55 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 6D7D680673; Thu, 18 Aug 2011 16:51:46 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp51.itg.ti.com (dflp51.itg.ti.com [128.247.22.94]) by linux.omap.com (Postfix) with ESMTP id 47CAF8062A for ; Thu, 18 Aug 2011 16:50:57 -0500 (CDT) Received: from red.ext.ti.com (red.ext.ti.com [192.94.93.37]) by dflp51.itg.ti.com (8.13.7/8.13.8) with ESMTP id p7ILovqs004286 for ; Thu, 18 Aug 2011 16:50:57 -0500 (CDT) Received: from psmtp.com (na3sys009amx255.postini.com [74.125.149.139]) by red.ext.ti.com (8.13.7/8.13.7) with SMTP id p7ILouWl020754 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 18 Aug 2011 16:50:56 -0500 Received: from na3sys009aog107.obsmtp.com ([74.125.149.197]) (using TLSv1) by na3sys009amx255.postini.com ([74.125.148.10]) with SMTP; Thu, 18 Aug 2011 21:50:56 GMT Received: from mail-yi0-f52.google.com ([209.85.218.52]) (using TLSv1) by na3sys009aob107.postini.com ([74.125.148.12]) with SMTP ID DSNKTk2JP51FlXBwzJh5Vl/JeSWV7jkTdVtP@postini.com; Thu, 18 Aug 2011 14:50:56 PDT Received: by yie13 with SMTP id 13so3832023yie.25 for ; Thu, 18 Aug 2011 14:50:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nanometrics.ca; s=google; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :in-reply-to:references; bh=dOYey5KjAvCbsDg8GWDNuI0ay6/fLxpgDhk80e17vsg=; b=mFqd4+03t8K4DdvJMymO65CgeLus7k1nHeA7+B4aNfvBpfiSqXHFW5o3IlMcEbLZvm QA3JxWjcZxG6AB4xPzqPf/KTZTimQ4b8d/mSPrptSo7FkJZrcXztztkJNiUYYOnXuTmm KYNgVcWlktWRkQfIph+jQ/WFbwht4TIqiUL/0= Received: by 10.236.75.161 with SMTP id z21mr1666791yhd.29.1313704255326; Thu, 18 Aug 2011 14:50:55 -0700 (PDT) Received: from localhost.localdomain ([206.191.47.130]) by mx.google.com with ESMTPS id s62sm2485298yhn.19.2011.08.18.14.50.54 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 18 Aug 2011 14:50:54 -0700 (PDT) From: Ben Gardiner To: Sekhar Nori , davinci-linux-open-source@linux.davincidsp.com Subject: [PATCH 1/5] ARM: davinci: da850, omapl138: introduce shared da850 reference components Date: Thu, 18 Aug 2011 17:50:47 -0400 Message-Id: <6650d6c73c2f5a8c4825c91cd8940fe88e46ba03.1313702401.git.bengardiner@nanometrics.ca> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: References: In-Reply-To: References: X-pstn-neptune: 0/0/0.00/0 X-pstn-levels: (S:99.90000/99.90000 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 ) X-pstn-settings: 2 (0.5000:0.0750) s cv GT3 gt2 gt1 r p m c X-pstn-addresses: from [35/1] Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: davinci-linux-open-source-bounces@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com X-Greylist: Sender succeeded STARTTLS authentication, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 18 Aug 2011 21:56:56 +0000 (UTC) Several of the pieces of the da850 evm reference design board support in board-da850-evm.c are re-used by the other da850/omapl138 boards. Examples are boot_params, map_io, preferred-serial-console, davinci_uart_config's enabled_uarts to name a few. Introduce an object file to contain these shared pieces for re-use by the other da850/omapl138 boards. Kick it off with sharing the machine map_io which before this change was repeated in each of board-da850-evm.c, board-mityomapl138.c and board-omapl138-hawk.c. Since these machines are all included in the da8xx_omapl_defconfig, there is benefit to sharing a definition here. Signed-off-by: Ben Gardiner Reviewed-by: James Nuss --- arch/arm/mach-davinci/Makefile | 3 ++- arch/arm/mach-davinci/board-da850-evm.c | 8 ++------ arch/arm/mach-davinci/board-mityomapl138.c | 8 ++------ arch/arm/mach-davinci/board-omapl138-hawk.c | 8 ++------ arch/arm/mach-davinci/da850-reference.c | 15 +++++++++++++++ .../mach-davinci/include/mach/da850-reference.h | 14 ++++++++++++++ 6 files changed, 37 insertions(+), 19 deletions(-) create mode 100644 arch/arm/mach-davinci/da850-reference.c create mode 100644 arch/arm/mach-davinci/include/mach/da850-reference.h diff --git a/arch/arm/mach-davinci/Makefile b/arch/arm/mach-davinci/Makefile index 0b87a1c..9a01441 100644 --- a/arch/arm/mach-davinci/Makefile +++ b/arch/arm/mach-davinci/Makefile @@ -15,7 +15,8 @@ obj-$(CONFIG_ARCH_DAVINCI_DM355) += dm355.o devices.o obj-$(CONFIG_ARCH_DAVINCI_DM646x) += dm646x.o devices.o obj-$(CONFIG_ARCH_DAVINCI_DM365) += dm365.o devices.o obj-$(CONFIG_ARCH_DAVINCI_DA830) += da830.o devices-da8xx.o -obj-$(CONFIG_ARCH_DAVINCI_DA850) += da850.o devices-da8xx.o +obj-$(CONFIG_ARCH_DAVINCI_DA850) += da850.o devices-da8xx.o\ + da850-reference.o obj-$(CONFIG_ARCH_DAVINCI_TNETV107X) += tnetv107x.o devices-tnetv107x.o obj-$(CONFIG_ARCH_DAVINCI_TNETV107X) += gpio-tnetv107x.o diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 3d2c0d7..3ee12f3 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -37,6 +37,7 @@ #include #include +#include #include #include #include @@ -1257,14 +1258,9 @@ static int __init da850_evm_console_init(void) console_initcall(da850_evm_console_init); #endif -static void __init da850_evm_map_io(void) -{ - da850_init(); -} - MACHINE_START(DAVINCI_DA850_EVM, "DaVinci DA850/OMAP-L138/AM18x EVM") .boot_params = (DA8XX_DDR_BASE + 0x100), - .map_io = da850_evm_map_io, + .map_io = da850_reference_map_io, .init_irq = cp_intc_init, .timer = &davinci_timer, .init_machine = da850_evm_init, diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c index 606a6f2..c256858 100644 --- a/arch/arm/mach-davinci/board-mityomapl138.c +++ b/arch/arm/mach-davinci/board-mityomapl138.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -559,14 +560,9 @@ static int __init mityomapl138_console_init(void) console_initcall(mityomapl138_console_init); #endif -static void __init mityomapl138_map_io(void) -{ - da850_init(); -} - MACHINE_START(MITYOMAPL138, "MityDSP-L138/MityARM-1808") .boot_params = (DA8XX_DDR_BASE + 0x100), - .map_io = mityomapl138_map_io, + .map_io = da850_reference_map_io, .init_irq = cp_intc_init, .timer = &davinci_timer, .init_machine = mityomapl138_init, diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c index 67c38d0..5d556cf 100644 --- a/arch/arm/mach-davinci/board-omapl138-hawk.c +++ b/arch/arm/mach-davinci/board-omapl138-hawk.c @@ -19,6 +19,7 @@ #include #include +#include #include #define HAWKBOARD_PHY_ID "0:07" @@ -332,14 +333,9 @@ static int __init omapl138_hawk_console_init(void) console_initcall(omapl138_hawk_console_init); #endif -static void __init omapl138_hawk_map_io(void) -{ - da850_init(); -} - MACHINE_START(OMAPL138_HAWKBOARD, "AM18x/OMAP-L138 Hawkboard") .boot_params = (DA8XX_DDR_BASE + 0x100), - .map_io = omapl138_hawk_map_io, + .map_io = da850_reference_map_io, .init_irq = cp_intc_init, .timer = &davinci_timer, .init_machine = omapl138_hawk_init, diff --git a/arch/arm/mach-davinci/da850-reference.c b/arch/arm/mach-davinci/da850-reference.c new file mode 100644 index 0000000..67b327b --- /dev/null +++ b/arch/arm/mach-davinci/da850-reference.c @@ -0,0 +1,15 @@ +/* + * TI DA850/OMAP-L138 reusable elements of the da850 reference design. + * + * Copyright (C) 2011 Nanometrics Inc. This file is licensed under + * the terms of the GNU General Public License version 2. This program + * is licensed "as is" without any warranty of any kind, whether express + * or implied. + */ + +#include + +void __init da850_reference_map_io(void) +{ + da850_init(); +} diff --git a/arch/arm/mach-davinci/include/mach/da850-reference.h b/arch/arm/mach-davinci/include/mach/da850-reference.h new file mode 100644 index 0000000..d3beb13 --- /dev/null +++ b/arch/arm/mach-davinci/include/mach/da850-reference.h @@ -0,0 +1,14 @@ +/* Defines for the reusable elements of the da850 reference design. + * + * Copyright 2011 (c) Nanometrics Inc. This file is licensed under + * the terms of the GNU General Public License version 2. This program + * is licensed "as is" without any warranty of any kind, whether express + * or implied. + */ + +#ifndef __ASM_ARCH_DAVINCI_DA850_REFERENCE_H +#define __ASM_ARCH_DAVINCI_DA850_REFERENCE_H + +void __init da850_reference_map_io(void); + +#endif /* __ASM_ARCH_DAVINCI_DA850_REFERENCE_H */