diff options
Diffstat (limited to 'arch/m68k/amiga/config.c')
-rw-r--r-- | arch/m68k/amiga/config.c | 16 |
1 files changed, 7 insertions, 9 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 | ||