Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232386
b: refs/heads/master
c: 5df1abd
h: refs/heads/master
v: v3
  • Loading branch information
Geert Uytterhoeven committed Jan 23, 2011
1 parent 45e5557 commit 4d37678
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: de339e4b792aed799bec23251e83f594ac44ae04
refs/heads/master: 5df1abdbd37af2ae317a1c5b5944173284dc55d6
16 changes: 7 additions & 9 deletions trunk/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

0 comments on commit 4d37678

Please sign in to comment.