]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Blackfin arch: move out irq related functions
authorMike Frysinger <vapier.adi@gmail.com>
Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)
committerBryan Wu <cooloney@kernel.org>
Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)
move irq related functions into asm/irq.h and out of the mondo asm/system.h

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
arch/blackfin/include/asm/irq.h
arch/blackfin/include/asm/pda.h
arch/blackfin/include/asm/system.h
arch/blackfin/kernel/vmlinux.lds.S
arch/blackfin/mach-bf518/include/mach/cdefBF51x_base.h
arch/blackfin/mach-bf527/include/mach/cdefBF52x_base.h
arch/blackfin/mach-bf533/include/mach/cdefBF532.h
arch/blackfin/mach-bf537/include/mach/cdefBF534.h
arch/blackfin/mach-bf538/include/mach/cdefBF538.h
arch/blackfin/mach-bf548/include/mach/cdefBF54x_base.h
arch/blackfin/mach-bf561/include/mach/cdefBF561.h

index 9377816fa18ab7c9e10605b0ac0c3989716229c4..e43c20583fcde2852832f5af9e9157197b2a10d2 100644 (file)
 
 /* SYS_IRQS and NR_IRQS are defined in <mach-bf5xx/irq.h>*/
 #include <mach/irq.h>
-#include <asm/ptrace.h>
+#include <asm/pda.h>
+#include <asm/processor.h>
 
 static __inline__ int irq_canonicalize(int irq)
 {
        return irq;
 }
 
+/*
+ * Interrupt configuring macros.
+ */
+#define local_irq_disable() \
+       do { \
+               int __tmp_dummy; \
+               __asm__ __volatile__( \
+                       "cli %0;" \
+                       : "=d" (__tmp_dummy) \
+               ); \
+       } while (0)
+
+#if ANOMALY_05000244 && defined(CONFIG_BFIN_ICACHE)
+# define NOP_PAD_ANOMALY_05000244 "nop; nop;"
+#else
+# define NOP_PAD_ANOMALY_05000244
+#endif
+
+#ifdef CONFIG_SMP
+/* Forward decl needed due to cdef inter dependencies */
+static inline uint32_t __pure bfin_dspid(void);
+# define blackfin_core_id() (bfin_dspid() & 0xff)
+# define irq_flags cpu_pda[blackfin_core_id()].imask
+#else
+extern unsigned long irq_flags;
+#endif
+
+#define local_irq_enable() \
+       __asm__ __volatile__( \
+               "sti %0;" \
+               : \
+               : "d" (irq_flags) \
+       )
+
+#define idle_with_irq_disabled() \
+       __asm__ __volatile__( \
+               NOP_PAD_ANOMALY_05000244 \
+               ".align 8;" \
+               "sti %0;" \
+               "idle;" \
+               : \
+               : "d" (irq_flags) \
+       )
+
+#ifdef CONFIG_DEBUG_HWERR
+# define __save_and_cli(x) \
+       __asm__ __volatile__( \
+               "cli %0;" \
+               "sti %1;" \
+               : "=&d" (x) \
+               : "d" (0x3F) \
+       )
+#else
+# define __save_and_cli(x) \
+       __asm__ __volatile__( \
+               "cli %0;" \
+               : "=&d" (x) \
+       )
+#endif
+
+#define local_save_flags(x) \
+       __asm__ __volatile__( \
+               "cli %0;" \
+               "sti %0;" \
+               : "=d" (x) \
+       )
+
+#ifdef CONFIG_DEBUG_HWERR
+#define irqs_enabled_from_flags(x) (((x) & ~0x3f) != 0)
+#else
+#define irqs_enabled_from_flags(x) ((x) != 0x1f)
+#endif
+
+#define local_irq_restore(x) \
+       do { \
+               if (irqs_enabled_from_flags(x)) \
+                       local_irq_enable(); \
+       } while (0)
+
+/* For spinlocks etc */
+#define local_irq_save(x) __save_and_cli(x)
+
+#define irqs_disabled()                                \
+({                                             \
+       unsigned long flags;                    \
+       local_save_flags(flags);                \
+       !irqs_enabled_from_flags(flags);        \
+})
+
 #endif                         /* _BFIN_IRQ_H_ */
