diff options
author | Imre Kaloz <kaloz@openwrt.org> | 2009-06-23 21:04:37 +0000 |
---|---|---|
committer | Imre Kaloz <kaloz@openwrt.org> | 2009-06-23 21:04:37 +0000 |
commit | c49f135f72f98633653300bab5b0ac993b03c6be (patch) | |
tree | 50929b27bcea9ab4dc74b041d6e90967473301fa /target/linux/coldfire/patches/020-mcfv4e_inline_memory_params.patch | |
parent | 50f2abfa16a2b509955312d1776beeece662c61b (diff) | |
download | mtk-20170518-c49f135f72f98633653300bab5b0ac993b03c6be.zip mtk-20170518-c49f135f72f98633653300bab5b0ac993b03c6be.tar.gz mtk-20170518-c49f135f72f98633653300bab5b0ac993b03c6be.tar.bz2 |
use broken-out patches for the coldfire to make it easier to follow differences against the bsp
SVN-Revision: 16547
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 0000000..bd1769d --- /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) |