aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-25 18:02:55 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-25 18:02:55 -0500
commit01ed875a12eacd5ece370b20ccf8f51543feb172 (patch)
treef999e0050439dc8e958351f43ec0545191a2a206 /arch
parent8348ad7c178627a302d579906096108b02052730 (diff)
parent5df1abdbd37af2ae317a1c5b5944173284dc55d6 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k/amiga: Fix "debug=mem" m68k/atari: Rename "scc" to "atari_scc" m68k: Uninline strchr()
Diffstat (limited to 'arch')
-rw-r--r--arch/m68k/amiga/config.c16
-rw-r--r--arch/m68k/atari/ataints.c4
-rw-r--r--arch/m68k/atari/config.c2
-rw-r--r--arch/m68k/atari/debug.c14
-rw-r--r--arch/m68k/include/asm/atarihw.h2
-rw-r--r--arch/m68k/include/asm/string.h12
6 files changed, 18 insertions, 32 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
611static int __init amiga_savekmsg_setup(char *arg) 611static 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
632done:
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
61static void atari_scc_console_write(struct console *co, const char *str, 61static 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
148int atari_midi_console_wait_key(struct console *co) 148int 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..65b131282837 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
85static 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
98static inline int strcmp(const char *cs, const char *ct) 86static inline int strcmp(const char *cs, const char *ct)