index a24d130c30f0b430caea816ed2fe1aba4b25dcd5..bd8d4a7efeb29720e0e4171c1359ba7740ffb08d 100644 (file)
@@ -23,7 +23,7 @@
 #ifndef _ASM_BLACKFIN_PDA_H
 #define _ASM_BLACKFIN_PDA_H
 
-#include <asm/mem_map.h>
+#include <mach/anomaly.h>
 
 #ifndef __ASSEMBLY__
 
index 6b368faf30c3e34a46905f22ec266b5f71687d0b..e8bcfa4ee5c0ef5426e5c16410fb94d5738dd08c 100644 (file)
 #include <mach/anomaly.h>
 #include <asm/pda.h>
 #include <asm/processor.h>
-
-/* Forward decl needed due to cdef inter dependencies */
-static inline uint32_t __pure bfin_dspid(void);
-#define blackfin_core_id() (bfin_dspid() & 0xff)
-
-/*
- * Interrupt configuring macros.
- */
-#define local_irq_disable() \
-       do { \
-               int __tmp_dummy; \
-               __asm__ __volatile__( \
-                       "cli %0;" \
-                       : "=d" (__tmp_dummy) \
-               ); \
-       } while (0)
-
-#if ANOMALY_05000244 && defined(CONFIG_BFIN_ICACHE)
-# define NOP_PAD_ANOMALY_05000244 "nop; nop;"
-#else
-# define NOP_PAD_ANOMALY_05000244
-#endif
-
-#ifdef CONFIG_SMP
-# define irq_flags cpu_pda[blackfin_core_id()].imask
-#else
-extern unsigned long irq_flags;
-#endif
-
-#define local_irq_enable() \
-       __asm__ __volatile__( \
-               "sti %0;" \
-               : \
-               : "d" (irq_flags) \
-       )
-#define idle_with_irq_disabled() \
-       __asm__ __volatile__( \
-               NOP_PAD_ANOMALY_05000244 \
-               ".align 8;" \
-               "sti %0;" \
-               "idle;" \
-               : \
-               : "d" (irq_flags) \
-       )
-
-#ifdef CONFIG_DEBUG_HWERR
-# define __save_and_cli(x) \
-       __asm__ __volatile__( \
-               "cli %0;" \
-               "sti %1;" \
-               : "=&d" (x) \
-               : "d" (0x3F) \
-       )
-#else
-# define __save_and_cli(x) \
-       __asm__ __volatile__( \
-               "cli %0;" \
-               : "=&d" (x) \
-       )
-#endif
-
-#define local_save_flags(x) \
-       __asm__ __volatile__( \
-               "cli %0;" \
-               "sti %0;" \
-               : "=d" (x) \
-       )
-
-#ifdef CONFIG_DEBUG_HWERR
-#define irqs_enabled_from_flags(x) (((x) & ~0x3f) != 0)
-#else
-#define irqs_enabled_from_flags(x) ((x) != 0x1f)
-#endif
-
-#define local_irq_restore(x) \
-       do { \
-               if (irqs_enabled_from_flags(x)) \
-                       local_irq_enable(); \
-       } while (0)
-
-/* For spinlocks etc */
-#define local_irq_save(x) __save_and_cli(x)
-
-#define        irqs_disabled()                         \
-({                                             \
-       unsigned long flags;                    \
-       local_save_flags(flags);                \
-       !irqs_enabled_from_flags(flags);        \
-})
+#include <asm/irq.h>
 
 /*
  * Force strict CPU ordering.
@@ -279,7 +191,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr,
  * ptr isn't the current task, in which case it does nothing.
  */
 
-#include <asm/blackfin.h>
+#include <asm/l1layout.h>
 
 asmlinkage struct task_struct *resume(struct task_struct *prev, struct task_struct *next);
 
