From: Tony Lindgren <tony@atomide.com>
To: linux-omap@vger.kernel.org
Cc: Tony Lindgren <tony@atomide.com>
Subject: [PATCH 9/14] ARM: OMAP: Remove omap_sram_patch_va
Date: Tue, 27 May 2008 21:20:13 -0700 [thread overview]
Message-ID: <1211948418-16455-10-git-send-email-tony@atomide.com> (raw)
In-Reply-To: <1211948418-16455-9-git-send-email-tony@atomide.com>
This is no longer needed as the 24xx *.S files have been split
into 242x and 243x specific files.
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/plat-omap/Kconfig | 10 ------
arch/arm/plat-omap/sram.c | 60 --------------------------------------
include/asm-arm/arch-omap/sram.h | 3 --
include/linux/poison.h | 6 ----
4 files changed, 0 insertions(+), 79 deletions(-)
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index ba858a8..b085b07 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -32,16 +32,6 @@ config OMAP_DEBUG_LEDS
depends on OMAP_DEBUG_DEVICES
default y if LEDS || LEDS_OMAP_DEBUG
-config OMAP_DEBUG_SRAM_PATCH
- bool "Extra sanity checking for SRAM patch code"
- depends on ARCH_OMAP
- default y
- help
- Say Y here if you want the kernel to use extra caution
- in patching SRAM virtual addresses. If you are
- confident in your SRAM code, disabling this will save
- about 600 bytes.
-
config OMAP_DEBUG_POWERDOMAIN
bool "Emit debug messages from powerdomain layer"
depends on ARCH_OMAP2 || ARCH_OMAP3
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index 388ecfc..554ee58 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -241,66 +241,6 @@ void * omap_sram_push(void * start, unsigned long size)
return (void *)omap_sram_ceil;
}
-/**
- * omap_sram_patch_va - patch a virtual address into SRAM code
- * @srcfn: original start address (in DRAM) of function to patch
- * @srcd: original address (in DRAM) of location to patch
- * @sramfn: start address (in SRAM) of function to patch
- * @d: virtual address to insert
- *
- * Replace a location in SRAM containing a magic number
- * (SRAM_VA_MAGIC) with a caller-specified virtual address. Used to
- * dynamically patch SRAM code at runtime for multiboot, since some
- * register addresses change depending on the OMAP chip in use.
- * Returns 1 upon success, 0 upon failure.
- */
-int omap_sram_patch_va(void *srcfn, void *srcd, void *sramfn, void __iomem *d)
-{
- unsigned long sram_addr;
- long offs;
-
- offs = (unsigned long)srcd - (unsigned long)srcfn;
- sram_addr = (unsigned long)sramfn + offs;
-
-#ifdef CONFIG_OMAP_DEBUG_SRAM_PATCH
- if (offs < 0) {
- printk(KERN_ERR "sram: patch address 0x%0lx < function start "
- "address 0x%0lx\n", (unsigned long)srcd,
- (unsigned long)srcfn);
- WARN_ON(1);
- return 0;
- }
-
- /*
- * REVISIT: We should probably pass in the function's size also,
- * so we can verify that the address to patch exists within
- * the function
- */
- if (sram_addr > omap_sram_base + omap_sram_size ||
- sram_addr < omap_sram_base + SRAM_BOOTLOADER_SZ) {
- printk(KERN_ERR "sram: invalid patch address 0x%0lx\n",
- sram_addr);
- WARN_ON(1);
- return 0;
- }
-
- if (*(typeof(SRAM_VA_MAGIC) *)sram_addr != SRAM_VA_MAGIC) {
- printk(KERN_ERR "sram: will not patch address 0x%0lx: "
- "no magic\n", sram_addr);
- WARN_ON(1);
- return 0;
- }
-#endif /* CONFIG_OMAP_DEBUG_SRAM_PATCH */
-
- pr_debug("sram: patching 0x%0lx with 0x%0lx\n", sram_addr,
- (unsigned long)d);
-
- *(unsigned long *)sram_addr = (unsigned long)d;
-
- return 1;
-}
-
-
static void omap_sram_error(void)
{
panic("Uninitialized SRAM function\n");
diff --git a/include/asm-arm/arch-omap/sram.h b/include/asm-arm/arch-omap/sram.h
index 866b864..6c577f7 100644
--- a/include/asm-arm/arch-omap/sram.h
+++ b/include/asm-arm/arch-omap/sram.h
@@ -11,11 +11,8 @@
#ifndef __ARCH_ARM_OMAP_SRAM_H
#define __ARCH_ARM_OMAP_SRAM_H
-#include <linux/poison.h> /* for SRAM_VA_MAGIC */
-
extern int __init omap_sram_init(void);
extern void * omap_sram_push(void * start, unsigned long size);
-extern int omap_sram_patch_va(void *srcfn, void *srcd, void *sramfn, void __iomem *d);
extern void omap_sram_reprogram_clock(u32 dpllctl, u32 ckctl);
extern void omap2_sram_ddr_init(u32 *slow_dll_ctrl, u32 fast_dll_ctrl,
diff --git a/include/linux/poison.h b/include/linux/poison.h
index 03620da..9f31683 100644
--- a/include/linux/poison.h
+++ b/include/linux/poison.h
@@ -68,10 +68,4 @@
/********** sound/oss/ **********/
#define OSS_POISON_FREE 0xAB
-/*
- * Used in arch/arm/plat-omap/sram.h to mark SRAM addresses that
- * will be patched at runtime
- */
-#define SRAM_VA_MAGIC 0xbadfeed1
-
#endif
--
1.5.3.6
next prev parent reply other threads:[~2008-05-28 4:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-28 4:20 [PATCH 0/14] Big clean-up for multi-omap Tony Lindgren
2008-05-28 4:20 ` [PATCH 1/14] ARM: OMAP: Fix debug-macro for multi_omap Tony Lindgren
2008-05-28 4:20 ` [PATCH 2/14] CF: Change omap_cf.c to use omap_readw/writew instead of __REG for multi-omap Tony Lindgren
2008-05-28 4:20 ` [PATCH 3/14] USB: Change omap USB code to use omap_read/write " Tony Lindgren
2008-05-28 4:20 ` [PATCH 4/14] ARM: OMAP: Change __REG access to omap/read write for traffic controller Tony Lindgren
2008-05-28 4:20 ` [PATCH 5/14] musb_hdrc: Change __REG access to omap_read/write for multi-boot Tony Lindgren
2008-05-28 4:20 ` [PATCH 6/14] ARM: OMAP: Remove __REG access for multi-omap Tony Lindgren
2008-05-28 4:20 ` [PATCH 7/14] ARM: OMAP: Split sleep24xx.S into sleep242x.S and sleep243x.S Tony Lindgren
2008-05-28 4:20 ` [PATCH 8/14] ARM: OMAP: Split sram24xx.S into sram242x.S and sram243x.S Tony Lindgren
2008-05-28 4:20 ` Tony Lindgren [this message]
2008-05-28 4:20 ` [PATCH 10/14] ARM: OMAP: Introduce omap_globals and prcm access functions for multi-omap Tony Lindgren
2008-05-28 4:20 ` [PATCH 11/14] ARM: OMAP: Remove OMAP_PRM_REGADDR Tony Lindgren
2008-05-28 4:20 ` [PATCH 12/14] ARM: OMAP: Remove OMAP_CM_REGADDR for multi-boot Tony Lindgren
2008-05-28 4:20 ` [PATCH 13/14] ARM: OMAP: Change to use CM offsets for clocks for multi-omap Tony Lindgren
2008-05-28 4:20 ` [PATCH 14/14] ARM: OMAP: Use omap_globals for CPU detection " Tony Lindgren
2008-05-30 21:41 ` [PATCH 0/14] Big clean-up " Tony Lindgren
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=1211948418-16455-10-git-send-email-tony@atomide.com \
--to=tony@atomide.com \
--cc=linux-omap@vger.kernel.org \
/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