diff options
| -rw-r--r-- | arch/m68k/Kconfig.nommu | 52 | ||||
| -rw-r--r-- | arch/m68k/kernel/m68k_ksyms.c | 3 | ||||
| -rw-r--r-- | arch/m68k/kernel/vmlinux.lds_no.S | 20 | ||||
| -rw-r--r-- | arch/m68k/lib/memcpy.c | 9 | ||||
| -rw-r--r-- | arch/m68k/lib/memset.c | 9 | ||||
| -rw-r--r-- | arch/m68k/lib/muldi3.c | 21 |
6 files changed, 74 insertions, 40 deletions
diff --git a/arch/m68k/Kconfig.nommu b/arch/m68k/Kconfig.nommu index fc98f9b9d4d2..b004dc1b1710 100644 --- a/arch/m68k/Kconfig.nommu +++ b/arch/m68k/Kconfig.nommu | |||
| @@ -14,6 +14,33 @@ config GENERIC_CLOCKEVENTS | |||
| 14 | bool | 14 | bool |
| 15 | default n | 15 | default n |
| 16 | 16 | ||
| 17 | config M68000 | ||
| 18 | bool | ||
| 19 | help | ||
| 20 | The Freescale (was Motorola) 68000 CPU is the first generation of | ||
| 21 | the well known M68K family of processors. The CPU core as well as | ||
| 22 | being available as a stand alone CPU was also used in many | ||
| 23 | System-On-Chip devices (eg 68328, 68302, etc). It does not contain | ||
| 24 | a paging MMU. | ||
| 25 | |||
| 26 | config MCPU32 | ||
| 27 | bool | ||
| 28 | help | ||
| 29 | The Freescale (was then Motorola) CPU32 is a CPU core that is | ||
| 30 | based on the 68020 processor. For the most part it is used in | ||
| 31 | System-On-Chip parts, and does not contain a paging MMU. | ||
| 32 | |||
| 33 | config COLDFIRE | ||
| 34 | bool | ||
| 35 | select GENERIC_GPIO | ||
| 36 | select ARCH_REQUIRE_GPIOLIB | ||
| 37 | help | ||
| 38 | The Freescale ColdFire family of processors is a modern derivitive | ||
| 39 | of the 68000 processor family. They are mainly targeted at embedded | ||
| 40 | applications, and are all System-On-Chip (SOC) devices, as opposed | ||
| 41 | to stand alone CPUs. They implement a subset of the original 68000 | ||
| 42 | processor instruction set. | ||
| 43 | |||
| 17 | config COLDFIRE_SW_A7 | 44 | config COLDFIRE_SW_A7 |
| 18 | bool | 45 | bool |
| 19 | default n | 46 | default n |
| @@ -36,26 +63,31 @@ choice | |||
| 36 | 63 | ||
| 37 | config M68328 | 64 | config M68328 |
| 38 | bool "MC68328" | 65 | bool "MC68328" |
| 66 | select M68000 | ||
| 39 | help | 67 | help |
| 40 | Motorola 68328 processor support. | 68 | Motorola 68328 processor support. |
| 41 | 69 | ||
| 42 | config M68EZ328 | 70 | config M68EZ328 |
| 43 | bool "MC68EZ328" | 71 | bool "MC68EZ328" |
| 72 | select M68000 | ||
| 44 | help | 73 | help |
| 45 | Motorola 68EX328 processor support. | 74 | Motorola 68EX328 processor support. |
| 46 | 75 | ||
| 47 | config M68VZ328 | 76 | config M68VZ328 |
| 48 | bool "MC68VZ328" | 77 | bool "MC68VZ328" |
| 78 | select M68000 | ||
| 49 | help | 79 | help |
| 50 | Motorola 68VZ328 processor support. | 80 | Motorola 68VZ328 processor support. |
| 51 | 81 | ||
| 52 | config M68360 | 82 | config M68360 |
| 53 | bool "MC68360" | 83 | bool "MC68360" |
| 84 | select MCPU32 | ||
| 54 | help | 85 | help |
| 55 | Motorola 68360 processor support. | 86 | Motorola 68360 processor support. |
| 56 | 87 | ||
| 57 | config M5206 | 88 | config M5206 |
| 58 | bool "MCF5206" | 89 | bool "MCF5206" |
| 90 | select COLDFIRE | ||
| 59 | select COLDFIRE_SW_A7 | 91 | select COLDFIRE_SW_A7 |
| 60 | select HAVE_MBAR | 92 | select HAVE_MBAR |
| 61 | help | 93 | help |
| @@ -63,6 +95,7 @@ config M5206 | |||
| 63 | 95 | ||
| 64 | config M5206e | 96 | config M5206e |
| 65 | bool "MCF5206e" | 97 | bool "MCF5206e" |
| 98 | select COLDFIRE | ||
| 66 | select COLDFIRE_SW_A7 | 99 | select COLDFIRE_SW_A7 |
| 67 | select HAVE_MBAR | 100 | select HAVE_MBAR |
| 68 | help | 101 | help |
| @@ -70,6 +103,7 @@ config M5206e | |||
| 70 | 103 | ||
| 71 | config M520x | 104 | config M520x |
| 72 | bool "MCF520x" | 105 | bool "MCF520x" |
| 106 | select COLDFIRE | ||
| 73 | select GENERIC_CLOCKEVENTS | 107 | select GENERIC_CLOCKEVENTS |
| 74 | select HAVE_CACHE_SPLIT | 108 | select HAVE_CACHE_SPLIT |
| 75 | help | 109 | help |
| @@ -77,6 +111,7 @@ config M520x | |||
| 77 | 111 | ||
| 78 | config M523x | 112 | config M523x |
| 79 | bool "MCF523x" | 113 | bool "MCF523x" |
| 114 | select COLDFIRE | ||
| 80 | select GENERIC_CLOCKEVENTS | 115 | select GENERIC_CLOCKEVENTS |
| 81 | select HAVE_CACHE_SPLIT | 116 | select HAVE_CACHE_SPLIT |
| 82 | select HAVE_IPSBAR | 117 | select HAVE_IPSBAR |
| @@ -85,6 +120,7 @@ config M523x | |||
| 85 | 120 | ||
| 86 | config M5249 | 121 | config M5249 |
| 87 | bool "MCF5249" | 122 | bool "MCF5249" |
| 123 | select COLDFIRE | ||
| 88 | select COLDFIRE_SW_A7 | 124 | select COLDFIRE_SW_A7 |
| 89 | select HAVE_MBAR | 125 | select HAVE_MBAR |
| 90 | help | 126 | help |
| @@ -92,6 +128,7 @@ config M5249 | |||
| 92 | 128 | ||
| 93 | config M5271 | 129 | config M5271 |
| 94 | bool "MCF5271" | 130 | bool "MCF5271" |
| 131 | select COLDFIRE | ||
| 95 | select HAVE_CACHE_SPLIT | 132 | select HAVE_CACHE_SPLIT |
| 96 | select HAVE_IPSBAR | 133 | select HAVE_IPSBAR |
| 97 | help | 134 | help |
| @@ -99,6 +136,7 @@ config M5271 | |||
| 99 | 136 | ||
| 100 | config M5272 | 137 | config M5272 |
| 101 | bool "MCF5272" | 138 | bool "MCF5272" |
| 139 | select COLDFIRE | ||
| 102 | select COLDFIRE_SW_A7 | 140 | select COLDFIRE_SW_A7 |
| 103 | select HAVE_MBAR | 141 | select HAVE_MBAR |
| 104 | help | 142 | help |
| @@ -106,6 +144,7 @@ config M5272 | |||
| 106 | 144 | ||
| 107 | config M5275 | 145 | config M5275 |
| 108 | bool "MCF5275" | 146 | bool "MCF5275" |
| 147 | select COLDFIRE | ||
| 109 | select HAVE_CACHE_SPLIT | 148 | select HAVE_CACHE_SPLIT |
| 110 | select HAVE_IPSBAR | 149 | select HAVE_IPSBAR |
| 111 | help | 150 | help |
| @@ -113,6 +152,7 @@ config M5275 | |||
| 113 | 152 | ||
| 114 | config M528x | 153 | config M528x |
| 115 | bool "MCF528x" | 154 | bool "MCF528x" |
| 155 | select COLDFIRE | ||
| 116 | select GENERIC_CLOCKEVENTS | 156 | select GENERIC_CLOCKEVENTS |
| 117 | select HAVE_CACHE_SPLIT | 157 | select HAVE_CACHE_SPLIT |
| 118 | select HAVE_IPSBAR | 158 | select HAVE_IPSBAR |
| @@ -121,6 +161,7 @@ config M528x | |||
| 121 | 161 | ||
| 122 | config M5307 | 162 | config M5307 |
| 123 | bool "MCF5307" | 163 | bool "MCF5307" |
| 164 | select COLDFIRE | ||
| 124 | select COLDFIRE_SW_A7 | 165 | select COLDFIRE_SW_A7 |
| 125 | select HAVE_CACHE_CB | 166 | select HAVE_CACHE_CB |
| 126 | select HAVE_MBAR | 167 | select HAVE_MBAR |
| @@ -129,12 +170,14 @@ config M5307 | |||
| 129 | 170 | ||
| 130 | config M532x | 171 | config M532x |
| 131 | bool "MCF532x" | 172 | bool "MCF532x" |
| 173 | select COLDFIRE | ||
| 132 | select HAVE_CACHE_CB | 174 | select HAVE_CACHE_CB |
| 133 | help | 175 | help |
| 134 | Freescale (Motorola) ColdFire 532x processor support. | 176 | Freescale (Motorola) ColdFire 532x processor support. |
| 135 | 177 | ||
| 136 | config M5407 | 178 | config M5407 |
| 137 | bool "MCF5407" | 179 | bool "MCF5407" |
| 180 | select COLDFIRE | ||
| 138 | select COLDFIRE_SW_A7 | 181 | select COLDFIRE_SW_A7 |
| 139 | select HAVE_CACHE_CB | 182 | select HAVE_CACHE_CB |
| 140 | select HAVE_MBAR | 183 | select HAVE_MBAR |
| @@ -143,6 +186,7 @@ config M5407 | |||
| 143 | 186 | ||
| 144 | config M547x | 187 | config M547x |
| 145 | bool "MCF547x" | 188 | bool "MCF547x" |
| 189 | select COLDFIRE | ||
| 146 | select HAVE_CACHE_CB | 190 | select HAVE_CACHE_CB |
| 147 | select HAVE_MBAR | 191 | select HAVE_MBAR |
| 148 | help | 192 | help |
| @@ -150,6 +194,7 @@ config M547x | |||
| 150 | 194 | ||
| 151 | config M548x | 195 | config M548x |
| 152 | bool "MCF548x" | 196 | bool "MCF548x" |
| 197 | select COLDFIRE | ||
| 153 | select HAVE_CACHE_CB | 198 | select HAVE_CACHE_CB |
| 154 | select HAVE_MBAR | 199 | select HAVE_MBAR |
| 155 | help | 200 | help |
| @@ -168,13 +213,6 @@ config M54xx | |||
| 168 | depends on (M548x || M547x) | 213 | depends on (M548x || M547x) |
| 169 | default y | 214 | default y |
| 170 | 215 | ||
| 171 | config COLDFIRE | ||
| 172 | bool | ||
| 173 | depends on (M5206 || M5206e || M520x || M523x || M5249 || M527x || M5272 || M528x || M5307 || M532x || M5407 || M54xx) | ||
| 174 | select GENERIC_GPIO | ||
| 175 | select ARCH_REQUIRE_GPIOLIB | ||
| 176 | default y | ||
| 177 | |||
| 178 | config CLOCK_SET | 216 | config CLOCK_SET |
| 179 | bool "Enable setting the CPU clock frequency" | 217 | bool "Enable setting the CPU clock frequency" |
| 180 | default n | 218 | default n |
diff --git a/arch/m68k/kernel/m68k_ksyms.c b/arch/m68k/kernel/m68k_ksyms.c index 33f82769547c..1b7a14d1a000 100644 --- a/arch/m68k/kernel/m68k_ksyms.c +++ b/arch/m68k/kernel/m68k_ksyms.c | |||
| @@ -14,8 +14,7 @@ EXPORT_SYMBOL(__ashrdi3); | |||
| 14 | EXPORT_SYMBOL(__lshrdi3); | 14 | EXPORT_SYMBOL(__lshrdi3); |
| 15 | EXPORT_SYMBOL(__muldi3); | 15 | EXPORT_SYMBOL(__muldi3); |
| 16 | 16 | ||
| 17 | #if !defined(__mc68020__) && !defined(__mc68030__) && \ | 17 | #if defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE) |
| 18 | !defined(__mc68040__) && !defined(__mc68060__) && !defined(__mcpu32__) | ||
| 19 | /* | 18 | /* |
| 20 | * Simpler 68k and ColdFire parts also need a few other gcc functions. | 19 | * Simpler 68k and ColdFire parts also need a few other gcc functions. |
| 21 | */ | 20 | */ |
diff --git a/arch/m68k/kernel/vmlinux.lds_no.S b/arch/m68k/kernel/vmlinux.lds_no.S index f4d715cdca0e..7dc4087a9545 100644 --- a/arch/m68k/kernel/vmlinux.lds_no.S +++ b/arch/m68k/kernel/vmlinux.lds_no.S | |||
| @@ -84,52 +84,52 @@ SECTIONS { | |||
| 84 | /* Kernel symbol table: Normal symbols */ | 84 | /* Kernel symbol table: Normal symbols */ |
| 85 | . = ALIGN(4); | 85 | . = ALIGN(4); |
| 86 | __start___ksymtab = .; | 86 | __start___ksymtab = .; |
| 87 | *(__ksymtab) | 87 | *(SORT(___ksymtab+*)) |
| 88 | __stop___ksymtab = .; | 88 | __stop___ksymtab = .; |
| 89 | 89 | ||
| 90 | /* Kernel symbol table: GPL-only symbols */ | 90 | /* Kernel symbol table: GPL-only symbols */ |
| 91 | __start___ksymtab_gpl = .; | 91 | __start___ksymtab_gpl = .; |
| 92 | *(__ksymtab_gpl) | 92 | *(SORT(___ksymtab_gpl+*)) |
| 93 | __stop___ksymtab_gpl = .; | 93 | __stop___ksymtab_gpl = .; |
| 94 | 94 | ||
| 95 | /* Kernel symbol table: Normal unused symbols */ | 95 | /* Kernel symbol table: Normal unused symbols */ |
| 96 | __start___ksymtab_unused = .; | 96 | __start___ksymtab_unused = .; |
| 97 | *(__ksymtab_unused) | 97 | *(SORT(___ksymtab_unused+*)) |
| 98 | __stop___ksymtab_unused = .; | 98 | __stop___ksymtab_unused = .; |
| 99 | 99 | ||
| 100 | /* Kernel symbol table: GPL-only unused symbols */ | 100 | /* Kernel symbol table: GPL-only unused symbols */ |
| 101 | __start___ksymtab_unused_gpl = .; | 101 | __start___ksymtab_unused_gpl = .; |
| 102 | *(__ksymtab_unused_gpl) | 102 | *(SORT(___ksymtab_unused_gpl+*)) |
| 103 | __stop___ksymtab_unused_gpl = .; | 103 | __stop___ksymtab_unused_gpl = .; |
| 104 | 104 | ||
| 105 | /* Kernel symbol table: GPL-future symbols */ | 105 | /* Kernel symbol table: GPL-future symbols */ |
| 106 | __start___ksymtab_gpl_future = .; | 106 | __start___ksymtab_gpl_future = .; |
| 107 | *(__ksymtab_gpl_future) | 107 | *(SORT(___ksymtab_gpl_future+*)) |
| 108 | __stop___ksymtab_gpl_future = .; | 108 | __stop___ksymtab_gpl_future = .; |
| 109 | 109 | ||
| 110 | /* Kernel symbol table: Normal symbols */ | 110 | /* Kernel symbol table: Normal symbols */ |
| 111 | __start___kcrctab = .; | 111 | __start___kcrctab = .; |
| 112 | *(__kcrctab) | 112 | *(SORT(___kcrctab+*)) |
| 113 | __stop___kcrctab = .; | 113 | __stop___kcrctab = .; |
| 114 | 114 | ||
| 115 | /* Kernel symbol table: GPL-only symbols */ | 115 | /* Kernel symbol table: GPL-only symbols */ |
| 116 | __start___kcrctab_gpl = .; | 116 | __start___kcrctab_gpl = .; |
| 117 | *(__kcrctab_gpl) | 117 | *(SORT(___kcrctab_gpl+*)) |
| 118 | __stop___kcrctab_gpl = .; | 118 | __stop___kcrctab_gpl = .; |
| 119 | 119 | ||
| 120 | /* Kernel symbol table: Normal unused symbols */ | 120 | /* Kernel symbol table: Normal unused symbols */ |
| 121 | __start___kcrctab_unused = .; | 121 | __start___kcrctab_unused = .; |
| 122 | *(__kcrctab_unused) | 122 | *(SORT(___kcrctab_unused+*)) |
| 123 | __stop___kcrctab_unused = .; | 123 | __stop___kcrctab_unused = .; |
| 124 | 124 | ||
| 125 | /* Kernel symbol table: GPL-only unused symbols */ | 125 | /* Kernel symbol table: GPL-only unused symbols */ |
| 126 | __start___kcrctab_unused_gpl = .; | 126 | __start___kcrctab_unused_gpl = .; |
| 127 | *(__kcrctab_unused_gpl) | 127 | *(SORT(___kcrctab_unused_gpl+*)) |
| 128 | __stop___kcrctab_unused_gpl = .; | 128 | __stop___kcrctab_unused_gpl = .; |
| 129 | 129 | ||
| 130 | /* Kernel symbol table: GPL-future symbols */ | 130 | /* Kernel symbol table: GPL-future symbols */ |
| 131 | __start___kcrctab_gpl_future = .; | 131 | __start___kcrctab_gpl_future = .; |
| 132 | *(__kcrctab_gpl_future) | 132 | *(SORT(___kcrctab_gpl_future+*)) |
| 133 | __stop___kcrctab_gpl_future = .; | 133 | __stop___kcrctab_gpl_future = .; |
| 134 | 134 | ||
| 135 | /* Kernel symbol table: strings */ | 135 | /* Kernel symbol table: strings */ |
diff --git a/arch/m68k/lib/memcpy.c b/arch/m68k/lib/memcpy.c index 62182c81e91c..064889316974 100644 --- a/arch/m68k/lib/memcpy.c +++ b/arch/m68k/lib/memcpy.c | |||
| @@ -34,8 +34,10 @@ void *memcpy(void *to, const void *from, size_t n) | |||
| 34 | if (temp) { | 34 | if (temp) { |
| 35 | long *lto = to; | 35 | long *lto = to; |
| 36 | const long *lfrom = from; | 36 | const long *lfrom = from; |
| 37 | #if defined(__mc68020__) || defined(__mc68030__) || \ | 37 | #if defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE) |
| 38 | defined(__mc68040__) || defined(__mc68060__) || defined(__mcpu32__) | 38 | for (; temp; temp--) |
| 39 | *lto++ = *lfrom++; | ||
| 40 | #else | ||
| 39 | asm volatile ( | 41 | asm volatile ( |
| 40 | " movel %2,%3\n" | 42 | " movel %2,%3\n" |
| 41 | " andw #7,%3\n" | 43 | " andw #7,%3\n" |
| @@ -56,9 +58,6 @@ void *memcpy(void *to, const void *from, size_t n) | |||
| 56 | " jpl 4b" | 58 | " jpl 4b" |
| 57 | : "=a" (lfrom), "=a" (lto), "=d" (temp), "=&d" (temp1) | 59 | : "=a" (lfrom), "=a" (lto), "=d" (temp), "=&d" (temp1) |
| 58 | : "0" (lfrom), "1" (lto), "2" (temp)); | 60 | : "0" (lfrom), "1" (lto), "2" (temp)); |
| 59 | #else | ||
| 60 | for (; temp; temp--) | ||
| 61 | *lto++ = *lfrom++; | ||
| 62 | #endif | 61 | #endif |
| 63 | to = lto; | 62 | to = lto; |
| 64 | from = lfrom; | 63 | from = lfrom; |
diff --git a/arch/m68k/lib/memset.c b/arch/m68k/lib/memset.c index f649e6a2e644..8a7639f0a2fe 100644 --- a/arch/m68k/lib/memset.c +++ b/arch/m68k/lib/memset.c | |||
| @@ -32,8 +32,10 @@ void *memset(void *s, int c, size_t count) | |||
| 32 | temp = count >> 2; | 32 | temp = count >> 2; |
| 33 | if (temp) { | 33 | if (temp) { |
| 34 | long *ls = s; | 34 | long *ls = s; |
| 35 | #if defined(__mc68020__) || defined(__mc68030__) || \ | 35 | #if defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE) |
| 36 | defined(__mc68040__) || defined(__mc68060__) || defined(__mcpu32__) | 36 | for (; temp; temp--) |
| 37 | *ls++ = c; | ||
| 38 | #else | ||
| 37 | size_t temp1; | 39 | size_t temp1; |
| 38 | asm volatile ( | 40 | asm volatile ( |
| 39 | " movel %1,%2\n" | 41 | " movel %1,%2\n" |
| @@ -55,9 +57,6 @@ void *memset(void *s, int c, size_t count) | |||
| 55 | " jpl 1b" | 57 | " jpl 1b" |
| 56 | : "=a" (ls), "=d" (temp), "=&d" (temp1) | 58 | : "=a" (ls), "=d" (temp), "=&d" (temp1) |
| 57 | : "d" (c), "0" (ls), "1" (temp)); | 59 | : "d" (c), "0" (ls), "1" (temp)); |
| 58 | #else | ||
| 59 | for (; temp; temp--) | ||
| 60 | *ls++ = c; | ||
| 61 | #endif | 60 | #endif |
| 62 | s = ls; | 61 | s = ls; |
| 63 | } | 62 | } |
diff --git a/arch/m68k/lib/muldi3.c b/arch/m68k/lib/muldi3.c index 079bafca073e..79e928a525d0 100644 --- a/arch/m68k/lib/muldi3.c +++ b/arch/m68k/lib/muldi3.c | |||
| @@ -19,17 +19,7 @@ along with GNU CC; see the file COPYING. If not, write to | |||
| 19 | the Free Software Foundation, 59 Temple Place - Suite 330, | 19 | the Free Software Foundation, 59 Temple Place - Suite 330, |
| 20 | Boston, MA 02111-1307, USA. */ | 20 | Boston, MA 02111-1307, USA. */ |
| 21 | 21 | ||
| 22 | #if defined(__mc68020__) || defined(__mc68030__) || \ | 22 | #if defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE) |
| 23 | defined(__mc68040__) || defined(__mc68060__) || defined(__mcpu32__) | ||
| 24 | |||
| 25 | #define umul_ppmm(w1, w0, u, v) \ | ||
| 26 | __asm__ ("mulu%.l %3,%1:%0" \ | ||
| 27 | : "=d" ((USItype)(w0)), \ | ||
| 28 | "=d" ((USItype)(w1)) \ | ||
| 29 | : "%0" ((USItype)(u)), \ | ||
| 30 | "dmi" ((USItype)(v))) | ||
| 31 | |||
| 32 | #else | ||
| 33 | 23 | ||
| 34 | #define SI_TYPE_SIZE 32 | 24 | #define SI_TYPE_SIZE 32 |
| 35 | #define __BITS4 (SI_TYPE_SIZE / 4) | 25 | #define __BITS4 (SI_TYPE_SIZE / 4) |
| @@ -61,6 +51,15 @@ Boston, MA 02111-1307, USA. */ | |||
| 61 | (w0) = __ll_lowpart (__x1) * __ll_B + __ll_lowpart (__x0); \ | 51 | (w0) = __ll_lowpart (__x1) * __ll_B + __ll_lowpart (__x0); \ |
| 62 | } while (0) | 52 | } while (0) |
| 63 | 53 | ||
| 54 | #else | ||
| 55 | |||
| 56 | #define umul_ppmm(w1, w0, u, v) \ | ||
| 57 | __asm__ ("mulu%.l %3,%1:%0" \ | ||
| 58 | : "=d" ((USItype)(w0)), \ | ||
| 59 | "=d" ((USItype)(w1)) \ | ||
| 60 | : "%0" ((USItype)(u)), \ | ||
| 61 | "dmi" ((USItype)(v))) | ||
| 62 | |||
| 64 | #endif | 63 | #endif |
| 65 | 64 | ||
| 66 | #define __umulsidi3(u, v) \ | 65 | #define __umulsidi3(u, v) \ |
