linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: R Sricharan <r.sricharan@ti.com>
To: linux-omap@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org, santosh.shilimkar@ti.com,
	tony@atomide.com, b-cousson@ti.com, r.sricharan@ti.com,
	paul@pswan.com
Subject: [PATCH 3/4] ARM: OMAP2+: Move stubbed secure_sram_reserve function to a common.c and call it __weak
Date: Thu, 10 May 2012 22:36:54 +0530	[thread overview]
Message-ID: <1336669615-16454-4-git-send-email-r.sricharan@ti.com> (raw)
In-Reply-To: <1336669615-16454-1-git-send-email-r.sricharan@ti.com>

omap_secure_ram_reserve_memblock is stubbed for OMAP1,2 only builds using a
 ifdef check. But this results in adding CONFIG_ARCH_OMAPxx checks for
future socs that use the real function. So move this to common.c file and
call it __weak.

Signed-off-by: R Sricharan <r.sricharan@ti.com>
---
 arch/arm/plat-omap/common.c                   |    9 +++++++++
 arch/arm/plat-omap/include/plat/omap-secure.h |    5 -----
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
index 0a9b9a9..89a3723 100644
--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -77,3 +77,12 @@ void __init omap_init_consistent_dma_size(void)
 	init_consistent_dma_size(CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE << 20);
 #endif
 }
+
+/*
+ * Stub function for OMAP2 so that common files
+ * continue to build when custom builds are used
+ */
+int __weak omap_secure_ram_reserve_memblock(void)
+{
+	return 0;
+}
diff --git a/arch/arm/plat-omap/include/plat/omap-secure.h b/arch/arm/plat-omap/include/plat/omap-secure.h
index 8c7994c..0e4acd2 100644
--- a/arch/arm/plat-omap/include/plat/omap-secure.h
+++ b/arch/arm/plat-omap/include/plat/omap-secure.h
@@ -3,12 +3,7 @@
 
 #include <linux/types.h>
 
-#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
 extern int omap_secure_ram_reserve_memblock(void);
-#else
-static inline void omap_secure_ram_reserve_memblock(void)
-{ }
-#endif
 
 #ifdef CONFIG_OMAP4_ERRATA_I688
 extern int omap_barrier_reserve_memblock(void);
-- 
1.7.1


  parent reply	other threads:[~2012-05-10 17:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-10 17:06 [PATCH 0/4] ARM: OMAP2+: Misc cleanup part2 R Sricharan
2012-05-10 17:06 ` [PATCH 1/4] ARM: OMAP2+: Introduce CONFIG_SOC_HAS_OMAP_DPLL macro R Sricharan
2012-05-10 18:26   ` Hiremath, Vaibhav
2012-05-11  6:16     ` R, Sricharan
2012-05-11  6:22       ` Hiremath, Vaibhav
2012-05-11  6:23         ` R, Sricharan
2012-05-10 17:06 ` [PATCH 2/4] ARM: OMAP2+: Move the stubbed prm and cm functions to prcm.c file and make them __weak R Sricharan
2012-05-10 17:41   ` Paul Walmsley
2012-05-10 17:44     ` Sricharan R
2012-06-14 11:56     ` R, Sricharan
2012-06-28 11:58       ` R, Sricharan
2012-07-04 15:19         ` Paul Walmsley
2012-07-04 15:25           ` R, Sricharan
2012-05-10 17:06 ` R Sricharan [this message]
2012-05-10 17:06 ` [PATCH 4/4] ARM: OMAP: counter-32k: Select the CR register offset using the IP scheme R Sricharan
2012-05-10 17:17 ` [PATCH 0/4] ARM: OMAP2+: Misc cleanup part2 Sricharan R

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=1336669615-16454-4-git-send-email-r.sricharan@ti.com \
    --to=r.sricharan@ti.com \
    --cc=b-cousson@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pswan.com \
    --cc=santosh.shilimkar@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).