diff options
Diffstat (limited to 'arch')
25 files changed, 300 insertions, 236 deletions
diff --git a/arch/m68k/Kconfig.debug b/arch/m68k/Kconfig.debug index 22968272124..64776d7ac19 100644 --- a/arch/m68k/Kconfig.debug +++ b/arch/m68k/Kconfig.debug @@ -12,12 +12,17 @@ config BOOTPARAM_STRING config EARLY_PRINTK bool "Early printk" - depends on MVME16x || MAC + depends on !(SUN3 || M68360 || M68000 || COLDFIRE) help Write kernel log output directly to a serial port. + Where implemented, output goes to the framebuffer as well. + PROM console functionality on Sun 3x is not affected by this option. + + Pass "earlyprintk" on the kernel command line to get a + boot console. This is useful for kernel debugging when your machine crashes very - early before the console code is initialized. + early, i.e. before the normal console driver is loaded. You should normally say N here, unless you want to debug such a crash. if !MMU diff --git a/arch/m68k/amiga/amisound.c b/arch/m68k/amiga/amisound.c index 2559eefc6af..90a60d758f8 100644 --- a/arch/m68k/amiga/amisound.c +++ b/arch/m68k/amiga/amisound.c @@ -51,7 +51,7 @@ void __init amiga_init_sound(void) snd_data = amiga_chip_alloc_res(sizeof(sine_data), &beep_res); if (!snd_data) { - printk (KERN_CRIT "amiga init_sound: failed to allocate chipmem\n"); + pr_crit("amiga init_sound: failed to allocate chipmem\n"); return; } memcpy (snd_data, sine_data, sizeof(sine_data)); diff --git a/arch/m68k/amiga/config.c b/arch/m68k/amiga/config.c index 9625b713222..01693df7f2f 100644 --- a/arch/m68k/amiga/config.c +++ b/arch/m68k/amiga/config.c @@ -183,7 +183,7 @@ int __init amiga_parse_bootinfo(const struct bi_record *record) dev->boardaddr = be32_to_cpu(cd->cd_BoardAddr); dev->boardsize = be32_to_cpu(cd->cd_BoardSize); } else - printk("amiga_parse_bootinfo: too many AutoConfig devices\n"); + pr_warn("amiga_parse_bootinfo: too many AutoConfig devices\n"); #endif /* CONFIG_ZORRO */ break; @@ -209,9 +209,9 @@ static void __init amiga_identify(void) memset(&amiga_hw_present, 0, sizeof(amiga_hw_present)); - printk("Amiga hardware found: "); + pr_info("Amiga hardware found: "); if (amiga_model >= AMI_500 && amiga_model <= AMI_DRACO) { - printk("[%s] ", amiga_models[amiga_model-AMI_500]); + pr_cont("[%s] ", amiga_models[amiga_model-AMI_500]); strcat(amiga_model_name, amiga_models[amiga_model-AMI_500]); } @@ -322,7 +322,7 @@ static void __init amiga_identify(void) #define AMIGAHW_ANNOUNCE(name, str) \ if (AMIGAHW_PRESENT(name)) \ - printk(str) + pr_cont(str) AMIGAHW_ANNOUNCE(AMI_VIDEO, "VIDEO "); AMIGAHW_ANNOUNCE(AMI_BLITTER, "BLITTER "); @@ -354,8 +354,8 @@ static void __init amiga_identify(void) AMIGAHW_ANNOUNCE(MAGIC_REKICK, "MAGIC_REKICK "); AMIGAHW_ANNOUNCE(PCMCIA, "PCMCIA "); if (AMIGAHW_PRESENT(ZORRO)) - printk("ZORRO%s ", AMIGAHW_PRESENT(ZORRO3) ? "3" : ""); - printk("\n"); + pr_cont("ZORRO%s ", AMIGAHW_PRESENT(ZORRO3) ? "3" : ""); + pr_cont("\n"); #undef AMIGAHW_ANNOUNCE } @@ -424,7 +424,7 @@ void __init config_amiga(void) if (m68k_memory[i].addr < 16*1024*1024) { if (i == 0) { /* don't cut off the branch we're sitting on */ - printk("Warning: kernel runs in Zorro II memory\n"); + pr_warn("Warning: kernel runs in Zorro II memory\n"); continue; } disabled_z2mem += m68k_memory[i].size; @@ -435,8 +435,8 @@ void __init config_amiga(void) } } if (disabled_z2mem) - printk("%dK of Zorro II memory will not be used as system memory\n", - disabled_z2mem>>10); + pr_info("%dK of Zorro II memory will not be used as system memory\n", + disabled_z2mem>>10); } /* request all RAM */ @@ -475,7 +475,7 @@ static void __init amiga_sched_init(irq_handler_t timer_routine) jiffy_ticks = DIV_ROUND_CLOSEST(amiga_eclock, HZ); if (request_resource(&mb_resources._ciab, &sched_res)) - printk("Cannot allocate ciab.ta{lo,hi}\n"); + pr_warn("Cannot allocate ciab.ta{lo,hi}\n"); ciab.cra &= 0xC0; /* turn off timer A, continuous mode, from Eclk */ ciab.talo = jiffy_ticks % 256; ciab.tahi = jiffy_ticks / 256; diff --git a/arch/m68k/apollo/config.c b/arch/m68k/apollo/config.c index 9268c0f9637..6e62d66c396 100644 --- a/arch/m68k/apollo/config.c +++ b/arch/m68k/apollo/config.c @@ -65,8 +65,8 @@ int __init apollo_parse_bootinfo(const struct bi_record *record) static void __init dn_setup_model(void) { - printk("Apollo hardware found: "); - printk("[%s]\n", apollo_models[apollo_model - APOLLO_DN3000]); + pr_info("Apollo hardware found: [%s]\n", + apollo_models[apollo_model - APOLLO_DN3000]); switch(apollo_model) { case APOLLO_UNKNOWN: @@ -197,8 +197,10 @@ void dn_sched_init(irq_handler_t timer_routine) *(volatile unsigned char *)(pica+1)&=(~8); #if 0 - printk("*(0x10803) %02x\n",*(volatile unsigned char *)(apollo_timer + 0x3)); - printk("*(0x10803) %02x\n",*(volatile unsigned char *)(apollo_timer + 0x3)); + pr_info("*(0x10803) %02x\n", + *(volatile unsigned char *)(apollo_timer + 0x3)); + pr_info("*(0x10803) %02x\n", + *(volatile unsigned char *)(apollo_timer + 0x3)); #endif if (request_irq(IRQ_APOLLO, dn_timer_int, 0, "time", timer_routine)) @@ -236,12 +238,10 @@ int dn_dummy_hwclk(int op, struct rtc_time *t) { } -int dn_dummy_set_clock_mmss(unsigned long nowtime) { - - printk("set_clock_mmss\n"); - - return 0; - +int dn_dummy_set_clock_mmss(unsigned long nowtime) +{ + pr_info("set_clock_mmss\n"); + return 0; } void dn_dummy_reset(void) { diff --git a/arch/m68k/atari/stram.c b/arch/m68k/atari/stram.c index 0810c8d56e5..5f8cb5a234d 100644 --- a/arch/m68k/atari/stram.c +++ b/arch/m68k/atari/stram.c @@ -47,6 +47,7 @@ static struct resource stram_pool = { static unsigned long pool_size = 1024*1024; +static unsigned long stram_virt_offset; static int __init atari_stram_setup(char *arg) { @@ -67,14 +68,12 @@ early_param("stram_pool", atari_stram_setup); void __init atari_stram_init(void) { int i; - void *stram_start; /* * determine whether kernel code resides in ST-RAM * (then ST-RAM is the first memory block at virtual 0x0) */ - stram_start = phys_to_virt(0); - kernel_in_stram = (stram_start == 0); + kernel_in_stram = (m68k_memory[0].addr == 0); for (i = 0; i < m68k_num_memory; ++i) { if (m68k_memory[i].addr == 0) { @@ -89,24 +88,62 @@ void __init atari_stram_init(void) /* * This function is called from setup_arch() to reserve the pages needed for - * ST-RAM management. + * ST-RAM management, if the kernel resides in ST-RAM. */ void __init atari_stram_reserve_pages(void *start_mem) { - /* - * always reserve first page of ST-RAM, the first 2 KiB are - * supervisor-only! - */ - if (!kernel_in_stram) - reserve_bootmem(0, PAGE_SIZE, BOOTMEM_DEFAULT); + if (kernel_in_stram) { + pr_debug("atari_stram pool: kernel in ST-RAM, using alloc_bootmem!\n"); + stram_pool.start = (resource_size_t)alloc_bootmem_low_pages(pool_size); + stram_pool.end = stram_pool.start + pool_size - 1; + request_resource(&iomem_resource, &stram_pool); + stram_virt_offset = 0; + pr_debug("atari_stram pool: size = %lu bytes, resource = %pR\n", + pool_size, &stram_pool); + pr_debug("atari_stram pool: stram_virt_offset = %lx\n", + stram_virt_offset); + } +} - stram_pool.start = (resource_size_t)alloc_bootmem_low_pages(pool_size); - stram_pool.end = stram_pool.start + pool_size - 1; - request_resource(&iomem_resource, &stram_pool); - pr_debug("atari_stram pool: size = %lu bytes, resource = %pR\n", - pool_size, &stram_pool); +/* + * This function is called as arch initcall to reserve the pages needed for + * ST-RAM management, if the kernel does not reside in ST-RAM. + */ +int __init atari_stram_map_pages(void) +{ + if (!kernel_in_stram) { + /* + * Skip page 0, as the fhe first 2 KiB are supervisor-only! + */ + pr_debug("atari_stram pool: kernel not in ST-RAM, using ioremap!\n"); + stram_pool.start = PAGE_SIZE; + stram_pool.end = stram_pool.start + pool_size - 1; + request_resource(&iomem_resource, &stram_pool); + stram_virt_offset = (unsigned long) ioremap(stram_pool.start, + resource_size(&stram_pool)) - stram_pool.start; + pr_debug("atari_stram pool: size = %lu bytes, resource = %pR\n", + pool_size, &stram_pool); + pr_debug("atari_stram pool: stram_virt_offset = %lx\n", + stram_virt_offset); + } + return 0; +} +arch_initcall(atari_stram_map_pages); + + +void *atari_stram_to_virt(unsigned long phys) +{ + return (void *)(phys + stram_virt_offset); +} +EXPORT_SYMBOL(atari_stram_to_virt); + + +unsigned long atari_stram_to_phys(void *virt) +{ + return (unsigned long)(virt - stram_virt_offset); } +EXPORT_SYMBOL(atari_stram_to_phys); void *atari_stram_alloc(unsigned long size, const char *owner) @@ -134,14 +171,14 @@ void *atari_stram_alloc(unsigned long size, const char *owner) } pr_debug("atari_stram_alloc: returning %pR\n", res); - return (void *)res->start; + return atari_stram_to_virt(res->start); } EXPORT_SYMBOL(atari_stram_alloc); void atari_stram_free(void *addr) { - unsigned long start = (unsigned long)addr; + unsigned long start = atari_stram_to_phys(addr); struct resource *res; unsigned long size; diff --git a/arch/m68k/configs/amiga_defconfig b/arch/m68k/configs/amiga_defconfig index 96da4963d14..d7eac833a94 100644 --- a/arch/m68k/configs/amiga_defconfig +++ b/arch/m68k/configs/amiga_defconfig @@ -159,6 +159,7 @@ CONFIG_IP_SET_BITMAP_IP=m CONFIG_IP_SET_BITMAP_IPMAC=m CONFIG_IP_SET_BITMAP_PORT=m CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPMARK=m CONFIG_IP_SET_HASH_IPPORT=m CONFIG_IP_SET_HASH_IPPORTIP=m CONFIG_IP_SET_HASH_IPPORTNET=m @@ -227,6 +228,7 @@ CONFIG_DNS_RESOLVER=y CONFIG_BATMAN_ADV=m CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_NC=y +CONFIG_BATMAN_ADV_MCAST=y CONFIG_NETLINK_DIAG=m CONFIG_NET_MPLS_GSO=m # CONFIG_WIRELESS is not set @@ -279,6 +281,7 @@ CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m CONFIG_DM_THIN_PROVISIONING=m CONFIG_DM_CACHE=m +CONFIG_DM_ERA=m CONFIG_DM_MIRROR=m CONFIG_DM_RAID=m CONFIG_DM_ZERO=m @@ -305,7 +308,6 @@ CONFIG_VETH=m CONFIG_A2065=y CONFIG_ARIADNE=y # CONFIG_NET_VENDOR_ARC is not set -# CONFIG_NET_CADENCE is not set # CONFIG_NET_VENDOR_BROADCOM is not set # CONFIG_NET_VENDOR_CIRRUS is not set # CONFIG_NET_VENDOR_HP is not set @@ -315,6 +317,7 @@ CONFIG_ARIADNE=y CONFIG_HYDRA=y CONFIG_APNE=y CONFIG_ZORRO8390=y +# CONFIG_NET_VENDOR_SAMSUNG is not set # CONFIG_NET_VENDOR_SEEQ is not set # CONFIG_NET_VENDOR_SMSC is not set # CONFIG_NET_VENDOR_STMICRO is not set diff --git a/arch/m68k/configs/apollo_defconfig b/arch/m68k/configs/apollo_defconfig index 1b8739f50cb..650ee75de6c 100644 --- a/arch/m68k/configs/apollo_defconfig +++ b/arch/m68k/configs/apollo_defconfig @@ -157,6 +157,7 @@ CONFIG_IP_SET_BITMAP_IP=m CONFIG_IP_SET_BITMAP_IPMAC=m CONFIG_IP_SET_BITMAP_PORT=m CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPMARK=m CONFIG_IP_SET_HASH_IPPORT=m CONFIG_IP_SET_HASH_IPPORTIP=m CONFIG_IP_SET_HASH_IPPORTNET=m @@ -225,6 +226,7 @@ CONFIG_DNS_RESOLVER=y CONFIG_BATMAN_ADV=m CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_NC=y +CONFIG_BATMAN_ADV_MCAST=y CONFIG_NETLINK_DIAG=m CONFIG_NET_MPLS_GSO=m # CONFIG_WIRELESS is not set @@ -261,6 +263,7 @@ CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m CONFIG_DM_THIN_PROVISIONING=m CONFIG_DM_CACHE=m +CONFIG_DM_ERA=m CONFIG_DM_MIRROR=m CONFIG_DM_RAID=m CONFIG_DM_ZERO=m @@ -284,12 +287,12 @@ CONFIG_NETCONSOLE=m CONFIG_NETCONSOLE_DYNAMIC=y CONFIG_VETH=m # CONFIG_NET_VENDOR_ARC is not set -# CONFIG_NET_CADENCE is not set # CONFIG_NET_VENDOR_BROADCOM is not set # CONFIG_NET_VENDOR_INTEL is not set # CONFIG_NET_VENDOR_MARVELL is not set # CONFIG_NET_VENDOR_MICREL is not set # CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set # CONFIG_NET_VENDOR_SEEQ is not set # CONFIG_NET_VENDOR_STMICRO is not set # CONFIG_NET_VENDOR_VIA is not set diff --git a/arch/m68k/configs/atari_defconfig b/arch/m68k/configs/atari_defconfig index 6ea4e91f0ca..3142e69342f 100644 --- a/arch/m68k/configs/atari_defconfig +++ b/arch/m68k/configs/atari_defconfig @@ -156,6 +156,7 @@ CONFIG_IP_SET_BITMAP_IP=m CONFIG_IP_SET_BITMAP_IPMAC=m CONFIG_IP_SET_BITMAP_PORT=m CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPMARK=m CONFIG_IP_SET_HASH_IPPORT=m CONFIG_IP_SET_HASH_IPPORTIP=m CONFIG_IP_SET_HASH_IPPORTNET=m @@ -224,6 +225,7 @@ CONFIG_DNS_RESOLVER=y CONFIG_BATMAN_ADV=m CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_NC=y +CONFIG_BATMAN_ADV_MCAST=y CONFIG_NETLINK_DIAG=m CONFIG_NET_MPLS_GSO=m # CONFIG_WIRELESS is not set @@ -269,6 +271,7 @@ CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m CONFIG_DM_THIN_PROVISIONING=m CONFIG_DM_CACHE=m +CONFIG_DM_ERA=m CONFIG_DM_MIRROR=m CONFIG_DM_RAID=m CONFIG_DM_ZERO=m @@ -293,11 +296,11 @@ CONFIG_NETCONSOLE_DYNAMIC=y CONFIG_VETH=m CONFIG_ATARILANCE=y # CONFIG_NET_VENDOR_ARC is not set -# CONFIG_NET_CADENCE is not set # CONFIG_NET_VENDOR_BROADCOM is not set # CONFIG_NET_VENDOR_INTEL is not set # CONFIG_NET_VENDOR_MARVELL is not set # CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set # CONFIG_NET_VENDOR_SEEQ is not set # CONFIG_NET_VENDOR_STMICRO is not set # CONFIG_NET_VENDOR_VIA is not set diff --git a/arch/m68k/configs/bvme6000_defconfig b/arch/m68k/configs/bvme6000_defconfig index e5a12739ff2..0daa8a172f3 100644 --- a/arch/m68k/configs/bvme6000_defconfig +++ b/arch/m68k/configs/bvme6000_defconfig @@ -155,6 +155,7 @@ CONFIG_IP_SET_BITMAP_IP=m CONFIG_IP_SET_BITMAP_IPMAC=m CONFIG_IP_SET_BITMAP_PORT=m CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPMARK=m CONFIG_IP_SET_HASH_IPPORT=m CONFIG_IP_SET_HASH_IPPORTIP=m CONFIG_IP_SET_HASH_IPPORTNET=m @@ -223,6 +224,7 @@ CONFIG_DNS_RESOLVER=y CONFIG_BATMAN_ADV=m CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_NC=y +CONFIG_BATMAN_ADV_MCAST=y CONFIG_NETLINK_DIAG=m CONFIG_NET_MPLS_GSO=m # CONFIG_WIRELESS is not set @@ -260,6 +262,7 @@ CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m CONFIG_DM_THIN_PROVISIONING=m CONFIG_DM_CACHE=m +CONFIG_DM_ERA=m CONFIG_DM_MIRROR=m CONFIG_DM_RAID=m CONFIG_DM_ZERO=m @@ -283,12 +286,12 @@ CONFIG_NETCONSOLE=m CONFIG_NETCONSOLE_DYNAMIC=y CONFIG_VETH=m # CONFIG_NET_VENDOR_ARC is not set -# CONFIG_NET_CADENCE is not set # CONFIG_NET_VENDOR_BROADCOM is not set CONFIG_BVME6000_NET=y # CONFIG_NET_VENDOR_MARVELL is not set # CONFIG_NET_VENDOR_MICREL is not set # CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set # CONFIG_NET_VENDOR_SEEQ is not set # CONFIG_NET_VENDOR_STMICRO is not set # CONFIG_NET_VENDOR_VIA is not set diff --git a/arch/m68k/configs/hp300_defconfig b/arch/m68k/configs/hp300_defconfig index 8936d7fb0f0..88af78f7bad 100644 --- a/arch/m68k/configs/hp300_defconfig +++ b/arch/m68k/configs/hp300_defconfig @@ -157,6 +157,7 @@ CONFIG_IP_SET_BITMAP_IP=m CONFIG_IP_SET_BITMAP_IPMAC=m CONFIG_IP_SET_BITMAP_PORT=m CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPMARK=m CONFIG_IP_SET_HASH_IPPORT=m CONFIG_IP_SET_HASH_IPPORTIP=m CONFIG_IP_SET_HASH_IPPORTNET=m @@ -225,6 +226,7 @@ CONFIG_DNS_RESOLVER=y CONFIG_BATMAN_ADV=m CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_NC=y +CONFIG_BATMAN_ADV_MCAST=y CONFIG_NETLINK_DIAG=m CONFIG_NET_MPLS_GSO=m # CONFIG_WIRELESS is not set @@ -261,6 +263,7 @@ CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m CONFIG_DM_THIN_PROVISIONING=m CONFIG_DM_CACHE=m +CONFIG_DM_ERA=m CONFIG_DM_MIRROR=m CONFIG_DM_RAID=m CONFIG_DM_ZERO=m @@ -285,12 +288,12 @@ CONFIG_NETCONSOLE_DYNAMIC=y CONFIG_VETH=m CONFIG_HPLANCE=y # CONFIG_NET_VENDOR_ARC is not set -# CONFIG_NET_CADENCE is not set # CONFIG_NET_VENDOR_BROADCOM is not set # CONFIG_NET_VENDOR_INTEL is not set # CONFIG_NET_VENDOR_MARVELL is not set # CONFIG_NET_VENDOR_MICREL is not set # CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set # CONFIG_NET_VENDOR_SEEQ is not set # CONFIG_NET_VENDOR_STMICRO is not set # CONFIG_NET_VENDOR_VIA is not set diff --git a/arch/m68k/configs/mac_defconfig b/arch/m68k/configs/mac_defconfig index be5342cca25..66f915574a8 100644 --- a/arch/m68k/configs/mac_defconfig +++ b/arch/m68k/configs/mac_defconfig @@ -156,6 +156,7 @@ CONFIG_IP_SET_BITMAP_IP=m CONFIG_IP_SET_BITMAP_IPMAC=m CONFIG_IP_SET_BITMAP_PORT=m CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPMARK=m CONFIG_IP_SET_HASH_IPPORT=m CONFIG_IP_SET_HASH_IPPORTIP=m CONFIG_IP_SET_HASH_IPPORTNET=m @@ -227,6 +228,7 @@ CONFIG_DNS_RESOLVER=y CONFIG_BATMAN_ADV=m CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_NC=y +CONFIG_BATMAN_ADV_MCAST=y CONFIG_NETLINK_DIAG=m CONFIG_NET_MPLS_GSO=m # CONFIG_WIRELESS is not set @@ -270,6 +272,7 @@ CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m CONFIG_DM_THIN_PROVISIONING=m CONFIG_DM_CACHE=m +CONFIG_DM_ERA=m CONFIG_DM_MIRROR=m CONFIG_DM_RAID=m CONFIG_DM_ZERO=m @@ -301,7 +304,6 @@ CONFIG_NETCONSOLE_DYNAMIC=y CONFIG_VETH=m CONFIG_MACMACE=y # CONFIG_NET_VENDOR_ARC is not set -# CONFIG_NET_CADENCE is not set # CONFIG_NET_VENDOR_BROADCOM is not set CONFIG_MAC89x0=y # CONFIG_NET_VENDOR_INTEL is not set @@ -309,6 +311,7 @@ CONFIG_MAC89x0=y # CONFIG_NET_VENDOR_MICREL is not set CONFIG_MACSONIC=y CONFIG_MAC8390=y +# CONFIG_NET_VENDOR_SAMSUNG is not set # CONFIG_NET_VENDOR_SEEQ is not set # CONFIG_NET_VENDOR_SMSC is not set # CONFIG_NET_VENDOR_STMICRO is not set diff --git a/arch/m68k/configs/multi_defconfig b/arch/m68k/configs/multi_defconfig index f27194ade16..5eaa49924fa 100644 --- a/arch/m68k/configs/multi_defconfig +++ b/arch/m68k/configs/multi_defconfig @@ -165,6 +165,7 @@ CONFIG_IP_SET_BITMAP_IP=m CONFIG_IP_SET_BITMAP_IPMAC=m CONFIG_IP_SET_BITMAP_PORT=m CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPMARK=m CONFIG_IP_SET_HASH_IPPORT=m CONFIG_IP_SET_HASH_IPPORTIP=m CONFIG_IP_SET_HASH_IPPORTNET=m @@ -236,6 +237,7 @@ CONFIG_DNS_RESOLVER=y CONFIG_BATMAN_ADV=m CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_NC=y +CONFIG_BATMAN_ADV_MCAST=y CONFIG_NETLINK_DIAG=m CONFIG_NET_MPLS_GSO=m # CONFIG_WIRELESS is not set @@ -302,6 +304,7 @@ CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m CONFIG_DM_THIN_PROVISIONING=m CONFIG_DM_CACHE=m +CONFIG_DM_ERA=m CONFIG_DM_MIRROR=m CONFIG_DM_RAID=m CONFIG_DM_ZERO=m @@ -340,7 +343,6 @@ CONFIG_MVME147_NET=y CONFIG_SUN3LANCE=y CONFIG_MACMACE=y # CONFIG_NET_VENDOR_ARC is not set -# CONFIG_NET_CADENCE is not set # CONFIG_NET_VENDOR_BROADCOM is not set CONFIG_MAC89x0=y # CONFIG_NET_VENDOR_HP is not set @@ -354,6 +356,7 @@ CONFIG_MAC8390=y CONFIG_NE2000=m CONFIG_APNE=y CONFIG_ZORRO8390=y +# CONFIG_NET_VENDOR_SAMSUNG is not set # CONFIG_NET_VENDOR_SEEQ is not set # CONFIG_NET_VENDOR_STMICRO is not set # CONFIG_NET_VENDOR_VIA is not set diff --git a/arch/m68k/configs/mvme147_defconfig b/arch/m68k/configs/mvme147_defconfig index c3887603c1d..324d0b4d835 100644 --- a/arch/m68k/configs/mvme147_defconfig +++ b/arch/m68k/configs/mvme147_defconfig @@ -154,6 +154,7 @@ CONFIG_IP_SET_BITMAP_IP=m CONFIG_IP_SET_BITMAP_IPMAC=m CONFIG_IP_SET_BITMAP_PORT=m CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPMARK=m CONFIG_IP_SET_HASH_IPPORT=m CONFIG_IP_SET_HASH_IPPORTIP=m CONFIG_IP_SET_HASH_IPPORTNET=m @@ -222,6 +223,7 @@ CONFIG_DNS_RESOLVER=y CONFIG_BATMAN_ADV=m CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_NC=y +CONFIG_BATMAN_ADV_MCAST=y CONFIG_NETLINK_DIAG=m CONFIG_NET_MPLS_GSO=m # CONFIG_WIRELESS is not set @@ -259,6 +261,7 @@ CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m CONFIG_DM_THIN_PROVISIONING=m CONFIG_DM_CACHE=m +CONFIG_DM_ERA=m CONFIG_DM_MIRROR=m CONFIG_DM_RAID=m CONFIG_DM_ZERO=m @@ -283,12 +286,12 @@ CONFIG_NETCONSOLE_DYNAMIC=y CONFIG_VETH=m CONFIG_MVME147_NET=y # CONFIG_NET_VENDOR_ARC is not set -# CONFIG_NET_CADENCE is not set # CONFIG_NET_VENDOR_BROADCOM is not set # CONFIG_NET_VENDOR_INTEL is not set # CONFIG_NET_VENDOR_MARVELL is not set # CONFIG_NET_VENDOR_MICREL is not set # CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set # CONFIG_NET_VENDOR_SEEQ is not set # CONFIG_NET_VENDOR_STMICRO is not set # CONFIG_NET_VENDOR_VIA is not set diff --git a/arch/m68k/configs/mvme16x_defconfig b/arch/m68k/configs/mvme16x_defconfig index f7ff784d05a..f0cb4338952 100644 --- a/arch/m68k/configs/mvme16x_defconfig +++ b/arch/m68k/configs/mvme16x_defconfig @@ -155,6 +155,7 @@ CONFIG_IP_SET_BITMAP_IP=m CONFIG_IP_SET_BITMAP_IPMAC=m CONFIG_IP_SET_BITMAP_PORT=m CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPMARK=m CONFIG_IP_SET_HASH_IPPORT=m CONFIG_IP_SET_HASH_IPPORTIP=m CONFIG_IP_SET_HASH_IPPORTNET=m @@ -223,6 +224,7 @@ CONFIG_DNS_RESOLVER=y CONFIG_BATMAN_ADV=m CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_NC=y +CONFIG_BATMAN_ADV_MCAST=y CONFIG_NETLINK_DIAG=m CONFIG_NET_MPLS_GSO=m # CONFIG_WIRELESS is not set @@ -260,6 +262,7 @@ CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m CONFIG_DM_THIN_PROVISIONING=m CONFIG_DM_CACHE=m +CONFIG_DM_ERA=m CONFIG_DM_MIRROR=m CONFIG_DM_RAID=m CONFIG_DM_ZERO=m @@ -283,12 +286,12 @@ CONFIG_NETCONSOLE=m CONFIG_NETCONSOLE_DYNAMIC=y CONFIG_VETH=m # CONFIG_NET_VENDOR_ARC is not set -# CONFIG_NET_CADENCE is not set # CONFIG_NET_VENDOR_BROADCOM is not set CONFIG_MVME16x_NET=y # CONFIG_NET_VENDOR_MARVELL is not set # CONFIG_NET_VENDOR_MICREL is not set # CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set # CONFIG_NET_VENDOR_SEEQ is not set # CONFIG_NET_VENDOR_STMICRO is not set # CONFIG_NET_VENDOR_VIA is not set diff --git a/arch/m68k/configs/q40_defconfig b/arch/m68k/configs/q40_defconfig index f0c72ab037b..d6cf0880c46 100644 --- a/arch/m68k/configs/q40_defconfig +++ b/arch/m68k/configs/q40_defconfig @@ -155,6 +155,7 @@ CONFIG_IP_SET_BITMAP_IP=m CONFIG_IP_SET_BITMAP_IPMAC=m CONFIG_IP_SET_BITMAP_PORT=m CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPMARK=m CONFIG_IP_SET_HASH_IPPORT=m CONFIG_IP_SET_HASH_IPPORTIP=m CONFIG_IP_SET_HASH_IPPORTNET=m @@ -223,6 +224,7 @@ CONFIG_DNS_RESOLVER=y CONFIG_BATMAN_ADV=m CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_NC=y +CONFIG_BATMAN_ADV_MCAST=y CONFIG_NETLINK_DIAG=m CONFIG_NET_MPLS_GSO=m # CONFIG_WIRELESS is not set @@ -266,6 +268,7 @@ CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m CONFIG_DM_THIN_PROVISIONING=m CONFIG_DM_CACHE=m +CONFIG_DM_ERA=m CONFIG_DM_MIRROR=m CONFIG_DM_RAID=m CONFIG_DM_ZERO=m @@ -291,7 +294,6 @@ CONFIG_VETH=m # CONFIG_NET_VENDOR_3COM is not set # CONFIG_NET_VENDOR_AMD is not set # CONFIG_NET_VENDOR_ARC is not set -# CONFIG_NET_CADENCE is not set # CONFIG_NET_VENDOR_BROADCOM is not set # CONFIG_NET_VENDOR_CIRRUS is not set # CONFIG_NET_VENDOR_HP is not set @@ -299,6 +301,7 @@ CONFIG_VETH=m # CONFIG_NET_VENDOR_MARVELL is not set # CONFIG_NET_VENDOR_MICREL is not set CONFIG_NE2000=m +# CONFIG_NET_VENDOR_SAMSUNG is not set # CONFIG_NET_VENDOR_SEEQ is not set # CONFIG_NET_VENDOR_SMSC is not set # CONFIG_NET_VENDOR_STMICRO is not set diff --git a/arch/m68k/configs/sun3_defconfig b/arch/m68k/configs/sun3_defconfig index 7bca0f46452..f4e88d1c747 100644 --- a/arch/m68k/configs/sun3_defconfig +++ b/arch/m68k/configs/sun3_defconfig @@ -152,6 +152,7 @@ CONFIG_IP_SET_BITMAP_IP=m CONFIG_IP_SET_BITMAP_IPMAC=m CONFIG_IP_SET_BITMAP_PORT=m CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPMARK=m CONFIG_IP_SET_HASH_IPPORT=m CONFIG_IP_SET_HASH_IPPORTIP=m CONFIG_IP_SET_HASH_IPPORTNET=m @@ -220,6 +221,7 @@ CONFIG_DNS_RESOLVER=y CONFIG_BATMAN_ADV=m CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_NC=y +CONFIG_BATMAN_ADV_MCAST=y CONFIG_NETLINK_DIAG=m CONFIG_NET_MPLS_GSO=m # CONFIG_WIRELESS is not set @@ -257,6 +259,7 @@ CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m CONFIG_DM_THIN_PROVISIONING=m CONFIG_DM_CACHE=m +CONFIG_DM_ERA=m CONFIG_DM_MIRROR=m CONFIG_DM_RAID=m CONFIG_DM_ZERO=m @@ -281,11 +284,11 @@ CONFIG_NETCONSOLE_DYNAMIC=y CONFIG_VETH=m CONFIG_SUN3LANCE=y # CONFIG_NET_VENDOR_ARC is not set -# CONFIG_NET_CADENCE is not set CONFIG_SUN3_82586=y # CONFIG_NET_VENDOR_MARVELL is not set # CONFIG_NET_VENDOR_MICREL is not set # CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set # CONFIG_NET_VENDOR_SEEQ is not set # CONFIG_NET_VENDOR_STMICRO is not set # CONFIG_NET_VENDOR_SUN is not set diff --git a/arch/m68k/configs/sun3x_defconfig b/arch/m68k/configs/sun3x_defconfig index 317f3e1fec9..49f4032c1ad 100644 --- a/arch/m68k/configs/sun3x_defconfig +++ b/arch/m68k/configs/sun3x_defconfig @@ -152,6 +152,7 @@ CONFIG_IP_SET_BITMAP_IP=m CONFIG_IP_SET_BITMAP_IPMAC=m CONFIG_IP_SET_BITMAP_PORT=m CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPMARK=m CONFIG_IP_SET_HASH_IPPORT=m CONFIG_IP_SET_HASH_IPPORTIP=m CONFIG_IP_SET_HASH_IPPORTNET=m @@ -220,6 +221,7 @@ CONFIG_DNS_RESOLVER=y CONFIG_BATMAN_ADV=m CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_NC=y +CONFIG_BATMAN_ADV_MCAST=y CONFIG_NETLINK_DIAG=m CONFIG_NET_MPLS_GSO=m # CONFIG_WIRELESS is not set @@ -257,6 +259,7 @@ CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m CONFIG_DM_THIN_PROVISIONING=m CONFIG_DM_CACHE=m +CONFIG_DM_ERA=m CONFIG_DM_MIRROR=m CONFIG_DM_RAID=m CONFIG_DM_ZERO=m @@ -281,12 +284,12 @@ CONFIG_NETCONSOLE_DYNAMIC=y CONFIG_VETH=m CONFIG_SUN3LANCE=y # CONFIG_NET_VENDOR_ARC is not set -# CONFIG_NET_CADENCE is not set # CONFIG_NET_VENDOR_BROADCOM is not set # CONFIG_NET_VENDOR_INTEL is not set # CONFIG_NET_VENDOR_MARVELL is not set # CONFIG_NET_VENDOR_MICREL is not set # CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set # CONFIG_NET_VENDOR_SEEQ is not set # CONFIG_NET_VENDOR_STMICRO is not set # CONFIG_NET_VENDOR_VIA is not set diff --git a/arch/m68k/hp300/config.c b/arch/m68k/hp300/config.c index 2e5a787ea11..a9befe65adc 100644 --- a/arch/m68k/hp300/config.c +++ b/arch/m68k/hp300/config.c @@ -87,7 +87,7 @@ int __init hp300_parse_bootinfo(const struct bi_record *record) /* serial port address: ignored here */ break; - default: + default: unknown = 1; } @@ -262,11 +262,12 @@ void __init config_hp300(void) #endif mach_max_dma_address = 0xffffffff; - if (hp300_model >= HP_330 && hp300_model <= HP_433S && hp300_model != HP_350) { - printk(KERN_INFO "Detected HP9000 model %s\n", hp300_models[hp300_model-HP_320]); + if (hp300_model >= HP_330 && hp300_model <= HP_433S && + hp300_model != HP_350) { + pr_info("Detected HP9000 model %s\n", + hp300_models[hp300_model-HP_320]); strcat(hp300_model_name, hp300_models[hp300_model-HP_320]); - } - else { + } else { panic("Unknown HP9000 Model"); } #ifdef CONFIG_SERIAL_8250_CONSOLE diff --git a/arch/m68k/include/asm/atari_stram.h b/arch/m68k/include/asm/atari_stram.h index 62e27598af9..4e771c22d6a 100644 --- a/arch/m68k/include/asm/atari_stram.h +++ b/arch/m68k/include/asm/atari_stram.h @@ -8,6 +8,8 @@ /* public interface */ void *atari_stram_alloc(unsigned long size, const char *owner); void atari_stram_free(void *); +void *atari_stram_to_virt(unsigned long phys); +unsigned long atari_stram_to_phys(void *); /* functions called internally by other parts of the kernel */ void atari_stram_init(void); diff --git a/arch/m68k/kernel/Makefile b/arch/m68k/kernel/Makefile index 2d5d9be1627..e47778f8588 100644 --- a/arch/m68k/kernel/Makefile +++ b/arch/m68k/kernel/Makefile @@ -25,3 +25,5 @@ obj-$(CONFIG_HAS_DMA) += dma.o obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o obj-$(CONFIG_BOOTINFO_PROC) += bootinfo_proc.o +obj-$(CONFIG_EARLY_PRINTK) += early_printk.o + diff --git a/arch/m68k/kernel/early_printk.c b/arch/m68k/kernel/early_printk.c new file mode 100644 index 00000000000..ff9708d7192 --- /dev/null +++ b/arch/m68k/kernel/early_printk.c @@ -0,0 +1,67 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (c) 2014 Finn Thain + */ + +#include <linux/kernel.h> +#include <linux/console.h> +#include <linux/init.h> +#include <linux/string.h> +#include <asm/setup.h> + +extern void mvme16x_cons_write(struct console *co, + const char *str, unsigned count); + +asmlinkage void __init debug_cons_nputs(const char *s, unsigned n); + +static void __ref debug_cons_write(struct console *c, + const char *s, unsigned n) +{ +#if !(defined(CONFIG_SUN3) || defined(CONFIG_M68360) || \ + defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE)) + if (MACH_IS_MVME16x) + mvme16x_cons_write(c, s, n); + else + debug_cons_nputs(s, n); +#endif +} + +static struct console early_console_instance = { + .name = "debug", + .write = debug_cons_write, + .flags = CON_PRINTBUFFER | CON_BOOT, + .index = -1 +}; + +static int __init setup_early_printk(char *buf) +{ + if (early_console || buf) + return 0; + + early_console = &early_console_instance; + register_console(early_console); + + return 0; +} +early_param("earlyprintk", setup_early_printk); + +/* + * debug_cons_nputs() defined in arch/m68k/kernel/head.S cannot be called + * after init sections are discarded (for platforms that use it). + */ +#if !(defined(CONFIG_SUN3) || defined(CONFIG_M68360) || \ + defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE)) + +static int __init unregister_early_console(void) +{ + if (!early_console || MACH_IS_MVME16x) + return 0; + + return unregister_console(early_console); +} +late_initcall(unregister_early_console); + +#endif diff --git a/arch/m68k/kernel/head.S b/arch/m68k/kernel/head.S index 3ab329b8852..dbb118e1a4e 100644 --- a/arch/m68k/kernel/head.S +++ b/arch/m68k/kernel/head.S @@ -153,7 +153,7 @@ * ------------ * The console is also able to be turned off. The console in head.S * is specifically for debugging and can be very useful. It is surrounded by - * #ifdef CONSOLE/#endif clauses so it doesn't have to ship in known-good + * #ifdef / #endif clauses so it doesn't have to ship in known-good * kernels. It's basic algorithm is to determine the size of the screen * (in height/width and bit depth) and then use that information for * displaying an 8x8 font or an 8x16 (widthxheight). I prefer the 8x8 for @@ -198,9 +198,8 @@ * CONFIG_xxx: These are the obvious machine configuration defines created * during configuration. These are defined in autoconf.h. * - * CONSOLE: There is support for head.S console in this file. This - * console can talk to a Mac frame buffer, but could easily be extrapolated - * to extend it to support other platforms. + * CONSOLE_DEBUG: Only supports a Mac frame buffer but could easily be + * extended to support other platforms. * * TEST_MMU: This is a test harness for running on any given machine but * getting an MMU dump for another class of machine. The classes of machines @@ -222,7 +221,7 @@ * MMU_PRINT: There is a routine built into head.S that can display the * MMU data structures. It outputs its result through the serial_putc * interface. So where ever that winds up driving data, that's where the - * mmu struct will appear. On the Macintosh that's typically the console. + * mmu struct will appear. * * SERIAL_DEBUG: There are a series of putc() macro statements * scattered through out the code to give progress of status to the @@ -250,8 +249,8 @@ * USE_MFP: Use the ST-MFP port (Modem1) for serial debug. * * Macintosh constants: - * MAC_USE_SCC_A: Use SCC port A (modem) for serial debug and early console. - * MAC_USE_SCC_B: Use SCC port B (printer) for serial debug and early console. + * MAC_USE_SCC_A: Use SCC port A (modem) for serial debug. + * MAC_USE_SCC_B: Use SCC port B (printer) for serial debug. */ #include <linux/linkage.h> @@ -268,27 +267,17 @@ #include <asm/pgtable.h> #include <asm/page.h> #include <asm/asm-offsets.h> - #ifdef CONFIG_MAC - -#include <asm/machw.h> - -#ifdef CONFIG_FRAMEBUFFER_CONSOLE -#define CONSOLE +# include <asm/machw.h> #endif #ifdef CONFIG_EARLY_PRINTK -#define SERIAL_DEBUG -#else -#undef SERIAL_DEBUG +# define SERIAL_DEBUG +# if defined(CONFIG_MAC) && defined(CONFIG_FONT_SUPPORT) +# define CONSOLE_DEBUG +# endif #endif -#else /* !CONFIG_MAC */ - -#define SERIAL_DEBUG - -#endif /* !CONFIG_MAC */ - #undef MMU_PRINT #undef MMU_NOCACHE_KERNEL #undef DEBUG @@ -303,6 +292,7 @@ .globl kernel_pg_dir .globl availmem +.globl m68k_init_mapped_size .globl m68k_pgtable_cachemode .globl m68k_supervisor_cachemode #ifdef CONFIG_MVME16x @@ -480,22 +470,21 @@ func_define serial_putc,1 func_define console_putc,1 func_define console_init -func_define console_put_stats func_define console_put_penguin func_define console_plot_pixel,3 func_define console_scroll .macro putc ch -#if defined(CONSOLE) || defined(SERIAL_DEBUG) +#if defined(CONSOLE_DEBUG) || defined(SERIAL_DEBUG) pea \ch #endif -#ifdef CONSOLE +#ifdef CONSOLE_DEBUG func_call console_putc #endif #ifdef SERIAL_DEBUG func_call serial_putc #endif -#if defined(CONSOLE) || defined(SERIAL_DEBUG) +#if defined(CONSOLE_DEBUG) || defined(SERIAL_DEBUG) addql #4,%sp #endif .endm @@ -515,7 +504,7 @@ func_define putn,1 .endm .macro puts string -#if defined(CONSOLE) || defined(SERIAL_DEBUG) +#if defined(CONSOLE_DEBUG) || defined(SERIAL_DEBUG) __INITDATA .Lstr\@: .string "\string" @@ -651,11 +640,9 @@ ENTRY(__start) lea %pc@(L(mac_rowbytes)),%a1 movel %a0@,%a1@ -#ifdef SERIAL_DEBUG get_bi_record BI_MAC_SCCBASE lea %pc@(L(mac_sccbase)),%a1 movel %a0@,%a1@ -#endif L(test_notmac): #endif /* CONFIG_MAC */ @@ -885,13 +872,12 @@ L(nothp): */ #ifdef CONFIG_MAC is_not_mac(L(nocon)) -# ifdef CONSOLE +# ifdef CONSOLE_DEBUG console_init # ifdef CONFIG_LOGO console_put_penguin # endif /* CONFIG_LOGO */ - console_put_stats -# endif /* CONSOLE */ +# endif /* CONSOLE_DEBUG */ L(nocon): #endif /* CONFIG_MAC */ @@ -922,10 +908,21 @@ L(nocon): * * This block of code does what's necessary to map in the various kinds * of machines for execution of Linux. - * First map the first 4 MB of kernel code & data + * First map the first 4, 8, or 16 MB of kernel code & data */ - mmu_map #PAGE_OFFSET,%pc@(L(phys_kernel_start)),#4*1024*1024,\ + get_bi_record BI_MEMCHUNK + movel %a0@(4),%d0 + movel #16*1024*1024,%d1 + cmpl %d0,%d1 + jls 1f + lsrl #1,%d1 + cmpl %d0,%d1 + jls 1f + lsrl #1,%d1 +1: + movel %d1,m68k_init_mapped_size + mmu_map #PAGE_OFFSET,%pc@(L(phys_kernel_start)),%d1,\ %pc@(m68k_supervisor_cachemode) putc 'C' @@ -1396,15 +1393,13 @@ L(mmu_fixup_done): andl L(mac_videobase),%d0 addl #VIDEOMEMBASE,%d0 movel %d0,L(mac_videobase) -#if defined(CONSOLE) +#ifdef CONSOLE_DEBUG movel %pc@(L(phys_kernel_start)),%d0 subl #PAGE_OFFSET,%d0 subl %d0,L(console_font) subl %d0,L(console_font_data) #endif -#ifdef SERIAL_DEBUG orl #0x50000000,L(mac_sccbase) -#endif 1: #endif @@ -2734,7 +2729,12 @@ func_return get_new_page */ #ifdef CONFIG_MAC +/* You may define either or both of these. */ +#define MAC_USE_SCC_A /* Modem port */ +#define MAC_USE_SCC_B /* Printer port */ +#if defined(MAC_USE_SCC_A) || defined(MAC_USE_SCC_B) +/* Initialisation table for SCC with 3.6864 MHz PCLK */ L(scc_initable_mac): .byte 4,0x44 /* x16, 1 stopbit, no parity */ .byte 3,0xc0 /* receiver: 8 bpc */ @@ -2748,6 +2748,7 @@ L(scc_initable_mac): .byte -1 .even #endif +#endif /* CONFIG_MAC */ #ifdef CONFIG_ATARI /* #define USE_PRINTER */ @@ -2756,14 +2757,12 @@ L(scc_initable_mac): #define USE_MFP #if defined(USE_SCC_A) || defined(USE_SCC_B) -#define USE_SCC -/* Initialisation table for SCC */ -L(scc_initable): - .byte 9,12 /* Reset */ +/* Initialisation table for SCC with 7.9872 MHz PCLK */ +/* PCLK == 8.0539 gives baud == 9680.1 */ +L(scc_initable_atari): .byte 4,0x44 /* x16, 1 stopbit, no parity */ .byte 3,0xc0 /* receiver: 8 bpc */ .byte 5,0xe2 /* transmitter: 8 bpc, assert dtr/rts */ - .byte 9,0 /* no interrupts */ .byte 10,0 /* NRZ */ .byte 11,0x50 /* use baud rate generator */ .byte 12,24,13,0 /* 9600 baud */ @@ -2812,7 +2811,7 @@ LMFP_UDR = 0xfffa2f */ /* - * Initialize serial port hardware for 9600/8/1 + * Initialize serial port hardware */ func_start serial_init,%d0/%d1/%a0/%a1 /* @@ -2822,7 +2821,7 @@ func_start serial_init,%d0/%d1/%a0/%a1 * d0 = boot info offset * CONFIG_ATARI * a0 = address of SCC - * a1 = Liobase address/address of scc_initable + * a1 = Liobase address/address of scc_initable_atari * d0 = init data for serial port * CONFIG_MAC * a0 = address of SCC @@ -2843,6 +2842,7 @@ func_start serial_init,%d0/%d1/%a0/%a1 | movew #61,CUSTOMBASE+C_SERPER-ZTWOBASE 1: #endif + #ifdef CONFIG_ATARI is_not_atari(4f) movel %pc@(L(iobase)),%a1 @@ -2857,9 +2857,21 @@ func_start serial_init,%d0/%d1/%a0/%a1 moveb %a1@(LPSG_READ),%d0 bset #5,%d0 moveb %d0,%a1@(LPSG_WRITE) -#elif defined(USE_SCC) +#elif defined(USE_SCC_A) || defined(USE_SCC_B) lea %a1@(LSCC_CTRL),%a0 - lea %pc@(L(scc_initable)),%a1 + /* Reset SCC register pointer */ + moveb %a0@,%d0 + /* Reset SCC device: write register pointer then register value */ + moveb #9,%a0@ + moveb #0xc0,%a0@ + /* Wait for 5 PCLK cycles, which is about 63 CPU cycles */ + /* 5 / 7.9872 MHz = approx. 0.63 us = 63 / 100 MHz */ + movel #32,%d0 +2: + subq #1,%d0 + jne 2b + /* Initialize channel */ + lea %pc@(L(scc_initable_atari)),%a1 2: moveb %a1@+,%d0 jmi 3f moveb %d0,%a0@ @@ -2877,21 +2889,14 @@ func_start serial_init,%d0/%d1/%a0/%a1 jra L(serial_init_done) 4: #endif + #ifdef CONFIG_MAC is_not_mac(L(serial_init_not_mac)) - -#ifdef SERIAL_DEBUG - -/* You may define either or both of these. */ -#define MAC_USE_SCC_A /* Modem port */ -#define MAC_USE_SCC_B /* Printer port */ - +#if defined(MAC_USE_SCC_A) || defined(MAC_USE_SCC_B) #define mac_scc_cha_b_ctrl_offset 0x0 #define mac_scc_cha_a_ctrl_offset 0x2 #define mac_scc_cha_b_data_offset 0x4 #define mac_scc_cha_a_data_offset 0x6 - -#if defined(MAC_USE_SCC_A) || defined(MAC_USE_SCC_B) movel %pc@(L(mac_sccbase)),%a0 /* Reset SCC register pointer */ moveb %a0@(mac_scc_cha_a_ctrl_offset),%d0 @@ -2905,7 +2910,6 @@ func_start serial_init,%d0/%d1/%a0/%a1 subq #1,%d0 jne 5b #endif - #ifdef MAC_USE_SCC_A /* Initialize channel A */ lea %pc@(L(scc_initable_mac)),%a1 @@ -2916,7 +2920,6 @@ func_start serial_init,%d0/%d1/%a0/%a1 jra 5b 6: #endif /* MAC_USE_SCC_A */ - #ifdef MAC_USE_SCC_B /* Initialize channel B */ lea %pc@(L(scc_initable_mac)),%a1 @@ -2927,9 +2930,6 @@ func_start serial_init,%d0/%d1/%a0/%a1 jra 7b 8: #endif /* MAC_USE_SCC_B */ - -#endif /* SERIAL_DEBUG */ - jra L(serial_init_done) L(serial_init_not_mac): #endif /* CONFIG_MAC */ @@ -2959,6 +2959,15 @@ L(serial_init_not_mac): 2: #endif +#ifdef CONFIG_MVME16x + is_not_mvme16x(L(serial_init_not_mvme16x)) + moveb #0x10,M167_PCSCCMICR + moveb #0x10,M167_PCSCCTICR + moveb #0x10,M167_PCSCCRICR + jra L(serial_init_done) +L(serial_init_not_mvme16x): +#endif + #ifdef CONFIG_APOLLO /* We count on the PROM initializing SIO1 */ #endif @@ -2998,27 +3007,19 @@ func_start serial_putc,%d0/%d1/%a0/%a1 #ifdef CONFIG_MAC is_not_mac(5f) - -#ifdef SERIAL_DEBUG - #if defined(MAC_USE_SCC_A) || defined(MAC_USE_SCC_B) movel %pc@(L(mac_sccbase)),%a1 #endif - #ifdef MAC_USE_SCC_A 3: btst #2,%a1@(mac_scc_cha_a_ctrl_offset) jeq 3b moveb %d0,%a1@(mac_scc_cha_a_data_offset) #endif /* MAC_USE_SCC_A */ - #ifdef MAC_USE_SCC_B 4: btst #2,%a1@(mac_scc_cha_b_ctrl_offset) jeq 4b moveb %d0,%a1@(mac_scc_cha_b_data_offset) #endif /* MAC_USE_SCC_B */ - -#endif /* SERIAL_DEBUG */ - jra L(serial_putc_done) 5: #endif /* CONFIG_MAC */ @@ -3039,7 +3040,7 @@ func_start serial_putc,%d0/%d1/%a0/%a1 nop bset #5,%d0 moveb %d0,%a1@(LPSG_WRITE) -#elif defined(USE_SCC) +#elif defined(USE_SCC_A) || defined(USE_SCC_B) 3: btst #2,%a1@(LSCC_CTRL) jeq 3b moveb %d0,%a1@(LSCC_DATA) @@ -3195,7 +3196,7 @@ func_start puts,%d0/%a0 movel ARG1,%a0 jra 2f 1: -#ifdef CONSOLE +#ifdef CONSOLE_DEBUG console_putc %d0 #endif #ifdef SERIAL_DEBUG @@ -3224,7 +3225,7 @@ func_start putn,%d0-%d2 jls 2f addb #'A'-('9'+1),%d2 2: -#ifdef CONSOLE +#ifdef CONSOLE_DEBUG console_putc %d2 #endif #ifdef SERIAL_DEBUG @@ -3234,21 +3235,19 @@ func_start putn,%d0-%d2 func_return putn -#ifdef CONFIG_MAC +#ifdef CONFIG_EARLY_PRINTK /* - * mac_early_print - * * This routine takes its parameters on the stack. It then * turns around and calls the internal routines. This routine * is used by the boot console. * * The calling parameters are: - * void mac_early_print(const char *str, unsigned length); + * void debug_cons_nputs(const char *str, unsigned length) * * This routine does NOT understand variable arguments only * simple strings! */ -ENTRY(mac_early_print) +ENTRY(debug_cons_nputs) moveml %d0/%d1/%a0,%sp@- movew %sr,%sp@- ori #0x0700,%sr @@ -3256,7 +3255,7 @@ ENTRY(mac_early_print) movel %sp@(22),%d1 /* fetch parameter */ jra 2f 1: -#ifdef CONSOLE +#ifdef CONSOLE_DEBUG console_putc %d0 #endif #ifdef SERIAL_DEBUG @@ -3270,7 +3269,7 @@ ENTRY(mac_early_print) movew %sp@+,%sr moveml %sp@+,%d0/%d1/%a0 rts -#endif /* CONFIG_MAC */ +#endif /* CONFIG_EARLY_PRINTK */ #if defined(CONFIG_HP300) || defined(CONFIG_APOLLO) func_start set_leds,%d0/%a0 @@ -3292,7 +3291,7 @@ func_start set_leds,%d0/%a0 func_return set_leds #endif -#ifdef CONSOLE +#ifdef CONSOLE_DEBUG /* * For continuity, see the data alignment * to which this structure is tied. @@ -3396,43 +3395,6 @@ L(console_clear_loop): 1: func_return console_init -func_start console_put_stats,%a0/%d7 - /* - * Some of the register usage that follows - * a0 = pointer to boot_info - * d7 = value of boot_info fields - */ - puts "\nMacLinux\n" - -#ifdef SERIAL_DEBUG - puts "\n vidaddr:" - putn %pc@(L(mac_videobase)) /* video addr. */ - - puts "\n _stext:" - lea %pc@(_stext),%a0 - putn %a0 - - puts "\nbootinfo:" - lea %pc@(_end),%a0 - putn %a0 - - puts "\n cpuid:" - putn %pc@(L(cputype)) - -# ifdef CONFIG_MAC - puts "\n sccbase:" - putn %pc@(L(mac_sccbase)) -# endif -# ifdef MMU_PRINT - putc '\n' - jbsr mmu_print_machine_cpu_types -# endif -#endif /* SERIAL_DEBUG */ - - putc '\n' - -func_return console_put_stats - #ifdef CONFIG_LOGO func_start console_put_penguin,%a0-%a1/%d0-%d7 /* @@ -3774,12 +3736,15 @@ L(white_16): L(console_plot_pixel_exit): func_return console_plot_pixel -#endif /* CONSOLE */ +#endif /* CONSOLE_DEBUG */ __INITDATA .align 4 +m68k_init_mapped_size: + .long 0 + #if defined(CONFIG_ATARI) || defined(CONFIG_AMIGA) || \ defined(CONFIG_HP300) || defined(CONFIG_APOLLO) L(custom): @@ -3787,7 +3752,7 @@ L(iobase): .long 0 #endif -#if defined(CONSOLE) +#ifdef CONSOLE_DEBUG L(console_globals): .long 0 /* cursor column */ .long 0 /* cursor row */ @@ -3798,7 +3763,7 @@ L(console_font): .long 0 /* pointer to console font (struct font_desc) */ L(console_font_data): .long 0 /* pointer to console font data */ -#endif /* CONSOLE */ +#endif /* CONSOLE_DEBUG */ #if defined(MMU_PRINT) L(mmu_print_data): @@ -3838,7 +3803,9 @@ M167_CYIER = 0xfff45011 M167_CYLICR = 0xfff45026 M167_CYTEOIR = 0xfff45085 M167_CYTDR = 0xfff450f8 +M167_PCSCCMICR = 0xfff4201d M167_PCSCCTICR = 0xfff4201e +M167_PCSCCRICR = 0xfff4201f M167_PCTPIACKR = 0xfff42025 #endif @@ -3856,10 +3823,8 @@ L(mac_dimensions): .long 0 L(mac_rowbytes): .long 0 -#ifdef SERIAL_DEBUG L(mac_sccbase): .long 0 -#endif #endif /* CONFIG_MAC */ #if defined (CONFIG_APOLLO) diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c index 982c3fe73c4..a471eab1a4d 100644 --- a/arch/m68k/mac/config.c +++ b/arch/m68k/mac/config.c @@ -71,31 +71,6 @@ static void mac_get_model(char *str); static void mac_identify(void); static void mac_report_hardware(void); -#ifdef CONFIG_EARLY_PRINTK -asmlinkage void __init mac_early_print(const char *s, unsigned n); - -static void __init mac_early_cons_write(struct console *con, - const char *s, unsigned n) -{ - mac_early_print(s, n); -} - -static struct console __initdata mac_early_cons = { - .name = "early", - .write = mac_early_cons_write, - .flags = CON_PRINTBUFFER | CON_BOOT, - .index = -1 -}; - -int __init mac_unregister_early_cons(void) -{ - /* mac_early_print can't be used after init sections are discarded */ - return unregister_console(&mac_early_cons); -} - -late_initcall(mac_unregister_early_cons); -#endif - static void __init mac_sched_init(irq_handler_t vector) { via_init_clock(vector); @@ -190,10 +165,6 @@ void __init config_mac(void) mach_beep = mac_mksound; #endif -#ifdef CONFIG_EARLY_PRINTK - register_console(&mac_early_cons); -#endif - /* * Determine hardware present */ diff --git a/arch/m68k/mm/motorola.c b/arch/m68k/mm/motorola.c index 7d402443216..b958916e5ea 100644 --- a/arch/m68k/mm/motorola.c +++ b/arch/m68k/mm/motorola.c @@ -45,7 +45,7 @@ EXPORT_SYMBOL(mm_cachebits); #endif /* size of memory already mapped in head.S */ -#define INIT_MAPPED_SIZE (4UL<<20) +extern __initdata unsigned long m68k_init_mapped_size; extern unsigned long availmem; @@ -271,10 +271,12 @@ void __init paging_init(void) */ addr = m68k_memory[0].addr; size = m68k_memory[0].size; - free_bootmem_node(NODE_DATA(0), availmem, min(INIT_MAPPED_SIZE, size) - (availmem - addr)); + free_bootmem_node(NODE_DATA(0), availmem, + min(m68k_init_mapped_size, size) - (availmem - addr)); map_node(0); - if (size > INIT_MAPPED_SIZE) - free_bootmem_node(NODE_DATA(0), addr + INIT_MAPPED_SIZE, size - INIT_MAPPED_SIZE); + if (size > m68k_init_mapped_size) + free_bootmem_node(NODE_DATA(0), addr + m68k_init_mapped_size, + size - m68k_init_mapped_size); for (i = 1; i < m68k_num_memory; i++) map_node(i); diff --git a/arch/m68k/mvme16x/config.c b/arch/m68k/mvme16x/config.c index eab7d342757..a53803cc66c 100644 --- a/arch/m68k/mvme16x/config.c +++ b/arch/m68k/mvme16x/config.c @@ -213,7 +213,7 @@ static void __init mvme16x_init_IRQ (void) #define CySCRH (0x22) #define CyTFTC (0x80) -static void cons_write(struct console *co, const char *str, unsigned count) +void mvme16x_cons_write(struct console *co, const char *str, unsigned count) { volatile unsigned char *base_addr = (u_char *)CD2401_ADDR; volatile u_char sink; @@ -268,20 +268,6 @@ static void cons_write(struct console *co, const char *str, unsigned count) base_addr[CyIER] = ier; } -static struct console cons_info = -{ - .name = "sercon", - .write = cons_write, - .flags = CON_PRINTBUFFER | CON_BOOT, - .index = -1, -}; - -static void __init mvme16x_early_console(void) -{ - register_console(&cons_info); - - printk(KERN_INFO "MVME16x: early console registered\n"); -} #endif void __init config_mvme16x(void) @@ -336,16 +322,6 @@ void __init config_mvme16x(void) else { mvme16x_config = MVME16x_CONFIG_GOT_LP | MVME16x_CONFIG_GOT_CD2401; - - /* Dont allow any interrupts from the CD2401 until the interrupt */ - /* handlers are installed */ - - pcc2chip[PccSCCMICR] = 0x10; - pcc2chip[PccSCCTICR] = 0x10; - pcc2chip[PccSCCRICR] = 0x10; -#ifdef CONFIG_EARLY_PRINTK - mvme16x_early_console(); -#endif } } |