All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lokesh Vutla <lokeshvutla@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 01/10] ARM: DRA7: Make do_set_mux32() generic
Date: Thu, 4 Jun 2015 16:42:33 +0530	[thread overview]
Message-ID: <1433416362-7708-2-git-send-email-lokeshvutla@ti.com> (raw)
In-Reply-To: <1433416362-7708-1-git-send-email-lokeshvutla@ti.com>

do_set_mux32() is redefined in dra7xx and beagle_x15 boards.
IO delay recalibration sequence also needs this.
Making it generic to avoid duplication.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/cpu/armv7/omap5/hwinit.c           |  9 +++++++++
 arch/arm/include/asm/arch-omap5/sys_proto.h |  1 +
 board/ti/beagle_x15/board.c                 | 10 ----------
 board/ti/dra7xx/evm.c                       | 10 ----------
 4 files changed, 10 insertions(+), 20 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap5/hwinit.c b/arch/arm/cpu/armv7/omap5/hwinit.c
index 8d6b59e..786d6d0 100644
--- a/arch/arm/cpu/armv7/omap5/hwinit.c
+++ b/arch/arm/cpu/armv7/omap5/hwinit.c
@@ -40,6 +40,15 @@ static struct gpio_bank gpio_bank_54xx[8] = {
 
 const struct gpio_bank *const omap_gpio_bank = gpio_bank_54xx;
 
+void do_set_mux32(u32 base, struct pad_conf_entry const *array, int size)
+{
+	int i;
+	struct pad_conf_entry *pad = (struct pad_conf_entry *)array;
+
+	for (i = 0; i < size; i++, pad++)
+		writel(pad->val, base + pad->offset);
+}
+
 #ifdef CONFIG_SPL_BUILD
 /* LPDDR2 specific IO settings */
 static void io_settings_lpddr2(void)
diff --git a/arch/arm/include/asm/arch-omap5/sys_proto.h b/arch/arm/include/asm/arch-omap5/sys_proto.h
index ea84665..b41bf15 100644
--- a/arch/arm/include/asm/arch-omap5/sys_proto.h
+++ b/arch/arm/include/asm/arch-omap5/sys_proto.h
@@ -32,6 +32,7 @@ void gpmc_init(void);
 void watchdog_init(void);
 u32 get_device_type(void);
 void do_set_mux(u32 base, struct pad_conf_entry const *array, int size);
+void do_set_mux32(u32 base, struct pad_conf_entry const *array, int size);
 void set_muxconf_regs_essential(void);
 u32 wait_on_value(u32, u32, void *, u32);
 void sdelay(unsigned long);
diff --git a/board/ti/beagle_x15/board.c b/board/ti/beagle_x15/board.c
index ffcd531..39e1527 100644
--- a/board/ti/beagle_x15/board.c
+++ b/board/ti/beagle_x15/board.c
@@ -240,16 +240,6 @@ int board_late_init(void)
 	return 0;
 }
 
-static void do_set_mux32(u32 base,
-			 struct pad_conf_entry const *array, int size)
-{
-	int i;
-	struct pad_conf_entry *pad = (struct pad_conf_entry *)array;
-
-	for (i = 0; i < size; i++, pad++)
-		writel(pad->val, base + pad->offset);
-}
-
 void set_muxconf_regs_essential(void)
 {
 	do_set_mux32((*ctrl)->control_padconf_core_base,
diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
index d464855..1b05150 100644
--- a/board/ti/dra7xx/evm.c
+++ b/board/ti/dra7xx/evm.c
@@ -107,16 +107,6 @@ int board_late_init(void)
 	return 0;
 }
 
-static void do_set_mux32(u32 base,
-			 struct pad_conf_entry const *array, int size)
-{
-	int i;
-	struct pad_conf_entry *pad = (struct pad_conf_entry *)array;
-
-	for (i = 0; i < size; i++, pad++)
-		writel(pad->val, base + pad->offset);
-}
-
 void set_muxconf_regs_essential(void)
 {
 	do_set_mux32((*ctrl)->control_padconf_core_base,
-- 
1.9.1

  reply	other threads:[~2015-06-04 11:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-04 11:12 [U-Boot] [PATCH 00/10] ARM: DRA7: Add support for IOdelay module Lokesh Vutla
2015-06-04 11:12 ` Lokesh Vutla [this message]
2015-06-13  2:08   ` [U-Boot] [U-Boot,01/10] ARM: DRA7: Make do_set_mux32() generic Tom Rini
2015-06-04 11:12 ` [U-Boot] [PATCH 02/10] ARM: DRA7: Add pinctrl register definitions Lokesh Vutla
2015-06-13  2:08   ` [U-Boot] [U-Boot, " Tom Rini
2015-06-04 11:12 ` [U-Boot] [PATCH 03/10] ARM: DRA7: Add support for virtual mode configuration Lokesh Vutla
2015-06-13  2:08   ` [U-Boot] [U-Boot, " Tom Rini
2015-06-04 11:12 ` [U-Boot] [PATCH 04/10] ARM: DRA7: Add support for IO delay configuration Lokesh Vutla
2015-06-13  2:08   ` [U-Boot] [U-Boot, " Tom Rini
2015-06-04 11:12 ` [U-Boot] [PATCH 05/10] ARM: DRA7: Add support for manual mode configuration Lokesh Vutla
2015-06-13  2:09   ` [U-Boot] [U-Boot, " Tom Rini
2015-06-04 11:12 ` [U-Boot] [PATCH 06/10] ARM: DRA7-evm: Enable IO delay recalibration sequence Lokesh Vutla
2015-06-13  2:09   ` [U-Boot] [U-Boot, " Tom Rini
2015-06-04 11:12 ` [U-Boot] [PATCH 07/10] ARM: DRA7-evm: Add mux data Lokesh Vutla
2015-06-13  2:09   ` [U-Boot] [U-Boot,07/10] " Tom Rini
2015-06-04 11:12 ` [U-Boot] [PATCH 08/10] ARM: DRA7: CPSW: Remove IO delay hack Lokesh Vutla
2015-06-13  2:09   ` [U-Boot] [U-Boot,08/10] " Tom Rini
2015-06-04 11:12 ` [U-Boot] [PATCH 09/10] ARM: BeagleBoard-x15: Enable IO delay recalibration sequence Lokesh Vutla
2015-06-13  2:09   ` [U-Boot] [U-Boot, " Tom Rini
2015-06-04 11:12 ` [U-Boot] [PATCH 10/10] ARM: BeagleBoard-x15: Add mux data Lokesh Vutla
2015-06-13  2:09   ` [U-Boot] [U-Boot,10/10] " Tom Rini

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=1433416362-7708-2-git-send-email-lokeshvutla@ti.com \
    --to=lokeshvutla@ti.com \
    --cc=u-boot@lists.denx.de \
    /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.