diff options
| author | Pete Zaitcev <zaitcev@redhat.com> | 2002-09-09 15:22:31 -0700 |
|---|---|---|
| committer | David S. Miller <davem@nuts.ninka.net> | 2002-09-09 15:22:31 -0700 |
| commit | 23340580cfd6dcdbd6a28a1b4ed4e554cfc27c17 (patch) | |
| tree | 25e4c1128c111650020b222e481d2f7e30e0781c /arch | |
| parent | 68ea0492bcf0b25ca2c5145f407c35a7d1590803 (diff) | |
[SPARC] sparc 2.5.x again
- Little woops in the new PCI configuration routines
- Removal of last CONFIG_SUN_SERIAL occurances
- sunzilog initialized itself even if obio is not present,
also remove pointless goto
- sunru oopsed outright trying to use iobase
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/sparc/kernel/pcic.c | 6 | ||||
| -rw-r--r-- | arch/sparc/kernel/setup.c | 61 | ||||
| -rw-r--r-- | arch/sparc64/kernel/setup.c | 29 | ||||
| -rw-r--r-- | arch/sparc64/mm/init.c | 8 |
4 files changed, 32 insertions, 72 deletions
diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c index ba3367612e62..d8b395c823de 100644 --- a/arch/sparc/kernel/pcic.c +++ b/arch/sparc/kernel/pcic.c @@ -248,7 +248,7 @@ static int pcic_read_config(struct pci_bus *bus, unsigned int devfn, return 0; case 4: if (where&3) return -EINVAL; - pcic_read_config_dword(bus->number, devfn, where&~3, &v); + pcic_read_config_dword(bus->number, devfn, where&~3, val); return 0; } return -EINVAL; @@ -425,7 +425,7 @@ static void __init pcic_pbm_scan_bus(struct linux_pcic *pcic) /* * Main entry point from the PCI subsystem. */ -static int __init pcibios_init(void) +static int __init pcic_init(void) { struct linux_pcic *pcic; @@ -1030,4 +1030,4 @@ void insl(unsigned long addr, void *dst, unsigned long count) { #endif -subsys_initcall(pcibios_init); +subsys_initcall(pcic_init); diff --git a/arch/sparc/kernel/setup.c b/arch/sparc/kernel/setup.c index e269ade03702..e5eb2a20d63c 100644 --- a/arch/sparc/kernel/setup.c +++ b/arch/sparc/kernel/setup.c @@ -339,40 +339,38 @@ void __init setup_arch(char **cmdline_p) prom_setsync(prom_sync_me); - { -#if !CONFIG_SUN_SERIAL - serial_console = 0; +#ifndef CONFIG_SERIAL_CONSOLE /* Not CONFIG_SERIAL_SUNCORE: to be gone. */ + serial_console = 0; #else - switch (console_fb) { - case 0: /* Let get our io devices from prom */ - { - int idev = prom_query_input_device(); - int odev = prom_query_output_device(); - if (idev == PROMDEV_IKBD && odev == PROMDEV_OSCREEN) { - serial_console = 0; - } else if (idev == PROMDEV_ITTYA && odev == PROMDEV_OTTYA) { - serial_console = 1; - } else if (idev == PROMDEV_ITTYB && odev == PROMDEV_OTTYB) { - serial_console = 2; - } else if (idev == PROMDEV_I_UNK && odev == PROMDEV_OTTYA) { - prom_printf("MrCoffee ttya\n"); - serial_console = 1; - } else if (idev == PROMDEV_I_UNK && odev == PROMDEV_OSCREEN) { - serial_console = 0; - prom_printf("MrCoffee keyboard\n"); - } else { - prom_printf("Inconsistent or unknown console\n"); - prom_printf("You cannot mix serial and non serial input/output devices\n"); - prom_halt(); - } + switch (console_fb) { + case 0: /* Let get our io devices from prom */ + { + int idev = prom_query_input_device(); + int odev = prom_query_output_device(); + if (idev == PROMDEV_IKBD && odev == PROMDEV_OSCREEN) { + serial_console = 0; + } else if (idev == PROMDEV_ITTYA && odev == PROMDEV_OTTYA) { + serial_console = 1; + } else if (idev == PROMDEV_ITTYB && odev == PROMDEV_OTTYB) { + serial_console = 2; + } else if (idev == PROMDEV_I_UNK && odev == PROMDEV_OTTYA) { + prom_printf("MrCoffee ttya\n"); + serial_console = 1; + } else if (idev == PROMDEV_I_UNK && odev == PROMDEV_OSCREEN) { + serial_console = 0; + prom_printf("MrCoffee keyboard\n"); + } else { + prom_printf("Inconsistent or unknown console\n"); + prom_printf("You cannot mix serial and non serial input/output devices\n"); + prom_halt(); } - break; - case 1: serial_console = 0; break; /* Force one of the framebuffers as console */ - case 2: serial_console = 1; break; /* Force ttya as console */ - case 3: serial_console = 2; break; /* Force ttyb as console */ } -#endif + break; + case 1: serial_console = 0; break; /* Force one of the framebuffers as console */ + case 2: serial_console = 1; break; /* Force ttya as console */ + case 3: serial_console = 2; break; /* Force ttyb as console */ } +#endif if((boot_flags&BOOTME_DEBUG) && (linux_dbvec!=0) && ((*(short *)linux_dbvec) != -1)) { @@ -383,9 +381,6 @@ void __init setup_arch(char **cmdline_p) init_mm.context = (unsigned long) NO_CONTEXT; init_task.thread.kregs = &fake_swapper_regs; - if (serial_console) - conswitchp = NULL; - paging_init(); } diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c index 2841993cd2a2..c6a4e8309ca8 100644 --- a/arch/sparc64/kernel/setup.c +++ b/arch/sparc64/kernel/setup.c @@ -314,12 +314,9 @@ int prom_callback(long *args) return 0; } -extern void rs_kgdb_hook(int tty_num); /* sparc/serial.c */ - unsigned int boot_flags = 0; #define BOOTME_DEBUG 0x1 #define BOOTME_SINGLE 0x2 -#define BOOTME_KGDB 0x4 static int console_fb __initdata = 0; @@ -389,26 +386,6 @@ static void __init boot_flags_init(char *commands) commands++; while (*commands && *commands != ' ') process_switch(*commands++); - } else if (strlen(commands) >= 9 - && !strncmp(commands, "kgdb=tty", 8)) { - boot_flags |= BOOTME_KGDB; - switch (commands[8]) { -#ifdef CONFIG_SUN_SERIAL - case 'a': - rs_kgdb_hook(0); - prom_printf("KGDB: Using serial line /dev/ttya.\n"); - break; - case 'b': - rs_kgdb_hook(1); - prom_printf("KGDB: Using serial line /dev/ttyb.\n"); - break; -#endif - default: - printk("KGDB: Unknown tty line.\n"); - boot_flags &= ~BOOTME_KGDB; - break; - } - commands += 9; } else { if (!strncmp(commands, "console=", 8)) { commands += 8; @@ -567,7 +544,6 @@ void __init setup_arch(char **cmdline_p) } #endif -#ifdef CONFIG_SUN_SERIAL switch (console_fb) { case 0: /* Let's get our io devices from prom */ { @@ -596,10 +572,7 @@ void __init setup_arch(char **cmdline_p) case 3: /* Force ttyb as console */ serial_console = 2; break; - } -#else - serial_console = 0; -#endif + }; if (serial_console) conswitchp = NULL; diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index 68d33e579009..b3233175628b 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c @@ -1515,14 +1515,6 @@ void __init paging_init(void) pages_avail = 0; last_valid_pfn = end_pfn = bootmem_init(&pages_avail); -#ifdef CONFIG_SUN_SERIAL - /* This does not logically belong here, but we need to - * call it at the moment we are able to use the bootmem - * allocator. - */ - sun_serial_setup(); -#endif - /* Inherit non-locked OBP mappings. */ inherit_prom_mappings(); |