index 2a485352ec14680553de6f925a0a00281ae782c5..3a1f73794aa8226b8d8c2c65cbe2bdd6391d5106 100644 (file)
@@ -109,7 +109,6 @@ SECTIONS
 #endif
 
                DATA_DATA
-               *(.data)
                CONSTRUCTORS
 
                /* make sure the init_task is aligned to the
index 45a7ff88d863603848c5c41a15dc70b9c817157a..9fbcd222198635a2002b1a0ade6ec6a936f7ed8c 100644 (file)
 #define bfin_write_NFC_DATA_RD(val)            bfin_write16(NFC_DATA_RD, val)
 
 /* These need to be last due to the cdef/linux inter-dependencies */
-#include <asm/system.h>
+#include <asm/irq.h>
 
 /* Writing to PLL_CTL initiates a PLL relock sequence. */
 static __inline__ void bfin_write_PLL_CTL(unsigned int val)
index 008603f332a64e318cf40afbe8a1e40a8312cc9c..8a374c358edf43fb4a2e664b9897517de7e0d1fa 100644 (file)
 #define bfin_write_NFC_DATA_RD(val)            bfin_write16(NFC_DATA_RD, val)
 
 /* These need to be last due to the cdef/linux inter-dependencies */
-#include <asm/system.h>
+#include <asm/irq.h>
 
 /* Writing to PLL_CTL initiates a PLL relock sequence. */
 static __inline__ void bfin_write_PLL_CTL(unsigned int val)
index b148d2b7e4793d31b3ad6ed6be35c6bade897c28..d7b08f638ea4e5024b8f6ec869783d66d13f89f1 100644 (file)
 #define bfin_write_PPI_FRAME(val)            bfin_write16(PPI_FRAME,val)
 
 /* These need to be last due to the cdef/linux inter-dependencies */
-#include <asm/system.h>
+#include <asm/irq.h>
 
 #if ANOMALY_05000311
 #define BFIN_WRITE_FIO_FLAG(name) \
index 76135607e35b138809a3238483bd5ddaebc23f2c..f3416923be6931a123005f263c138fecaa133b70 100644 (file)
 #define bfin_write_HMDMA1_BCOUNT(val)        bfin_write16(HMDMA1_BCOUNT,val)
 
 /* These need to be last due to the cdef/linux inter-dependencies */
-#include <asm/system.h>
+#include <asm/irq.h>
 
 /* Writing to PLL_CTL initiates a PLL relock sequence. */
 static __inline__ void bfin_write_PLL_CTL(unsigned int val)
index 1d768a65d13926f9be6202a083d7a9d91978cc90..7e469b8d939c3ed163dade1c6928c716a6aced49 100644 (file)
 #define bfin_write_CAN_MB31_ID1(val)   bfin_write16(CAN_MB31_ID1, val)
 
 /* These need to be last due to the cdef/linux inter-dependencies */
-#include <asm/system.h>
+#include <asm/irq.h>
 
 /* Writing to PLL_CTL initiates a PLL relock sequence. */
 static __inline__ void bfin_write_PLL_CTL(unsigned int val)
index c376fb7acda0747974dd465353288b9157794cac..0a3b210daadf670b51ff6ba836a04e50c4bcfe0e 100644 (file)
 #define bfin_write_PINT3_IRQ           bfin_write_PINT3_REQUEST
 
 /* These need to be last due to the cdef/linux inter-dependencies */
-#include <asm/system.h>
+#include <asm/irq.h>
 
 /* Writing to PLL_CTL initiates a PLL relock sequence. */
 static __inline__ void bfin_write_PLL_CTL(unsigned int val)
index eb349ca88cc4da5699ddeed218f60f104c602aa6..b16875d735b3405df77257399321d4c307ca737f 100644 (file)
 #define bfin_write_MDMA_D0_START_ADDR(val) bfin_write_MDMA1_D0_START_ADDR(val)
 
 /* These need to be last due to the cdef/linux inter-dependencies */
-#include <asm/system.h>
+#include <asm/irq.h>
 
 /* Writing to PLL_CTL initiates a PLL relock sequence. */
 static __inline__ void bfin_write_PLL_CTL(unsigned int val)