diff options
| -rw-r--r-- | arch/m68knommu/Makefile | 11 | ||||
| -rw-r--r-- | include/asm-m68knommu/bitops.h | 30 |
2 files changed, 37 insertions, 4 deletions
diff --git a/arch/m68knommu/Makefile b/arch/m68knommu/Makefile index e0b5f62e395c..b63bbcf874ff 100644 --- a/arch/m68knommu/Makefile +++ b/arch/m68knommu/Makefile | |||
| @@ -8,6 +8,8 @@ | |||
| 8 | # (C) Copyright 2002, Greg Ungerer <gerg@snapgear.com> | 8 | # (C) Copyright 2002, Greg Ungerer <gerg@snapgear.com> |
| 9 | # | 9 | # |
| 10 | 10 | ||
| 11 | KBUILD_DEFCONFIG := m5208evb_defconfig | ||
| 12 | |||
| 11 | platform-$(CONFIG_M68328) := 68328 | 13 | platform-$(CONFIG_M68328) := 68328 |
| 12 | platform-$(CONFIG_M68EZ328) := 68EZ328 | 14 | platform-$(CONFIG_M68EZ328) := 68EZ328 |
| 13 | platform-$(CONFIG_M68VZ328) := 68VZ328 | 15 | platform-$(CONFIG_M68VZ328) := 68VZ328 |
| @@ -90,13 +92,14 @@ export PLATFORM BOARD MODEL CPUCLASS | |||
| 90 | cflags-$(CONFIG_M5206) := -m5200 | 92 | cflags-$(CONFIG_M5206) := -m5200 |
| 91 | cflags-$(CONFIG_M5206e) := -m5200 | 93 | cflags-$(CONFIG_M5206e) := -m5200 |
| 92 | cflags-$(CONFIG_M520x) := -m5307 | 94 | cflags-$(CONFIG_M520x) := -m5307 |
| 93 | cflags-$(CONFIG_M523x) := -m5307 | 95 | cflags-$(CONFIG_M523x) := $(call cc-option,-mcpu=523x,-m5307) |
| 94 | cflags-$(CONFIG_M5249) := -m5200 | 96 | cflags-$(CONFIG_M5249) := -m5200 |
| 95 | cflags-$(CONFIG_M527x) := -m5307 | 97 | cflags-$(CONFIG_M5271) := $(call cc-option,-mcpu=5271,-m5307) |
| 96 | cflags-$(CONFIG_M5272) := -m5307 | 98 | cflags-$(CONFIG_M5272) := -m5307 |
| 97 | cflags-$(CONFIG_M528x) := -m5307 | 99 | cflags-$(CONFIG_M5275) := $(call cc-option,-mcpu=5275,-m5307) |
| 100 | cflags-$(CONFIG_M528x) := $(call cc-option,-m528x,-m5307) | ||
| 98 | cflags-$(CONFIG_M5307) := -m5307 | 101 | cflags-$(CONFIG_M5307) := -m5307 |
| 99 | cflags-$(CONFIG_M532x) := -m5307 | 102 | cflags-$(CONFIG_M532x) := $(call cc-option,-mcpu=532x,-m5307) |
| 100 | cflags-$(CONFIG_M5407) := -m5200 | 103 | cflags-$(CONFIG_M5407) := -m5200 |
| 101 | cflags-$(CONFIG_M68328) := -m68000 | 104 | cflags-$(CONFIG_M68328) := -m68000 |
| 102 | cflags-$(CONFIG_M68EZ328) := -m68000 | 105 | cflags-$(CONFIG_M68EZ328) := -m68000 |
diff --git a/include/asm-m68knommu/bitops.h b/include/asm-m68knommu/bitops.h index c142fbf2f376..6f3685eab44c 100644 --- a/include/asm-m68knommu/bitops.h +++ b/include/asm-m68knommu/bitops.h | |||
| @@ -14,8 +14,38 @@ | |||
| 14 | #error only <linux/bitops.h> can be included directly | 14 | #error only <linux/bitops.h> can be included directly |
| 15 | #endif | 15 | #endif |
| 16 | 16 | ||
| 17 | #if defined (__mcfisaaplus__) || defined (__mcfisac__) | ||
| 18 | static inline int ffs(unsigned int val) | ||
| 19 | { | ||
| 20 | if (!val) | ||
| 21 | return 0; | ||
| 22 | |||
| 23 | asm volatile( | ||
| 24 | "bitrev %0\n\t" | ||
| 25 | "ff1 %0\n\t" | ||
| 26 | : "=d" (val) | ||
| 27 | : "0" (val) | ||
| 28 | ); | ||
| 29 | val++; | ||
| 30 | return val; | ||
| 31 | } | ||
| 32 | |||
| 33 | static inline int __ffs(unsigned int val) | ||
| 34 | { | ||
| 35 | asm volatile( | ||
| 36 | "bitrev %0\n\t" | ||
| 37 | "ff1 %0\n\t" | ||
| 38 | : "=d" (val) | ||
| 39 | : "0" (val) | ||
| 40 | ); | ||
| 41 | return val; | ||
| 42 | } | ||
| 43 | |||
| 44 | #else | ||
| 17 | #include <asm-generic/bitops/ffs.h> | 45 | #include <asm-generic/bitops/ffs.h> |
| 18 | #include <asm-generic/bitops/__ffs.h> | 46 | #include <asm-generic/bitops/__ffs.h> |
| 47 | #endif | ||
| 48 | |||
| 19 | #include <asm-generic/bitops/sched.h> | 49 | #include <asm-generic/bitops/sched.h> |
| 20 | #include <asm-generic/bitops/ffz.h> | 50 | #include <asm-generic/bitops/ffz.h> |
| 21 | 51 | ||
