diff options
| author | Paul Mackerras <paulus@samba.org> | 2002-07-27 14:11:34 +1000 |
|---|---|---|
| committer | Paul Mackerras <paulus@samba.org> | 2002-07-27 14:11:34 +1000 |
| commit | a832c38ba0bff5559ea4de0ceed070f71ab121a3 (patch) | |
| tree | be2e75d8667008607e43bfbfc0f4ddaddf050f39 /arch | |
| parent | 8e70b6f7f899dc4fa10a1c80aa946712447785f4 (diff) | |
| parent | cb4725471471dd98ac904ce42f86a8b1106865d1 (diff) | |
Merge bk://24.221.152.185/linux-2.5-misc
into samba.org:/home/paulus/kernel/for-linus-ppc
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/ppc/boot/common/misc-common.c | 16 | ||||
| -rw-r--r-- | arch/ppc/boot/prep/Makefile | 2 | ||||
| -rw-r--r-- | arch/ppc/boot/prep/misc.c | 8 | ||||
| -rw-r--r-- | arch/ppc/boot/simple/Makefile | 4 | ||||
| -rw-r--r-- | arch/ppc/boot/simple/misc-spruce.c | 2 | ||||
| -rw-r--r-- | arch/ppc/config.in | 4 | ||||
| -rw-r--r-- | arch/ppc/kernel/Makefile | 1 | ||||
| -rw-r--r-- | arch/ppc/kernel/prep_nvram.c (renamed from arch/ppc/platforms/prep_nvram.c) | 9 | ||||
| -rw-r--r-- | arch/ppc/platforms/Makefile | 4 | ||||
| -rw-r--r-- | arch/ppc/platforms/cpc700.h | 4 | ||||
| -rw-r--r-- | arch/ppc/platforms/cpc700_pic.c | 4 | ||||
| -rw-r--r-- | arch/ppc/platforms/lopec_setup.c | 30 | ||||
| -rw-r--r-- | arch/ppc/platforms/pplus_setup.c | 23 | ||||
| -rw-r--r-- | arch/ppc/platforms/spruce_setup.c | 4 |
14 files changed, 86 insertions, 29 deletions
diff --git a/arch/ppc/boot/common/misc-common.c b/arch/ppc/boot/common/misc-common.c index 8feb8e5d672a..56d09ffa4612 100644 --- a/arch/ppc/boot/common/misc-common.c +++ b/arch/ppc/boot/common/misc-common.c @@ -75,7 +75,7 @@ static int _cvt(unsigned long val, char *buf, long radix, char *digits); void _vprintk(void(*putc)(const char), const char *fmt0, va_list ap); unsigned char *ISA_io = NULL; -#if defined(CONFIG_SERIAL_CONSOLE) +#if defined(CONFIG_SERIAL_CONSOLE) || defined(CONFIG_SERIAL_8250_CONSOLE) extern unsigned long com_port; extern int serial_tstc(unsigned long com_port); @@ -96,7 +96,7 @@ void exit(void) int tstc(void) { -#if defined(CONFIG_SERIAL_CONSOLE) +#if defined(CONFIG_SERIAL_CONSOLE) || defined(CONFIG_SERIAL_8250_CONSOLE) if(keyb_present) return (CRT_tstc() || serial_tstc(com_port)); else @@ -109,10 +109,10 @@ int tstc(void) int getc(void) { while (1) { -#if defined(CONFIG_SERIAL_CONSOLE) +#if defined(CONFIG_SERIAL_CONSOLE) || defined(CONFIG_SERIAL_8250_CONSOLE) if (serial_tstc(com_port)) return (serial_getc(com_port)); -#endif /* CONFIG_SERIAL_CONSOLE */ +#endif /* serial console */ if (keyb_present) if(CRT_tstc()) return (CRT_getc()); @@ -124,11 +124,11 @@ putc(const char c) { int x,y; -#if defined(CONFIG_SERIAL_CONSOLE) +#if defined(CONFIG_SERIAL_CONSOLE) || defined(CONFIG_SERIAL_8250_CONSOLE) serial_putc(com_port, c); if ( c == '\n' ) serial_putc(com_port, '\r'); -#endif /* CONFIG_SERIAL_CONSOLE */ +#endif /* serial console */ x = orig_x; y = orig_y; @@ -171,10 +171,10 @@ void puts(const char *s) y = orig_y; while ( ( c = *s++ ) != '\0' ) { -#if defined(CONFIG_SERIAL_CONSOLE) +#if defined(CONFIG_SERIAL_CONSOLE) || defined(CONFIG_SERIAL_8250_CONSOLE) serial_putc(com_port, c); if ( c == '\n' ) serial_putc(com_port, '\r'); -#endif /* CONFIG_SERIAL_CONSOLE */ +#endif /* serial console */ if ( c == '\n' ) { x = 0; diff --git a/arch/ppc/boot/prep/Makefile b/arch/ppc/boot/prep/Makefile index 52b55da1ae19..f01e9dccd835 100644 --- a/arch/ppc/boot/prep/Makefile +++ b/arch/ppc/boot/prep/Makefile @@ -27,7 +27,7 @@ boot-y := head.o ../simple/legacy.o misc.o of1275.o \ OBJCOPY_ARGS = -O elf32-powerpc LIBS = ../lib/zlib.a -boot-$(CONFIG_SERIAL_CONSOLE) += ../common/ns16550.o +boot-$($CONFIG_SERIAL_8250_CONSOLE) += ../common/ns16550.o boot-$(CONFIG_VGA_CONSOLE) += vreset.o kbd.o EXTRA_TARGETS := $(boot-y) diff --git a/arch/ppc/boot/prep/misc.c b/arch/ppc/boot/prep/misc.c index 9c600273f2cd..de62373bd9ba 100644 --- a/arch/ppc/boot/prep/misc.c +++ b/arch/ppc/boot/prep/misc.c @@ -56,9 +56,9 @@ unsigned long orig_MSR; char *zimage_start; int zimage_size; -#if defined(CONFIG_SERIAL_CONSOLE) +#if defined(CONFIG_SERIAL_8250_CONSOLE) unsigned long com_port; -#endif /* CONFIG_SERIAL_CONSOLE */ +#endif /* CONFIG_SERIAL_8250_CONSOLE */ #ifdef CONFIG_VGA_CONSOLE char *vidmem = (char *)0xC00B8000; int lines = 25, cols = 80; @@ -135,9 +135,9 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum, unsigned int pci_viddid, pci_did, tulip_pci_base, tulip_base; serial_fixups(); -#if defined(CONFIG_SERIAL_CONSOLE) +#if defined(CONFIG_SERIAL_8250_CONSOLE) com_port = serial_init(0, NULL); -#endif /* CONFIG_SERIAL_CONSOLE */ +#endif /* CONFIG_SERIAL_8250_CONSOLE */ #if defined(CONFIG_VGA_CONSOLE) vga_init((unsigned char *)0xC0000000); #endif /* CONFIG_VGA_CONSOLE */ diff --git a/arch/ppc/boot/simple/Makefile b/arch/ppc/boot/simple/Makefile index 8428333266f9..1f13aba690e4 100644 --- a/arch/ppc/boot/simple/Makefile +++ b/arch/ppc/boot/simple/Makefile @@ -136,9 +136,9 @@ boot-$(CONFIG_RPXLITE) += iic.o ifeq ($(CONFIG_SERIAL_CONSOLE),y) boot-$(CONFIG_8xx) += m8xx_tty.o boot-$(CONFIG_8260) += m8260_tty.o -boot-$(CONFIG_GT64260_CONSOLE) += gt64260_tty.o -boot-$(CONFIG_SERIAL) += ../common/ns16550.o +boot-$(CONFIG_GT64260_CONSOLE) += gt64260_tty.o endif +boot-$(CONFIG_SERIAL_8250_CONSOLE) += ../common/ns16550.o EXTRA_TARGETS := $(boot-y) LIBS := ../lib/zlib.a diff --git a/arch/ppc/boot/simple/misc-spruce.c b/arch/ppc/boot/simple/misc-spruce.c index 452a4746a3e3..d799d183568d 100644 --- a/arch/ppc/boot/simple/misc-spruce.c +++ b/arch/ppc/boot/simple/misc-spruce.c @@ -189,7 +189,7 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum) unsigned char header_type; unsigned int bar0; -#ifdef CONFIG_SERIAL_CONSOLE +#ifdef CONFIG_SERIAL_8250_CONSOLE /* Initialize the serial console port */ com_port = serial_init(0, NULL); #endif diff --git a/arch/ppc/config.in b/arch/ppc/config.in index 090d2a78afe0..51be510791d0 100644 --- a/arch/ppc/config.in +++ b/arch/ppc/config.in @@ -365,6 +365,10 @@ if [ "$CONFIG_ALL_PPC" = "y" ]; then bool 'Support for RTAS (RunTime Abstraction Services) in /proc' CONFIG_PPC_RTAS bool 'Support for PReP Residual Data' CONFIG_PREP_RESIDUAL dep_bool ' Support for reading of PReP Residual Data in /proc' CONFIG_PROC_PREPRESIDUAL $CONFIG_PREP_RESIDUAL + define_bool CONFIG_PPCBUG_NVRAM y +fi +if [ "$CONFIG_PPLUS" = "y" -o "$CONFIG_LOPEC" = "y" ]; then + bool 'Enable reading PPCBUG NVRAM during boot' CONFIG_PPCBUG_NVRAM fi bool 'Default bootloader kernel arguments' CONFIG_CMDLINE_BOOL diff --git a/arch/ppc/kernel/Makefile b/arch/ppc/kernel/Makefile index 3a8e5d1930b7..0c92373f434f 100644 --- a/arch/ppc/kernel/Makefile +++ b/arch/ppc/kernel/Makefile @@ -35,6 +35,7 @@ obj-$(CONFIG_PCI) += pci.o ifneq ($(CONFIG_PPC_ISERIES),y) obj-$(CONFIG_PCI) += pci-dma.o endif +obj-$(CONFIG_PPCBUG_NVRAM) += prep_nvram.o obj-$(CONFIG_KGDB) += ppc-stub.o obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_TAU) += temp.o diff --git a/arch/ppc/platforms/prep_nvram.c b/arch/ppc/kernel/prep_nvram.c index dad7771bdb2b..7d8c7e7e91e1 100644 --- a/arch/ppc/platforms/prep_nvram.c +++ b/arch/ppc/kernel/prep_nvram.c @@ -2,9 +2,14 @@ * BK Id: %F% %I% %G% %U% %#% */ /* - * arch/ppc/platforms/prep_nvram.c + * arch/ppc/kernel/prep_nvram.c * - * Copyright (C) 1998 Corey Minyard + * Copyright (C) 1998 Corey Minyard + * + * This reads the NvRAM on PReP compliant machines (generally from IBM or + * Motorola). Motorola kept the format of NvRAM in their ROM, PPCBUG, the + * same, long after they had stopped producing PReP compliant machines. So + * this code is useful in those cases as well. * */ #include <linux/init.h> diff --git a/arch/ppc/platforms/Makefile b/arch/ppc/platforms/Makefile index f188e157199a..9fd72e4dfcea 100644 --- a/arch/ppc/platforms/Makefile +++ b/arch/ppc/platforms/Makefile @@ -32,7 +32,7 @@ endif obj-$(CONFIG_ALL_PPC) += pmac_pic.o pmac_setup.o pmac_time.o \ pmac_feature.o pmac_pci.o chrp_setup.o\ chrp_time.o chrp_pci.o prep_pci.o \ - prep_time.o prep_nvram.o prep_setup.o + prep_time.o prep_setup.o ifeq ($(CONFIG_ALL_PPC),y) obj-$(CONFIG_NVRAM) += pmac_nvram.o endif @@ -50,7 +50,7 @@ obj-$(CONFIG_MENF1) += menf1_setup.o menf1_pci.o obj-$(CONFIG_MVME5100) += mvme5100_setup.o mvme5100_pci.o obj-$(CONFIG_PCORE) += pcore_setup.o pcore_pci.o obj-$(CONFIG_POWERPMC250) += powerpmc250.o -obj-$(CONFIG_PPLUS) += pplus_pci.o pplus_setup.o prep_nvram.o +obj-$(CONFIG_PPLUS) += pplus_pci.o pplus_setup.o obj-$(CONFIG_PRPMC750) += prpmc750_setup.o prpmc750_pci.o obj-$(CONFIG_PRPMC800) += prpmc800_setup.o prpmc800_pci.o obj-$(CONFIG_SANDPOINT) += sandpoint_setup.o sandpoint_pci.o diff --git a/arch/ppc/platforms/cpc700.h b/arch/ppc/platforms/cpc700.h index 5e8ede4c7d54..e5706f087f94 100644 --- a/arch/ppc/platforms/cpc700.h +++ b/arch/ppc/platforms/cpc700.h @@ -6,7 +6,7 @@ * Author: Mark A. Greer * mgreer@mvista.com * - * Copyright 2000 MontaVista Software Inc. + * Copyright 2000-2002 MontaVista Software Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -101,7 +101,7 @@ * UIC Exports... */ extern struct hw_interrupt_type cpc700_pic; -extern unsigned int cpc700_irq_assigns[27][2]; +extern unsigned int cpc700_irq_assigns[32][2]; extern void __init cpc700_init_IRQ(void); extern int cpc700_get_irq(struct pt_regs *); diff --git a/arch/ppc/platforms/cpc700_pic.c b/arch/ppc/platforms/cpc700_pic.c index 771b215a8f70..c414c2dec77f 100644 --- a/arch/ppc/platforms/cpc700_pic.c +++ b/arch/ppc/platforms/cpc700_pic.c @@ -8,7 +8,7 @@ * mporter@mvista.com * jpeters@mvista.com * - * Copyright 2001 MontaVista Software Inc. + * Copyright 2001-2002 MontaVista Software Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -168,7 +168,7 @@ cpc700_init_IRQ(void) cpc700_pic_init_irq(i); } - for (i = 20; i < 27; i++) { + for (i = 20; i < 32; i++) { irq_desc[i].handler = &cpc700_pic; cpc700_pic_init_irq(i); } diff --git a/arch/ppc/platforms/lopec_setup.c b/arch/ppc/platforms/lopec_setup.c index 75aff85a5880..4b3ed8d0600e 100644 --- a/arch/ppc/platforms/lopec_setup.c +++ b/arch/ppc/platforms/lopec_setup.c @@ -33,8 +33,15 @@ #include <asm/bootinfo.h> #include <asm/mpc10x.h> #include <asm/hw_irq.h> +#include <asm/prep_nvram.h> +#include <asm/keyboard.h> +extern char saved_command_line[]; extern void lopec_find_bridges(void); +extern int pckbd_translate(unsigned char scancode, unsigned char *keycode, + char raw_mode); +extern char pckbd_unexpected_up(unsigned char keycode); +extern unsigned char pckbd_sysrq_xlate[128]; /* * Define all of the IRQ senses and polarities. Taken from the @@ -333,6 +340,21 @@ lopec_setup_arch(void) #ifdef CONFIG_DUMMY_CONSOLE conswitchp = &dummy_con; #endif +#ifdef CONFIG_PPCBUG_NVRAM + /* Read in NVRAM data */ + init_prep_nvram(); + + /* if no bootargs, look in NVRAM */ + if ( cmd_line[0] == '\0' ) { + char *bootargs; + bootargs = prep_nvram_get_var("bootargs"); + if (bootargs != NULL) { + strcpy(cmd_line, bootargs); + /* again.. */ + strcpy(saved_command_line, cmd_line); + } + } +#endif } void __init @@ -362,6 +384,14 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, ppc_md.find_end_of_memory = lopec_find_end_of_memory; ppc_md.setup_io_mappings = lopec_map_io; +#ifdef CONFIG_VT + ppc_md.kbd_translate = pckbd_translate; + ppc_md.kbd_unexpected_up = pckbd_unexpected_up; +#ifdef CONFIG_MAGIC_SYSRQ + ppc_md.ppc_kbd_sysrq_xlate = pckbd_sysrq_xlate; +#endif /* CONFIG_MAGIC_SYSRQ */ +#endif /* CONFIG_VT */ + ppc_md.time_init = todc_time_init; ppc_md.set_rtc_time = todc_set_rtc_time; ppc_md.get_rtc_time = todc_get_rtc_time; diff --git a/arch/ppc/platforms/pplus_setup.c b/arch/ppc/platforms/pplus_setup.c index 640c6164fbd0..d8203a2c31eb 100644 --- a/arch/ppc/platforms/pplus_setup.c +++ b/arch/ppc/platforms/pplus_setup.c @@ -9,7 +9,7 @@ * Cort Dougan, Johnnie Peters, Matt Porter, and * Troy Benjegerdes. * - * Copyright 2001 MontaVista Software Inc. + * Copyright 2001-2002 MontaVista Software Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -76,8 +76,9 @@ TODC_ALLOC(); -extern void pplus_setup_hose(void); +extern char saved_command_line[]; +extern void pplus_setup_hose(void); extern void pplus_set_VIA_IDE_native(void); extern unsigned long loops_per_jiffy; @@ -131,7 +132,8 @@ pplus_setup_arch(void) ROOT_DEV = Root_SDA2; #endif - printk("PowerPlus port (C) 2001 MontaVista Software, Inc. (source@mvista.com)\n"); + printk(KERN_INFO "Motorola PowerPlus Platform\n"); + printk(KERN_INFO "Port by MontaVista Software, Inc. (source@mvista.com)\n"); if ( ppc_md.progress ) ppc_md.progress("pplus_setup_arch: raven_init\n", 0); @@ -145,6 +147,21 @@ pplus_setup_arch(void) #elif defined(CONFIG_DUMMY_CONSOLE) conswitchp = &dummy_con; #endif +#ifdef CONFIG_PPCBUG_NVRAM + /* Read in NVRAM data */ + init_prep_nvram(); + + /* if no bootargs, look in NVRAM */ + if ( cmd_line[0] == '\0' ) { + char *bootargs; + bootargs = prep_nvram_get_var("bootargs"); + if (bootargs != NULL) { + strcpy(cmd_line, bootargs); + /* again.. */ + strcpy(saved_command_line, cmd_line); + } + } +#endif if ( ppc_md.progress ) ppc_md.progress("pplus_setup_arch: exit\n", 0); } diff --git a/arch/ppc/platforms/spruce_setup.c b/arch/ppc/platforms/spruce_setup.c index d1152dcd231b..644a01933c33 100644 --- a/arch/ppc/platforms/spruce_setup.c +++ b/arch/ppc/platforms/spruce_setup.c @@ -6,7 +6,7 @@ * Authors: Johnnie Peters <jpeters@mvista.com> * Matt Porter <mporter@mvista.com> * - * Copyright 2001 MontaVista Software Inc. + * Copyright 2001-2002 MontaVista Software Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -70,7 +70,7 @@ extern char cmd_line[]; * * First entry is the sensitivity (level/edge), second is the polarity. */ -unsigned int cpc700_irq_assigns[27][2] = { +unsigned int cpc700_irq_assigns[32][2] = { { 1, 1 }, /* IRQ 0: ECC Correctable Error - rising edge */ { 1, 1 }, /* IRQ 1: PCI Write Mem Range - rising edge */ { 0, 1 }, /* IRQ 2: PCI Write Command Reg - active high */ |
