All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Gardiner <bengardiner@nanometrics.ca>
To: Sekhar Nori <nsekhar@ti.com>,
	davinci-linux-open-source@linux.davincidsp.com
Cc: James Nuss <jamesnuss@nanometrics.ca>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 3/5] ARM: davinci: da850, omapl138: share the preferred console registration
Date: Thu, 18 Aug 2011 17:50:49 -0400	[thread overview]
Message-ID: <3e3d2dfabd7a2cbf9650986a83bd238ec927d1ad.1313702401.git.bengardiner@nanometrics.ca> (raw)
In-Reply-To: <cover.1313702401.git.bengardiner@nanometrics.ca>
In-Reply-To: <cover.1313702401.git.bengardiner@nanometrics.ca>

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 <bengardiner@nanometrics.ca>
Reviewed-by: James Nuss <jamesnuss@nanometrics.ca>
---
 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 <linux/console.h>
+
 #include <mach/da8xx.h>
 
 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 */
-- 
1.7.4.1


WARNING: multiple messages have this Message-ID (diff)
From: bengardiner@nanometrics.ca (Ben Gardiner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/5] ARM: davinci: da850, omapl138: share the preferred console registration
Date: Thu, 18 Aug 2011 17:50:49 -0400	[thread overview]
Message-ID: <3e3d2dfabd7a2cbf9650986a83bd238ec927d1ad.1313702401.git.bengardiner@nanometrics.ca> (raw)
In-Reply-To: <cover.1313702401.git.bengardiner@nanometrics.ca>

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 <bengardiner@nanometrics.ca>
Reviewed-by: James Nuss <jamesnuss@nanometrics.ca>
---
 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 <linux/console.h>
+
 #include <mach/da8xx.h>
 
 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 */
-- 
1.7.4.1

  parent reply	other threads:[~2011-08-18 21:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-18 21:50 [PATCH 0/5] ARM: davinci: introduce new board heliosv1 Ben Gardiner
2011-08-18 21:50 ` Ben Gardiner
2011-08-18 21:50 ` [PATCH 1/5] ARM: davinci: da850, omapl138: introduce shared da850 reference components Ben Gardiner
2011-08-18 21:50   ` Ben Gardiner
2011-08-18 21:55   ` Felipe Balbi
2011-08-18 21:55     ` Felipe Balbi
2011-08-18 21:50 ` [PATCH 2/5] ARM: davinci: da850, omapl138: share boot_params Ben Gardiner
2011-08-18 21:50   ` Ben Gardiner
2011-08-18 21:56   ` Felipe Balbi
2011-08-18 21:56     ` Felipe Balbi
2011-08-18 21:50 ` Ben Gardiner [this message]
2011-08-18 21:50   ` [PATCH 3/5] ARM: davinci: da850, omapl138: share the preferred console registration Ben Gardiner
2011-08-18 21:50 ` [PATCH 4/5] ARM: davinci: da850, omapl138: share the davinci_uart_config Ben Gardiner
2011-08-18 21:50   ` Ben Gardiner
2011-08-18 21:57   ` Felipe Balbi
2011-08-18 21:57     ` Felipe Balbi
2011-08-18 21:50 ` [PATCH 5/5] ARM: davinci: da850, omapl138: introduce new board-omapl138-heliosv1 Ben Gardiner
2011-08-18 21:50   ` Ben Gardiner
2011-08-18 22:02   ` Felipe Balbi
2011-08-18 22:02     ` Felipe Balbi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3e3d2dfabd7a2cbf9650986a83bd238ec927d1ad.1313702401.git.bengardiner@nanometrics.ca \
    --to=bengardiner@nanometrics.ca \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    --cc=jamesnuss@nanometrics.ca \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nsekhar@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.