]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/commitdiff
ARM: OMAP: Split sram.h to local headers and minimal shared header
authorTony Lindgren <tony@atomide.com>
Mon, 29 Oct 2012 20:54:06 +0000 (13:54 -0700)
committerTony Lindgren <tony@atomide.com>
Wed, 31 Oct 2012 17:14:13 +0000 (10:14 -0700)
Most of the defines are specific to omap1 and omap2+,
and should be in the local headers. Only minimal function
prototypes need to be shared.

As discussed on linux-arm-kernel, we want to avoid
relative includes for the arch/arm/*omap* shared code:

http://www.spinics.net/lists/linux-omap/msg80520.html

So this patch re-adds a minimal plat/sram.h.

The new plat/sram.h must not be included from drivers,
that will break build for omap2+ CONFIG_MULTIPLATFORM.

Note that this patch temporarily adds two more
relative includes; Those will be removed in the
following patch.

Signed-off-by: Tony Lindgren <tony@atomide.com>
18 files changed:
arch/arm/mach-omap1/clock.c
arch/arm/mach-omap1/clock_data.c
arch/arm/mach-omap1/devices.c
arch/arm/mach-omap1/pm.c
arch/arm/mach-omap1/sram.h [new file with mode: 0644]
arch/arm/mach-omap2/clkt2xxx_dpllcore.c
arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c
arch/arm/mach-omap2/clkt34xx_dpll3m2.c
arch/arm/mach-omap2/io.c
arch/arm/mach-omap2/omap4-common.c
arch/arm/mach-omap2/pm24xx.c
arch/arm/mach-omap2/pm34xx.c
arch/arm/mach-omap2/sdrc.c
arch/arm/mach-omap2/sdrc2xxx.c
arch/arm/mach-omap2/sleep34xx.S
arch/arm/mach-omap2/sram.h [moved from arch/arm/plat-omap/sram.h with 79% similarity]
arch/arm/plat-omap/include/plat/sram.h [new file with mode: 0644]
arch/arm/plat-omap/sram.c

index 931f3f6d396b368aacf088431c1a0060c9b3b8ed..4f5fd4a084c06971e2faa21a255bae822a295043 100644 (file)
 
 #include <mach/hardware.h>
 
-#include "../plat-omap/sram.h"
-
 #include "soc.h"
 #include "iomap.h"
 #include "clock.h"
 #include "opp.h"
+#include "sram.h"
 
 __u32 arm_idlect1_mask;
 struct clk *api_ck_p, *ck_dpll1_p, *ck_ref_p;
index 28aea55a412e77e7e6818927b7cf3d05e9e6fce6..cb7c6ae2e3fc66f4a0744bf7930e7e1cd635ee87 100644 (file)
 #include <mach/hardware.h>
 #include <mach/usb.h>   /* for OTG_BASE */
 
-#include "../plat-omap/sram.h"
-
 #include "iomap.h"
 #include "clock.h"
+#include "sram.h"
 
 /* Some ARM_IDLECT1 bit shifts - used in struct arm_idlect1_clk */
 #define IDL_CLKOUT_ARM_SHIFT                   12
index 645668e2b1d5db50c13a7319aff2e17f4c7d59ff..7155ed8b97f8bce03dcc13b008a4f7526b928103 100644 (file)
 #include <mach/camera.h>
 #include <mach/hardware.h>
 
-#include "../plat-omap/sram.h"
-
 #include "common.h"
 #include "clock.h"
 #include "dma.h"
 #include "mmc.h"
+#include "sram.h"
 
 #if defined(CONFIG_SND_SOC) || defined(CONFIG_SND_SOC_MODULE)
 
index b2c2328d7c18bb0c912fc9ea780964a3605abd7f..66d663a6ef3a3b1eadfa1a34735fcecf4e872ee4 100644 (file)
@@ -44,6 +44,7 @@
 #include <linux/io.h>
 #include <linux/atomic.h>
 
+#include <asm/fncpy.h>
 #include <asm/system_misc.h>
 #include <asm/irq.h>
 #include <asm/mach/time.h>
 
 #include <mach/irqs.h>
 
-#include "../plat-omap/sram.h"
-
 #include "iomap.h"
 #include "clock.h"
 #include "pm.h"
+#include "sram.h"
 
 static unsigned int arm_sleep_save[ARM_SLEEP_SAVE_SIZE];
 static unsigned short dsp_sleep_save[DSP_SLEEP_SAVE_SIZE];
diff --git a/arch/arm/mach-omap1/sram.h b/arch/arm/mach-omap1/sram.h
new file mode 100644 (file)
index 0000000..d5a6c83
--- /dev/null
@@ -0,0 +1,7 @@
+#include <plat/sram.h>
+
+extern void omap_sram_reprogram_clock(u32 dpllctl, u32 ckctl);
+
+/* Do not use these */
+extern void omap1_sram_reprogram_clock(u32 ckctl, u32 dpllctl);
+extern unsigned long omap1_sram_reprogram_clock_sz;
index 3432f913f74326d03c3bf41ba91ebf1e18c6c8cd..0d2f14c2dcce4ccf09d4e5064d4c0bbb1c241543 100644 (file)
 #include <linux/clk.h>
 #include <linux/io.h>
 
