diff options
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/amiga/config.c | 16 | ||||
-rw-r--r-- | arch/m68k/atari/ataints.c | 4 | ||||
-rw-r--r-- | arch/m68k/atari/config.c | 2 | ||||
-rw-r--r-- | arch/m68k/atari/debug.c | 14 | ||||
-rw-r--r-- | arch/m68k/include/asm/atarihw.h | 2 | ||||
-rw-r--r-- | arch/m68k/include/asm/string.h | 16 | ||||
-rw-r--r-- | arch/m68k/lib/string.c | 11 |
7 files changed, 19 insertions, 46 deletions
diff --git a/arch/m68k/amiga/config.c b/arch/m68k/amiga/config.c index b1577f741fa8..82a4bb51d5d8 100644 --- a/arch/m68k/amiga/config.c +++ b/arch/m68k/amiga/config.c | |||
@@ -610,17 +610,17 @@ static void amiga_mem_console_write(struct console *co, const char *s, | |||
610 | 610 | ||
611 | static int __init amiga_savekmsg_setup(char *arg) | 611 | static int __init amiga_savekmsg_setup(char *arg) |
612 | { | 612 | { |
613 | static struct resource debug_res = { .name = "Debug" }; | ||
614 | |||
615 | if (!MACH_IS_AMIGA || strcmp(arg, "mem")) | 613 | if (!MACH_IS_AMIGA || strcmp(arg, "mem")) |
616 | goto done; | 614 | return 0; |
617 | 615 | ||
618 | if (!AMIGAHW_PRESENT(CHIP_RAM)) { | 616 | if (amiga_chip_size < SAVEKMSG_MAXMEM) { |
619 | printk("Warning: no chipram present for debugging\n"); | 617 | pr_err("Not enough chipram for debugging\n"); |
620 | goto done; | 618 | return -ENOMEM; |
621 | } | 619 | } |
622 | 620 | ||
623 | savekmsg = amiga_chip_alloc_res(SAVEKMSG_MAXMEM, &debug_res); | 621 | /* Just steal the block, the chipram allocator isn't functional yet */ |
622 | amiga_chip_size -= SAVEKMSG_MAXMEM; | ||
623 | savekmsg = (void *)ZTWO_VADDR(CHIP_PHYSADDR + amiga_chip_size); | ||
624 | savekmsg->magic1 = SAVEKMSG_MAGIC1; | 624 | savekmsg->magic1 = SAVEKMSG_MAGIC1; |
625 | savekmsg->magic2 = SAVEKMSG_MAGIC2; | 625 | savekmsg->magic2 = SAVEKMSG_MAGIC2; |
626 | savekmsg->magicptr = ZTWO_PADDR(savekmsg); | 626 | savekmsg->magicptr = ZTWO_PADDR(savekmsg); |
@@ -628,8 +628,6 @@ static int __init amiga_savekmsg_setup(char *arg) | |||
628 | 628 | ||
629 | amiga_console_driver.write = amiga_mem_console_write; | 629 | amiga_console_driver.write = amiga_mem_console_write; |
630 | register_console(&amiga_console_driver); | 630 | register_console(&amiga_console_driver); |
631 | |||
632 | done: | ||
633 | return 0; | 631 | return 0; |
634 | } | 632 | } |
635 | 633 | ||
diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c index 39478dd08e67..26a804e67bce 100644 --- a/arch/m68k/atari/ataints.c +++ b/arch/m68k/atari/ataints.c | |||
@@ -388,9 +388,9 @@ void __init atari_init_IRQ(void) | |||
388 | } | 388 | } |
389 | 389 | ||
390 | if (ATARIHW_PRESENT(SCC) && !atari_SCC_reset_done) { | 390 | if (ATARIHW_PRESENT(SCC) && !atari_SCC_reset_done) { |
391 | scc.cha_a_ctrl = 9; | 391 | atari_scc.cha_a_ctrl = 9; |
392 | MFPDELAY(); | 392 | MFPDELAY(); |
393 | scc.cha_a_ctrl = (char) 0xc0; /* hardware reset */ | 393 | atari_scc.cha_a_ctrl = (char) 0xc0; /* hardware reset */ |
394 | } | 394 | } |
395 | 395 | ||
396 | if (ATARIHW_PRESENT(SCU)) { | 396 | if (ATARIHW_PRESENT(SCU)) { |
diff --git a/arch/m68k/atari/config.c b/arch/m68k/atari/config.c index ae2d96e5d618..4203d101363c 100644 --- a/arch/m68k/atari/config.c +++ b/arch/m68k/atari/config.c | |||
@@ -315,7 +315,7 @@ void __init config_atari(void) | |||
315 | ATARIHW_SET(SCC_DMA); | 315 | ATARIHW_SET(SCC_DMA); |
316 | printk("SCC_DMA "); | 316 | printk("SCC_DMA "); |
317 | } | 317 | } |
318 | if (scc_test(&scc.cha_a_ctrl)) { | 318 | if (scc_test(&atari_scc.cha_a_ctrl)) { |
319 | ATARIHW_SET(SCC); | 319 | ATARIHW_SET(SCC); |
320 | printk("SCC "); | 320 | printk("SCC "); |
321 | } | 321 | } |
diff --git a/arch/m68k/atari/debug.c b/arch/m68k/atari/debug.c index 28efdc33c1ae..5a484247e493 100644 --- a/arch/m68k/atari/debug.c +++ b/arch/m68k/atari/debug.c | |||
@@ -53,9 +53,9 @@ static inline void ata_scc_out(char c) | |||
53 | { | 53 | { |
54 | do { | 54 | do { |
55 | MFPDELAY(); | 55 | MFPDELAY(); |
56 | } while (!(scc.cha_b_ctrl & 0x04)); /* wait for tx buf empty */ | 56 | } while (!(atari_scc.cha_b_ctrl & 0x04)); /* wait for tx buf empty */ |
57 | MFPDELAY(); | 57 | MFPDELAY(); |
58 | scc.cha_b_data = c; | 58 | atari_scc.cha_b_data = c; |
59 | } | 59 | } |
60 | 60 | ||
61 | static void atari_scc_console_write(struct console *co, const char *str, | 61 | static void atari_scc_console_write(struct console *co, const char *str, |
@@ -140,9 +140,9 @@ int atari_scc_console_wait_key(struct console *co) | |||
140 | { | 140 | { |
141 | do { | 141 | do { |
142 | MFPDELAY(); | 142 | MFPDELAY(); |
143 | } while (!(scc.cha_b_ctrl & 0x01)); /* wait for rx buf filled */ | 143 | } while (!(atari_scc.cha_b_ctrl & 0x01)); /* wait for rx buf filled */ |
144 | MFPDELAY(); | 144 | MFPDELAY(); |
145 | return scc.cha_b_data; | 145 | return atari_scc.cha_b_data; |
146 | } | 146 | } |
147 | 147 | ||
148 | int atari_midi_console_wait_key(struct console *co) | 148 | int atari_midi_console_wait_key(struct console *co) |
@@ -185,9 +185,9 @@ static void __init atari_init_mfp_port(int cflag) | |||
185 | 185 | ||
186 | #define SCC_WRITE(reg, val) \ | 186 | #define SCC_WRITE(reg, val) \ |
187 | do { \ | 187 | do { \ |
188 | scc.cha_b_ctrl = (reg); \ | 188 | atari_scc.cha_b_ctrl = (reg); \ |
189 | MFPDELAY(); \ | 189 | MFPDELAY(); \ |
190 | scc.cha_b_ctrl = (val); \ | 190 | atari_scc.cha_b_ctrl = (val); \ |
191 | MFPDELAY(); \ | 191 | MFPDELAY(); \ |
192 | } while (0) | 192 | } while (0) |
193 | 193 | ||
@@ -240,7 +240,7 @@ static void __init atari_init_scc_port(int cflag) | |||
240 | reg3 = (cflag & CSIZE) == CS8 ? 0xc0 : 0x40; | 240 | reg3 = (cflag & CSIZE) == CS8 ? 0xc0 : 0x40; |
241 | reg5 = (cflag & CSIZE) == CS8 ? 0x60 : 0x20 | 0x82 /* assert DTR/RTS */; | 241 | reg5 = (cflag & CSIZE) == CS8 ? 0x60 : 0x20 | 0x82 /* assert DTR/RTS */; |
242 | 242 | ||
243 | (void)scc.cha_b_ctrl; /* reset reg pointer */ | 243 | (void)atari_scc.cha_b_ctrl; /* reset reg pointer */ |
244 | SCC_WRITE(9, 0xc0); /* reset */ | 244 | SCC_WRITE(9, 0xc0); /* reset */ |
245 | LONG_DELAY(); /* extra delay after WR9 access */ | 245 | LONG_DELAY(); /* extra delay after WR9 access */ |
246 | SCC_WRITE(4, (cflag & PARENB) ? ((cflag & PARODD) ? 0x01 : 0x03) | 246 | SCC_WRITE(4, (cflag & PARENB) ? ((cflag & PARODD) ? 0x01 : 0x03) |
diff --git a/arch/m68k/include/asm/atarihw.h b/arch/m68k/include/asm/atarihw.h index a714e1aa072a..f51f709bbf30 100644 --- a/arch/m68k/include/asm/atarihw.h +++ b/arch/m68k/include/asm/atarihw.h | |||
@@ -449,7 +449,7 @@ struct SCC | |||
449 | u_char char_dummy3; | 449 | u_char char_dummy3; |
450 | u_char cha_b_data; | 450 | u_char cha_b_data; |
451 | }; | 451 | }; |
452 | # define scc ((*(volatile struct SCC*)SCC_BAS)) | 452 | # define atari_scc ((*(volatile struct SCC*)SCC_BAS)) |
453 | 453 | ||
454 | /* The ESCC (Z85230) in an Atari ST. The channels are reversed! */ | 454 | /* The ESCC (Z85230) in an Atari ST. The channels are reversed! */ |
455 | # define st_escc ((*(volatile struct SCC*)0xfffffa31)) | 455 | # define st_escc ((*(volatile struct SCC*)0xfffffa31)) |
diff --git a/arch/m68k/include/asm/string.h b/arch/m68k/include/asm/string.h index 2936dda938d7..32198454da70 100644 --- a/arch/m68k/include/asm/string.h +++ b/arch/m68k/include/asm/string.h | |||
@@ -81,18 +81,6 @@ static inline char *strncpy(char *dest, const char *src, size_t n) | |||
81 | strcpy(__d + strlen(__d), (s)); \ | 81 | strcpy(__d + strlen(__d), (s)); \ |
82 | }) | 82 | }) |
83 | 83 | ||
84 | #define __HAVE_ARCH_STRCHR | ||
85 | static inline char *strchr(const char *s, int c) | ||
86 | { | ||
87 | char sc, ch = c; | ||
88 | |||
89 | for (; (sc = *s++) != ch; ) { | ||
90 | if (!sc) | ||
91 | return NULL; | ||
92 | } | ||
93 | return (char *)s - 1; | ||
94 | } | ||
95 | |||
96 | #ifndef CONFIG_COLDFIRE | 84 | #ifndef CONFIG_COLDFIRE |
97 | #define __HAVE_ARCH_STRCMP | 85 | #define __HAVE_ARCH_STRCMP |
98 | static inline int strcmp(const char *cs, const char *ct) | 86 | static inline int strcmp(const char *cs, const char *ct) |
@@ -111,14 +99,12 @@ static inline int strcmp(const char *cs, const char *ct) | |||
111 | : "+a" (cs), "+a" (ct), "=d" (res)); | 99 | : "+a" (cs), "+a" (ct), "=d" (res)); |
112 | return res; | 100 | return res; |
113 | } | 101 | } |
102 | #endif /* CONFIG_COLDFIRE */ | ||
114 | 103 | ||
115 | #define __HAVE_ARCH_MEMMOVE | 104 | #define __HAVE_ARCH_MEMMOVE |
116 | extern void *memmove(void *, const void *, __kernel_size_t); | 105 | extern void *memmove(void *, const void *, __kernel_size_t); |
117 | 106 | ||
118 | #define __HAVE_ARCH_MEMCMP | ||
119 | extern int memcmp(const void *, const void *, __kernel_size_t); | ||
120 | #define memcmp(d, s, n) __builtin_memcmp(d, s, n) | 107 | #define memcmp(d, s, n) __builtin_memcmp(d, s, n) |
121 | #endif /* CONFIG_COLDFIRE */ | ||
122 | 108 | ||
123 | #define __HAVE_ARCH_MEMSET | 109 | #define __HAVE_ARCH_MEMSET |
124 | extern void *memset(void *, int, __kernel_size_t); | 110 | extern void *memset(void *, int, __kernel_size_t); |
diff --git a/arch/m68k/lib/string.c b/arch/m68k/lib/string.c index 4253f870e54f..d399c5f25636 100644 --- a/arch/m68k/lib/string.c +++ b/arch/m68k/lib/string.c | |||
@@ -243,14 +243,3 @@ void *memmove(void *dest, const void *src, size_t n) | |||
243 | return xdest; | 243 | return xdest; |
244 | } | 244 | } |
245 | EXPORT_SYMBOL(memmove); | 245 | EXPORT_SYMBOL(memmove); |
246 | |||
247 | int memcmp(const void *cs, const void *ct, size_t count) | ||
248 | { | ||
249 | const unsigned char *su1, *su2; | ||
250 | |||
251 | for (su1 = cs, su2 = ct; count > 0; ++su1, ++su2, count--) | ||
252 | if (*su1 != *su2) | ||
253 | return *su1 < *su2 ? -1 : +1; | ||
254 | return 0; | ||
255 | } | ||
256 | EXPORT_SYMBOL(memcmp); | ||