linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rajendra Nayak <rnayak@ti.com>
To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: tony@atomide.com, paul@pwsan.com, khilman@linaro.org,
	benoit.cousson@gmail.com, r.sricharan@ti.com, ambresh@ti.com,
	sourav.poddar@ti.com, santosh.shilimkar@ti.com, nm@ti.com,
	balbi@ti.com, Rajendra Nayak <rnayak@ti.com>
Subject: [PATCH v3 2/9] ARM: DRA7: Reuse io tables and add a new .init_early
Date: Sun, 4 Aug 2013 21:57:30 +0530	[thread overview]
Message-ID: <1375633657-6835-3-git-send-email-rnayak@ti.com> (raw)
In-Reply-To: <1375633657-6835-1-git-send-email-rnayak@ti.com>

From: R Sricharan <r.sricharan@ti.com>

The IO descriptor tables for DRA7 are a complete reuse from OMAP5.
A new dra7xx_init_early() does the base address inits.

Signed-off-by: R Sricharan <r.sricharan@ti.com>
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
 arch/arm/mach-omap2/common.h   |    1 +
 arch/arm/mach-omap2/io.c       |   20 ++++++++++++++++++--
 arch/arm/mach-omap2/omap54xx.h |    4 ++++
 3 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index dfcc182..4a5684b 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -110,6 +110,7 @@ void omap3630_init_late(void);
 void am35xx_init_late(void);
 void ti81xx_init_late(void);
 int omap2_common_pm_late_init(void);
+void dra7xx_init_early(void);
 
 #ifdef CONFIG_SOC_BUS
 void omap_soc_device_init(void);
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 4a3f06f..3656b80 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -251,7 +251,7 @@ static struct map_desc omap44xx_io_desc[] __initdata = {
 };
 #endif
 
-#ifdef	CONFIG_SOC_OMAP5
+#if defined(CONFIG_SOC_OMAP5) || defined(CONFIG_SOC_DRA7XX)
 static struct map_desc omap54xx_io_desc[] __initdata = {
 	{
 		.virtual	= L3_54XX_VIRT,
@@ -333,7 +333,7 @@ void __init omap4_map_io(void)
 }
 #endif
 
-#ifdef CONFIG_SOC_OMAP5
+#if defined(CONFIG_SOC_OMAP5) ||  defined(CONFIG_SOC_DRA7XX)
 void __init omap5_map_io(void)
 {
 	iotable_init(omap54xx_io_desc, ARRAY_SIZE(omap54xx_io_desc));
@@ -653,6 +653,22 @@ void __init omap5_init_early(void)
 }
 #endif
 
+#ifdef CONFIG_SOC_DRA7XX
+void __init dra7xx_init_early(void)
+{
+	omap2_set_globals_tap(-1, OMAP2_L4_IO_ADDRESS(DRA7XX_TAP_BASE));
+	omap2_set_globals_control(OMAP2_L4_IO_ADDRESS(OMAP54XX_SCM_BASE),
+				  OMAP2_L4_IO_ADDRESS(DRA7XX_CTRL_BASE));
+	omap2_set_globals_prm(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRM_BASE));
+	omap2_set_globals_cm(OMAP2_L4_IO_ADDRESS(DRA7XX_CM_CORE_AON_BASE),
+			     OMAP2_L4_IO_ADDRESS(OMAP54XX_CM_CORE_BASE));
+	omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE));
+	omap_prm_base_init();
+	omap_cm_base_init();
+}
+#endif
+
+
 void __init omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
 				      struct omap_sdrc_params *sdrc_cs1)
 {
diff --git a/arch/arm/mach-omap2/omap54xx.h b/arch/arm/mach-omap2/omap54xx.h
index a086ba1..2d35c57 100644
--- a/arch/arm/mach-omap2/omap54xx.h
+++ b/arch/arm/mach-omap2/omap54xx.h
@@ -30,4 +30,8 @@
 #define OMAP54XX_CTRL_BASE		0x4a002800
 #define OMAP54XX_SAR_RAM_BASE		0x4ae26000
 
+#define DRA7XX_CM_CORE_AON_BASE		0x4a005000
+#define DRA7XX_CTRL_BASE		0x4a003400
+#define DRA7XX_TAP_BASE			0x4ae0c000
+
 #endif /* __ASM_SOC_OMAP555554XX_H */
-- 
1.7.9.5


  parent reply	other threads:[~2013-08-04 16:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-04 16:27 [PATCH v3 0/9] DRA7xx core support Rajendra Nayak
2013-08-04 16:27 ` [PATCH v3 1/9] ARM: DRA7: Reuse all of PRCM and MPUSS SMP infra Rajendra Nayak
2013-08-04 16:27 ` Rajendra Nayak [this message]
2013-08-04 16:27 ` [PATCH v3 3/9] ARM: DRA7: Resue the clocksource, clockevent support Rajendra Nayak
2013-08-04 16:27 ` [PATCH v3 4/9] ARM: DRA7: board-generic: Add basic DT support Rajendra Nayak
2013-08-04 16:27 ` [PATCH v3 5/9] ARM: DRA7: Kconfig: Make ARCH_NR_GPIO default to 512 Rajendra Nayak
2013-08-04 16:27 ` [PATCH v3 6/9] ARM: DRA7: dts: Add the dts files for dra7 SoC and dra7-evm board Rajendra Nayak
2013-08-04 16:27 ` [PATCH v3 7/9] ARM: DRA7: id: Add cpu detection support for DRA7xx based SoCs' Rajendra Nayak
2013-08-05 11:44   ` Grygorii Strashko
2013-08-06  8:11     ` Rajendra Nayak
2013-08-06 11:59       ` Grygorii Strashko
2013-08-04 16:27 ` [PATCH v3 8/9] ARM: DRA7: hwmod: Reuse the soc_ops used for OMAP4/5 Rajendra Nayak
2013-08-04 16:27 ` [PATCH v3 9/9] ARM: DRA7: Add the build support in omap2plus Rajendra Nayak
2013-08-12  6:40 ` [PATCH v3 0/9] DRA7xx core support Rajendra Nayak
2013-08-12  8:24   ` Tony Lindgren
2013-08-12  8:27     ` Rajendra Nayak

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=1375633657-6835-3-git-send-email-rnayak@ti.com \
    --to=rnayak@ti.com \
    --cc=ambresh@ti.com \
    --cc=balbi@ti.com \
    --cc=benoit.cousson@gmail.com \
    --cc=khilman@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=paul@pwsan.com \
    --cc=r.sricharan@ti.com \
    --cc=santosh.shilimkar@ti.com \
    --cc=sourav.poddar@ti.com \
    --cc=tony@atomide.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).