-#include "../plat-omap/sram.h"
-
 #include "clock.h"
 #include "clock2xxx.h"
 #include "opp2xxx.h"
 #include "cm2xxx_3xxx.h"
 #include "cm-regbits-24xx.h"
 #include "sdrc.h"
+#include "sram.h"
 
 /* #define DOWN_VARIABLE_DPLL 1 */             /* Experimental */
 
index c66276b2bf0ae428c7f641800fb7a643fd38dc76..a38ebb20972166aceac5b467eb190d043362f54d 100644 (file)
@@ -33,8 +33,6 @@
 #include <linux/cpufreq.h>
 #include <linux/slab.h>
 
-#include "../plat-omap/sram.h"
-
 #include "soc.h"
 #include "clock.h"
 #include "clock2xxx.h"
@@ -42,6 +40,7 @@
 #include "cm2xxx_3xxx.h"
 #include "cm-regbits-24xx.h"
 #include "sdrc.h"
+#include "sram.h"
 
 const struct prcm_config *curr_prcm_set;
 const struct prcm_config *rate_table;
index 5510d92abe6eac5bf8e3158c167b608b1f5eedd5..6cf298e262f61fdabdc85fd40f2e7bea00442abe 100644 (file)
 #include <linux/clk.h>
 #include <linux/io.h>
 
-#include "../plat-omap/sram.h"
-
 #include "clock.h"
 #include "clock3xxx.h"
 #include "clock34xx.h"
 #include "sdrc.h"
+#include "sram.h"
 
 #define CYCLES_PER_MHZ                 1000000
 
index 4fadc7895579a10523b94ca833a78a13b7d04a2e..814f69955d7233d4d4a5f62c0a97ad0550de20de 100644 (file)
@@ -27,8 +27,6 @@
 
 #include <plat-omap/dma-omap.h>
 
-#include "../plat-omap/sram.h"
-
 #include "omap_hwmod.h"
 #include "soc.h"
 #include "iomap.h"
@@ -43,6 +41,7 @@
 #include "omap-pm.h"
 #include "sdrc.h"
 #include "serial.h"
+#include "sram.h"
 
 /*
  * The machine specific code may provide the extra mapping besides the
index d25845c471daa2b6ebe2c6dce454be40a45ab0e4..8a7fc04f4ba5db102fcc0247077ed51464d964b8 100644 (file)
@@ -25,8 +25,6 @@
 #include <asm/mach/map.h>
 #include <asm/memblock.h>
 
-#include "../plat-omap/sram.h"
-
 #include "omap-wakeupgen.h"
 #include "soc.h"
 #include "common.h"
index 6d17e044ffb8d9836457f82b44a1c9f9c1316b26..9a2f5594a7dc937533f868e69d1915e8f9c2aec8 100644 (file)
@@ -31,6 +31,8 @@
 #include <linux/gpio.h>
 #include <linux/platform_data/gpio-omap.h>
 
+#include <asm/fncpy.h>
+
 #include <asm/mach/time.h>
 #include <asm/mach/irq.h>
 #include <asm/mach-types.h>
@@ -38,8 +40,6 @@
 
 #include <plat-omap/dma-omap.h>
 
-#include "../plat-omap/sram.h"
-
 #include "soc.h"
 #include "common.h"
 #include "clock.h"
@@ -48,6 +48,7 @@
 #include "cm2xxx_3xxx.h"
 #include "cm-regbits-24xx.h"
 #include "sdrc.h"
+#include "sram.h"
 #include "pm.h"
 #include "control.h"
 #include "powerdomain.h"
index 160fa250c41e2451a082571f4f85a10654442a11..4c85762107bdefc57b08907f92a6df1e0391fbc2 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <trace/events/power.h>
 
+#include <asm/fncpy.h>
 #include <asm/suspend.h>
 #include <asm/system_misc.h>
 
@@ -40,8 +41,6 @@
 #include <plat/prcm.h>
 #include <plat-omap/dma-omap.h>
 
-#include "../plat-omap/sram.h"
-
 #include "soc.h"
 #include "common.h"
 #include "cm2xxx_3xxx.h"
@@ -52,6 +51,7 @@
 #include "prm2xxx_3xxx.h"
 #include "pm.h"
 #include "sdrc.h"
+#include "sram.h"
 #include "control.h"
 
 /* pm34xx errata defined in pm.h */
index 94d4082f87ed1d9f6ddb5f61b364d5401626f327..c64ee1904be8476a8776d9ff9e1bb9a809106cb6 100644 (file)
@@ -23,8 +23,6 @@
 #include <linux/clk.h>
 #include <linux/io.h>
 
