]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: Remove omap_sram_patch_va
authorTony Lindgren <tony@atomide.com>
Fri, 30 May 2008 21:12:55 +0000 (14:12 -0700)
committerTony Lindgren <tony@atomide.com>
Fri, 30 May 2008 21:26:57 +0000 (14:26 -0700)
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
arch/arm/plat-omap/sram.c
include/asm-arm/arch-omap/sram.h
include/linux/poison.h

index ba858a8d60e46dc51a7ef30373f932e1b780e6c5..b085b0731c62737214c4c202534e0606c8471a7b 100644 (file)
@@ -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
index 388ecfc7217a25b89ad873ee21917ed55f1ddb7b..554ee58e12948d2a2b5592c598b3096ceae69b1a 100644 (file)
@@ -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");
index 866b86417ea16d5c2b2c9d88ffe2810cf88a98ff..6c577f7fa5bd7252b4a98922b84b6109ae0e9e3e 100644 (file)
 #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,
index 03620dacba2d9d306ecc2ee576c8f28e36674434..9f31683728fd7e2c59f738ae35ab6835066270c1 100644 (file)
 /********** 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