Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/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()
  • Loading branch information
Linus Torvalds committed Jan 25, 2011
2 parents 8348ad7 + 5df1abd commit 01ed875
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 32 deletions.
16 changes: 7 additions & 9 deletions arch/m68k/amiga/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -610,26 +610,24 @@ static void amiga_mem_console_write(struct console *co, const char *s,

static int __init amiga_savekmsg_setup(char *arg)
{
static struct resource debug_res = { .name = "Debug" };

if (!MACH_IS_AMIGA || strcmp(arg, "mem"))
goto done;
return 0;

if (!AMIGAHW_PRESENT(CHIP_RAM)) {
printk("Warning: no chipram present for debugging\n");
goto done;
if (amiga_chip_size < SAVEKMSG_MAXMEM) {
pr_err("Not enough chipram for debugging\n");
return -ENOMEM;
}

savekmsg = amiga_chip_alloc_res(SAVEKMSG_MAXMEM, &debug_res);
/* Just steal the block, the chipram allocator isn't functional yet */
amiga_chip_size -= SAVEKMSG_MAXMEM;
savekmsg = (void *)ZTWO_VADDR(CHIP_PHYSADDR + amiga_chip_size);
savekmsg->magic1 = SAVEKMSG_MAGIC1;
savekmsg->magic2 = SAVEKMSG_MAGIC2;
savekmsg->magicptr = ZTWO_PADDR(savekmsg);
savekmsg->size = 0;

amiga_console_driver.write = amiga_mem_console_write;
register_console(&amiga_console_driver);

done:
return 0;
}

Expand Down
4 changes: 2 additions & 2 deletions arch/m68k/atari/ataints.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,9 @@ void __init atari_init_IRQ(void)
}

if (ATARIHW_PRESENT(SCC) && !atari_SCC_reset_done) {
scc.cha_a_ctrl = 9;
atari_scc.cha_a_ctrl = 9;
MFPDELAY();
scc.cha_a_ctrl = (char) 0xc0; /* hardware reset */
atari_scc.cha_a_ctrl = (char) 0xc0; /* hardware reset */
}

if (ATARIHW_PRESENT(SCU)) {
Expand Down
2 changes: 1 addition & 1 deletion arch/m68k/atari/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ void __init config_atari(void)
ATARIHW_SET(SCC_DMA);
printk("SCC_DMA ");
}
if (scc_test(&scc.cha_a_ctrl)) {
if (scc_test(&atari_scc.cha_a_ctrl)) {
ATARIHW_SET(SCC);
printk("SCC ");
}
Expand Down
14 changes: 7 additions & 7 deletions arch/m68k/atari/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ static inline void ata_scc_out(char c)
{
do {
MFPDELAY();
} while (!(scc.cha_b_ctrl & 0x04)); /* wait for tx buf empty */
} while (!(atari_scc.cha_b_ctrl & 0x04)); /* wait for tx buf empty */
MFPDELAY();
scc.cha_b_data = c;
atari_scc.cha_b_data = c;
}

static void atari_scc_console_write(struct console *co, const char *str,
Expand Down Expand Up @@ -140,9 +140,9 @@ int atari_scc_console_wait_key(struct console *co)
{
do {
MFPDELAY();
} while (!(scc.cha_b_ctrl & 0x01)); /* wait for rx buf filled */
} while (!(atari_scc.cha_b_ctrl & 0x01)); /* wait for rx buf filled */
MFPDELAY();
return scc.cha_b_data;
return atari_scc.cha_b_data;
}

int atari_midi_console_wait_key(struct console *co)
Expand Down Expand Up @@ -185,9 +185,9 @@ static void __init atari_init_mfp_port(int cflag)

#define SCC_WRITE(reg, val) \
do { \
scc.cha_b_ctrl = (reg); \
atari_scc.cha_b_ctrl = (reg); \
MFPDELAY(); \
scc.cha_b_ctrl = (val); \
atari_scc.cha_b_ctrl = (val); \
MFPDELAY(); \
} while (0)

Expand Down Expand Up @@ -240,7 +240,7 @@ static void __init atari_init_scc_port(int cflag)
reg3 = (cflag & CSIZE) == CS8 ? 0xc0 : 0x40;
reg5 = (cflag & CSIZE) == CS8 ? 0x60 : 0x20 | 0x82 /* assert DTR/RTS */;

(void)scc.cha_b_ctrl; /* reset reg pointer */
(void)atari_scc.cha_b_ctrl; /* reset reg pointer */
SCC_WRITE(9, 0xc0); /* reset */
LONG_DELAY(); /* extra delay after WR9 access */
SCC_WRITE(4, (cflag & PARENB) ? ((cflag & PARODD) ? 0x01 : 0x03)
Expand Down
2 changes: 1 addition & 1 deletion arch/m68k/include/asm/atarihw.h
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ struct SCC
u_char char_dummy3;
u_char cha_b_data;
};
# define scc ((*(volatile struct SCC*)SCC_BAS))
# define atari_scc ((*(volatile struct SCC*)SCC_BAS))

/* The ESCC (Z85230) in an Atari ST. The channels are reversed! */
# define st_escc ((*(volatile struct SCC*)0xfffffa31))
Expand Down
12 changes: 0 additions & 12 deletions arch/m68k/include/asm/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,6 @@ static inline char *strncpy(char *dest, const char *src, size_t n)
strcpy(__d + strlen(__d), (s)); \
})

#define __HAVE_ARCH_STRCHR
static inline char *strchr(const char *s, int c)
{
char sc, ch = c;

for (; (sc = *s++) != ch; ) {
if (!sc)
return NULL;
}
return (char *)s - 1;
}

#ifndef CONFIG_COLDFIRE
#define __HAVE_ARCH_STRCMP
static inline int strcmp(const char *cs, const char *ct)
Expand Down

0 comments on commit 01ed875

Please sign in to comment.