diff options
author | kaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2009-06-23 21:04:37 +0000 |
---|---|---|
committer | kaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2009-06-23 21:04:37 +0000 |
commit | 343c185b7d7383b1f5b5144e837045af28afc42b (patch) | |
tree | 6d3382662fa3ad4119d3a3cda223c53949ca4894 /target/linux/coldfire/patches/020-mcfv4e_inline_memory_params.patch | |
parent | 145f9652a593d19b149d2f25febd4aa0c1ab57d1 (diff) |
use broken-out patches for the coldfire to make it easier to follow differences against the bsp
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16547 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/coldfire/patches/020-mcfv4e_inline_memory_params.patch')
-rw-r--r-- | target/linux/coldfire/patches/020-mcfv4e_inline_memory_params.patch | 168 |
1 files changed, 168 insertions, 0 deletions
diff --git a/target/linux/coldfire/patches/020-mcfv4e_inline_memory_params.patch b/target/linux/coldfire/patches/020-mcfv4e_inline_memory_params.patch new file mode 100644 index 000000000..bd1769d08 --- /dev/null +++ b/target/linux/coldfire/patches/020-mcfv4e_inline_memory_params.patch @@ -0,0 +1,168 @@ +From 3f698a1cf08cc02911cdb2ca3217be77eeba794b Mon Sep 17 00:00:00 2001 +From: Kurt Mahan <kmahan@freescale.com> +Date: Tue, 27 Nov 2007 23:17:53 -0700 +Subject: [PATCH] Change inline assembly memory params. + +For various routines change how the assembly memory pointer +is passed in. + +LTIBName: mcfv4e-inline-memory-params +Signed-off-by: Kurt Mahan <kmahan@freescale.com> +--- + include/asm-m68k/bitops.h | 68 ++++++++++++++++++++++++++++++++++++++++++++- + 1 files changed, 67 insertions(+), 1 deletions(-) + +--- a/include/asm-m68k/bitops.h ++++ b/include/asm-m68k/bitops.h +@@ -465,7 +465,7 @@ static inline int ext2_find_next_bit(con + __constant_coldfire_test_and_set_bit(nr, vaddr) : \ + __generic_coldfire_test_and_set_bit(nr, vaddr)) + +- ++#if 0 + static __inline__ int __constant_coldfire_test_and_set_bit(int nr, + volatile void *vaddr) + { +@@ -477,6 +477,17 @@ static __inline__ int __constant_coldfir + : "di" (nr & 7)); + return retval; + } ++#else ++static __inline__ int __constant_coldfire_test_and_set_bit(int nr,volatile void * vaddr) ++{ ++ char retval; ++ volatile char *p = &((volatile char *)vaddr)[(nr^31) >> 3]; ++ __asm__ __volatile__ ("bset %2,(%4); sne %0" ++ : "=d" (retval), "=m" (*p) ++ : "di" (nr & 7), "m" (*p), "a" (p)); ++ return retval; ++} ++#endif + + static __inline__ int __generic_coldfire_test_and_set_bit(int nr, + volatile void *vaddr) +@@ -496,6 +507,7 @@ static __inline__ int __generic_coldfire + __constant_coldfire_set_bit(nr, vaddr) : \ + __generic_coldfire_set_bit(nr, vaddr)) + ++#if 0 + static __inline__ void __constant_coldfire_set_bit(int nr, + volatile void *vaddr) + { +@@ -503,6 +515,14 @@ static __inline__ void __constant_coldfi + __asm__ __volatile__ ("bset %1,%0" + : "+QUd" (*p) : "di" (nr & 7)); + } ++#else ++static __inline__ void __constant_coldfire_set_bit(int nr, volatile void * vaddr) ++{ ++ volatile char *p = &((volatile char *)vaddr)[(nr^31) >> 3]; ++ __asm__ __volatile__ ("bset %1,(%3)" ++ : "=m" (*p) : "di" (nr & 7), "m" (*p), "a" (p)); ++} ++#endif + + static __inline__ void __generic_coldfire_set_bit(int nr, volatile void *vaddr) + { +@@ -518,6 +538,7 @@ static __inline__ void __generic_coldfir + __constant_coldfire_test_and_clear_bit(nr, vaddr) : \ + __generic_coldfire_test_and_clear_bit(nr, vaddr)) + ++#if 0 + static __inline__ int __constant_coldfire_test_and_clear_bit(int nr, + volatile void *vaddr) + { +@@ -530,6 +551,19 @@ static __inline__ int __constant_coldfir + + return retval; + } ++#else ++static __inline__ int __constant_coldfire_test_and_clear_bit(int nr, volatile void *vaddr) ++{ ++ char retval; ++ volatile char *p = &((volatile char *)vaddr)[(nr^31) >> 3]; ++ ++ __asm__ __volatile__ ("bclr %2,(%4); sne %0" ++ : "=d" (retval), "=m" (*p) ++ : "id" (nr & 7), "m" (*p), "a" (p)); ++ ++ return retval; ++} ++#endif + + static __inline__ int __generic_coldfire_test_and_clear_bit(int nr, + volatile void *vaddr) +@@ -556,6 +590,7 @@ static __inline__ int __generic_coldfire + __constant_coldfire_clear_bit(nr, vaddr) : \ + __generic_coldfire_clear_bit(nr, vaddr)) + ++#if 0 + static __inline__ void __constant_coldfire_clear_bit(int nr, + volatile void *vaddr) + { +@@ -563,6 +598,14 @@ static __inline__ void __constant_coldfi + __asm__ __volatile__ ("bclr %1,%0" + : "+QUd" (*p) : "id" (nr & 7)); + } ++#else ++static __inline__ void __constant_coldfire_clear_bit(int nr, volatile void * vaddr) ++{ ++ volatile char *p = &((volatile char *)vaddr)[(nr^31) >> 3]; ++ __asm__ __volatile__ ("bclr %1,(%3)" ++ : "=m" (*p) : "id" (nr & 7), "m" (*p), "a" (p)); ++} ++#endif + + static __inline__ void __generic_coldfire_clear_bit(int nr, + volatile void *vaddr) +@@ -579,6 +622,7 @@ static __inline__ void __generic_coldfir + __constant_coldfire_test_and_change_bit(nr, vaddr) : \ + __generic_coldfire_test_and_change_bit(nr, vaddr)) + ++#if 0 + static __inline__ int __constant_coldfire_test_and_change_bit(int nr, + volatile void *vaddr) + { +@@ -591,6 +635,19 @@ static __inline__ int __constant_coldfir + + return retval; + } ++#else ++static __inline__ int __constant_coldfire_test_and_change_bit(int nr, volatile void * vaddr) ++{ ++ char retval; ++ volatile char *p = &((volatile char *)vaddr)[(nr^31) >> 3]; ++ ++ __asm__ __volatile__ ("bchg %2,(%4); sne %0" ++ : "=d" (retval), "=m" (*p) ++ : "id" (nr & 7), "m" (*p), "a" (p)); ++ ++ return retval; ++} ++#endif + + static __inline__ int __generic_coldfire_test_and_change_bit(int nr, + volatile void *vaddr) +@@ -612,6 +669,7 @@ static __inline__ int __generic_coldfire + __constant_coldfire_change_bit(nr, vaddr) : \ + __generic_coldfire_change_bit(nr, vaddr)) + ++#if 0 + static __inline__ void __constant_coldfire_change_bit(int nr, + volatile void *vaddr) + { +@@ -619,6 +677,14 @@ static __inline__ void __constant_coldfi + __asm__ __volatile__ ("bchg %1,%0" + : "+QUd" (*p) : "id" (nr & 7)); + } ++#else ++static __inline__ void __constant_coldfire_change_bit(int nr, volatile void * vaddr) ++{ ++ volatile char *p = &((volatile char *)vaddr)[(nr^31) >> 3]; ++ __asm__ __volatile__ ("bchg %1,(%3)" ++ : "=m" (*p) : "id" (nr & 7), "m" (*p), "a" (p)); ++} ++#endif + + static __inline__ void __generic_coldfire_change_bit(int nr, + volatile void *vaddr) |