diff options
author | Len Brown <len.brown@intel.com> | 2009-01-09 03:39:43 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-01-09 03:39:43 -0500 |
commit | b2576e1d4408e134e2188c967b1f28af39cd79d4 (patch) | |
tree | 004f3c82faab760f304ce031d6d2f572e7746a50 /include/asm-m68k | |
parent | 3cc8a5f4ba91f67bbdb81a43a99281a26aab8d77 (diff) | |
parent | 2150edc6c5cf00f7adb54538b9ea2a3e9cedca3f (diff) |
Merge branch 'linus' into release
Diffstat (limited to 'include/asm-m68k')
-rw-r--r-- | include/asm-m68k/Kbuild | 1 | ||||
-rw-r--r-- | include/asm-m68k/atomic.h | 3 | ||||
-rw-r--r-- | include/asm-m68k/bitops.h | 5 | ||||
-rw-r--r-- | include/asm-m68k/byteorder.h | 20 | ||||
-rw-r--r-- | include/asm-m68k/machw.h | 22 | ||||
-rw-r--r-- | include/asm-m68k/swab.h | 16 |
6 files changed, 24 insertions, 43 deletions
diff --git a/include/asm-m68k/Kbuild b/include/asm-m68k/Kbuild index 1a922fad76f..52fd96b4142 100644 --- a/include/asm-m68k/Kbuild +++ b/include/asm-m68k/Kbuild @@ -1,2 +1,3 @@ include include/asm-generic/Kbuild.asm header-y += cachectl.h +unifdef-y += swab.h diff --git a/include/asm-m68k/atomic.h b/include/asm-m68k/atomic.h index 4915294fea6..eb0ab9d4ee7 100644 --- a/include/asm-m68k/atomic.h +++ b/include/asm-m68k/atomic.h @@ -1,7 +1,7 @@ #ifndef __ARCH_M68K_ATOMIC__ #define __ARCH_M68K_ATOMIC__ - +#include <linux/types.h> #include <asm/system.h> /* @@ -13,7 +13,6 @@ * We do not have SMP m68k systems, so we don't have to deal with that. */ -typedef struct { int counter; } atomic_t; #define ATOMIC_INIT(i) { (i) } #define atomic_read(v) ((v)->counter) diff --git a/include/asm-m68k/bitops.h b/include/asm-m68k/bitops.h index 3e8106442d5..9bde784e7ba 100644 --- a/include/asm-m68k/bitops.h +++ b/include/asm-m68k/bitops.h @@ -315,6 +315,11 @@ static inline int fls(int x) return 32 - cnt; } +static inline int __fls(int x) +{ + return fls(x) - 1; +} + #include <asm-generic/bitops/fls64.h> #include <asm-generic/bitops/sched.h> #include <asm-generic/bitops/hweight.h> diff --git a/include/asm-m68k/byteorder.h b/include/asm-m68k/byteorder.h index 81d420b35c8..300866523b8 100644 --- a/include/asm-m68k/byteorder.h +++ b/include/asm-m68k/byteorder.h @@ -1,25 +1,7 @@ #ifndef _M68K_BYTEORDER_H #define _M68K_BYTEORDER_H -#include <asm/types.h> -#include <linux/compiler.h> - -#ifdef __GNUC__ - -static __inline__ __attribute_const__ __u32 ___arch__swab32(__u32 val) -{ - __asm__("rolw #8,%0; swap %0; rolw #8,%0" : "=d" (val) : "0" (val)); - return val; -} -#define __arch__swab32(x) ___arch__swab32(x) - -#endif - -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) -# define __BYTEORDER_HAS_U64__ -# define __SWAB_64_THRU_32__ -#endif - +#include <asm/swab.h> #include <linux/byteorder/big_endian.h> #endif /* _M68K_BYTEORDER_H */ diff --git a/include/asm-m68k/machw.h b/include/asm-m68k/machw.h index 35624998291..2b4de0c2ce4 100644 --- a/include/asm-m68k/machw.h +++ b/include/asm-m68k/machw.h @@ -26,28 +26,6 @@ #include <linux/types.h> #if 0 -/* Mac SCSI Controller 5380 */ - -#define MAC_5380_BAS (0x50F10000) /* This is definitely wrong!! */ -struct MAC_5380 { - u_char scsi_data; - u_char char_dummy1; - u_char scsi_icr; - u_char char_dummy2; - u_char scsi_mode; - u_char char_dummy3; - u_char scsi_tcr; - u_char char_dummy4; - u_char scsi_idstat; - u_char char_dummy5; - u_char scsi_dmastat; - u_char char_dummy6; - u_char scsi_targrcv; - u_char char_dummy7; - u_char scsi_inircv; -}; -#define mac_scsi ((*(volatile struct MAC_5380 *)MAC_5380_BAS)) - /* ** SCC Z8530 */ diff --git a/include/asm-m68k/swab.h b/include/asm-m68k/swab.h new file mode 100644 index 00000000000..7221e306682 --- /dev/null +++ b/include/asm-m68k/swab.h @@ -0,0 +1,16 @@ +#ifndef _M68K_SWAB_H +#define _M68K_SWAB_H + +#include <asm/types.h> +#include <linux/compiler.h> + +#define __SWAB_64_THRU_32__ + +static inline __attribute_const__ __u32 __arch_swab32(__u32 val) +{ + __asm__("rolw #8,%0; swap %0; rolw #8,%0" : "=d" (val) : "0" (val)); + return val; +} +#define __arch_swab32 __arch_swab32 + +#endif /* _M68K_SWAB_H */ |