From patchwork Thu Aug 18 21:50:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Gardiner X-Patchwork-Id: 1078072 Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7ILr4TC017352 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 18 Aug 2011 21:53:25 GMT Received: from dlep33.itg.ti.com ([157.170.170.112]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id p7ILpxPP001150 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Aug 2011 16:51:59 -0500 Received: from linux.omap.com (smtp-le.itg.ti.com [157.170.170.27]) by dlep33.itg.ti.com (8.13.7/8.13.8) with ESMTP id p7ILpwYe012285; Thu, 18 Aug 2011 16:51:58 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 7832980639; Thu, 18 Aug 2011 16:51:51 -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 676A480631 for ; Thu, 18 Aug 2011 16:50:59 -0500 (CDT) Received: from neches.ext.ti.com (neches.ext.ti.com [192.91.81.29]) by dflp51.itg.ti.com (8.13.7/8.13.8) with ESMTP id p7ILoxc0004301 for ; Thu, 18 Aug 2011 16:50:59 -0500 (CDT) Received: from psmtp.com (na3sys009amx213.postini.com [74.125.149.53]) by neches.ext.ti.com (8.13.7/8.13.7) with SMTP id p7ILow5P021236 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 18 Aug 2011 16:50:58 -0500 Received: from na3sys009aog115.obsmtp.com ([74.125.149.238]) (using TLSv1) by na3sys009amx213.postini.com ([74.125.148.10]) with SMTP; Thu, 18 Aug 2011 21:50:58 GMT Received: from mail-gw0-f46.google.com ([74.125.83.46]) (using TLSv1) by na3sys009aob115.postini.com ([74.125.148.12]) with SMTP ID DSNKTk2JQsXVY2Ms567Sc+eIYrBBZWKKGG1S@postini.com; Thu, 18 Aug 2011 14:50:58 PDT Received: by mail-gw0-f46.google.com with SMTP id a12so1250913gwa.19 for ; Thu, 18 Aug 2011 14:50:57 -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=a+cGhZY4NtV+kOtyisNZDE+yTFw4/87qEs+PjUwyH3w=; b=TFKLagtb2Qw+M4SzP4K7p1ajzVMDvuE4G76NSyOIhMssWHiCXcfiJYdXft7mPrv7U6 tEPbcZc0InOxNKWJxDPs+ZVNe9UyheEItmO8/w4T5pihOhkhPanVQSu/mxKGJzYwlncB 2CrYy+YLAV6jGKAIMn4yJVtIyFMeINOFpO2TI= Received: by 10.236.189.65 with SMTP id b41mr1557206yhn.64.1313704257762; Thu, 18 Aug 2011 14:50:57 -0700 (PDT) Received: from localhost.localdomain ([206.191.47.130]) by mx.google.com with ESMTPS id s62sm2485298yhn.19.2011.08.18.14.50.56 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 18 Aug 2011 14:50:57 -0700 (PDT) From: Ben Gardiner To: Sekhar Nori , davinci-linux-open-source@linux.davincidsp.com Subject: [PATCH 3/5] ARM: davinci: da850, omapl138: share the preferred console registration Date: Thu, 18 Aug 2011 17:50:49 -0400 Message-Id: <3e3d2dfabd7a2cbf9650986a83bd238ec927d1ad.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:81.84223/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:53:25 +0000 (UTC) Extract the common add_preferred_console("ttyS", 2, "115200") found both of the da850evm and hawk boards into a shared function in the da850-reference object introduced in a previous commit. Signed-off-by: Ben Gardiner Reviewed-by: James Nuss --- arch/arm/mach-davinci/board-da850-evm.c | 2 +- arch/arm/mach-davinci/board-omapl138-hawk.c | 2 +- arch/arm/mach-davinci/da850-reference.c | 7 +++++++ .../mach-davinci/include/mach/da850-reference.h | 1 + 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index f707bb2..109b016 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -1253,7 +1253,7 @@ static int __init da850_evm_console_init(void) if (!machine_is_davinci_da850_evm()) return 0; - return add_preferred_console("ttyS", 2, "115200"); + return da850_reference_add_preferred_console(); } console_initcall(da850_evm_console_init); #endif diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c index cfad483..73d826d 100644 --- a/arch/arm/mach-davinci/board-omapl138-hawk.c +++ b/arch/arm/mach-davinci/board-omapl138-hawk.c @@ -328,7 +328,7 @@ static int __init omapl138_hawk_console_init(void) if (!machine_is_omapl138_hawkboard()) return 0; - return add_preferred_console("ttyS", 2, "115200"); + return da850_reference_add_preferred_console(); } console_initcall(omapl138_hawk_console_init); #endif diff --git a/arch/arm/mach-davinci/da850-reference.c b/arch/arm/mach-davinci/da850-reference.c index 67b327b..25df6476 100644 --- a/arch/arm/mach-davinci/da850-reference.c +++ b/arch/arm/mach-davinci/da850-reference.c @@ -7,9 +7,16 @@ * or implied. */ +#include + #include void __init da850_reference_map_io(void) { da850_init(); } + +int da850_reference_add_preferred_console(void) +{ + return add_preferred_console("ttyS", 2, "115200"); +} diff --git a/arch/arm/mach-davinci/include/mach/da850-reference.h b/arch/arm/mach-davinci/include/mach/da850-reference.h index 6837a98..ed72c53 100644 --- a/arch/arm/mach-davinci/include/mach/da850-reference.h +++ b/arch/arm/mach-davinci/include/mach/da850-reference.h @@ -14,5 +14,6 @@ #define DA850_REFERENCE_BOOT_PARAMS (DA8XX_DDR_BASE + 0x100) void __init da850_reference_map_io(void); +int da850_reference_add_preferred_console(void); #endif /* __ASM_ARCH_DAVINCI_DA850_REFERENCE_H */