-#include "../plat-omap/sram.h"
-
 #include "common.h"
 #include "clock.h"
 #include "sdrc.h"
index 3b8bfdf848d546e552b1b9769516bd4639036339..20cc950db4de54e4eae3a1f4bb75649eb8326a2d 100644 (file)
 #include <linux/clk.h>
 #include <linux/io.h>
 
-#include "../plat-omap/sram.h"
-
 #include "soc.h"
 #include "iomap.h"
 #include "common.h"
 #include "prm2xxx_3xxx.h"
 #include "clock.h"
 #include "sdrc.h"
+#include "sram.h"
 
 /* Memory timing, DLL mode flags */
 #define M_DDR          1
index 75afe11207ff2363c973bd7b692103b06b80a7d4..7046c3c671810b16f1a44d8c929e8590efa1e18e 100644 (file)
 
 #include <asm/assembler.h>
 
-#include "../plat-omap/sram.h"
-
 #include "omap34xx.h"
 #include "iomap.h"
 #include "cm2xxx_3xxx.h"
 #include "prm2xxx_3xxx.h"
 #include "sdrc.h"
+#include "sram.h"
 #include "control.h"
 
 /*
similarity index 79%
rename from arch/arm/plat-omap/sram.h
rename to arch/arm/mach-omap2/sram.h
index cefda2e098696e69a90fba5b2ab707c5a412ecf0..ca7277c2a9ee74541c7ed249662c438f740838c6 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/arm/plat-omap/include/mach/sram.h
- *
  * Interface for functions that need to be run in internal SRAM
  *
  * This program is free software; you can redistribute it and/or modify
@@ -8,26 +6,8 @@
  * published by the Free Software Foundation.
  */
 
-#ifndef __ARCH_ARM_OMAP_SRAM_H
-#define __ARCH_ARM_OMAP_SRAM_H
-
 #ifndef __ASSEMBLY__
-#include <asm/fncpy.h>
-
-int __init omap_sram_init(void);
-
-extern void *omap_sram_push_address(unsigned long size);
-
-/* Macro to push a function to the internal SRAM, using the fncpy API */
-#define omap_sram_push(funcp, size) ({                         \
-       typeof(&(funcp)) _res = NULL;                           \
-       void *_sram_address = omap_sram_push_address(size);     \
-       if (_sram_address)                                      \
-               _res = fncpy(_sram_address, &(funcp), size);    \
-       _res;                                                   \
-})
-
-extern void omap_sram_reprogram_clock(u32 dpllctl, u32 ckctl);
+#include <plat/sram.h>
 
 extern void omap2_sram_ddr_init(u32 *slow_dll_ctrl, u32 fast_dll_ctrl,
                                u32 base_cs, u32 force_unlock);
@@ -44,9 +24,6 @@ extern u32 omap3_configure_core_dpll(
 extern void omap3_sram_restore_context(void);
 
 /* Do not use these */
-extern void omap1_sram_reprogram_clock(u32 ckctl, u32 dpllctl);
-extern unsigned long omap1_sram_reprogram_clock_sz;
-
 extern void omap24xx_sram_reprogram_clock(u32 ckctl, u32 dpllctl);
 extern unsigned long omap24xx_sram_reprogram_clock_sz;
 
@@ -104,4 +81,3 @@ static inline void omap_push_sram_idle(void) {}
 #define OMAP4_SRAM_PA          0x40300000
 #endif
 #define AM33XX_SRAM_PA         0x40300000
-#endif
diff --git a/arch/arm/plat-omap/include/plat/sram.h b/arch/arm/plat-omap/include/plat/sram.h
new file mode 100644 (file)
index 0000000..c60025a
--- /dev/null
@@ -0,0 +1,12 @@
+int omap_sram_init(void);
+
+extern void *omap_sram_push_address(unsigned long size);
+
+/* Macro to push a function to the internal SRAM, using the fncpy API */
+#define omap_sram_push(funcp, size) ({                         \
+       typeof(&(funcp)) _res = NULL;                           \
+       void *_sram_address = omap_sram_push_address(size);     \
+       if (_sram_address)                                      \
+               _res = fncpy(_sram_address, &(funcp), size);    \
+       _res;                                                   \
+})
index 70dcc225157f312d209d14c53180048e75147796..337292935256204c6c7f4dc345f574fad48ca962 100644 (file)
 #include <linux/init.h>
 #include <linux/io.h>
 
+#include <asm/fncpy.h>
 #include <asm/tlb.h>
 #include <asm/cacheflush.h>
 
 #include <asm/mach/map.h>
 
 #include "../mach-omap1/soc.h"
+#include "../mach-omap1/sram.h"
 #include "../mach-omap2/soc.h"
-
-#include "sram.h"
+#include "../mach-omap2/sram.h"
 
 /* XXX These "sideways" includes will disappear when sram.c becomes a driver */
 #include "../mach-omap2/iomap.h"