diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-03-23 02:25:38 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-03-23 02:25:38 +0000 |
commit | 16b5d462f73eb29d1f67fa01cc1ea66afdc72569 (patch) | |
tree | 5407bd573f4840e473ea27cbe61e5c7a07131fcd /arch/arm/kernel | |
parent | ce8a076e11e7e5ee36007f9a3eee5bb3744cb8f6 (diff) |
Merge with Linux 2.3.99-pre2.
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/arch.c | 89 | ||||
-rw-r--r-- | arch/arm/kernel/bios32.c | 69 | ||||
-rw-r--r-- | arch/arm/kernel/bios32.h | 24 | ||||
-rw-r--r-- | arch/arm/kernel/dec21285.c | 30 | ||||
-rw-r--r-- | arch/arm/kernel/hw-footbridge.c | 4 | ||||
-rw-r--r-- | arch/arm/kernel/process.c | 20 |
6 files changed, 179 insertions, 57 deletions
diff --git a/arch/arm/kernel/arch.c b/arch/arm/kernel/arch.c index 8645497ae..536e614ff 100644 --- a/arch/arm/kernel/arch.c +++ b/arch/arm/kernel/arch.c @@ -192,6 +192,7 @@ fixup_sa1100(struct machine_desc *desc, struct param_struct *params, * in head-armv.S. */ static struct machine_desc machine_desc[] __attribute__ ((__section__ (".arch.info"))) = { +#ifdef CONFIG_ARCH_EBSA110 { MACH_TYPE_EBSA110, "EBSA110", /* RMK */ @@ -199,119 +200,160 @@ static struct machine_desc machine_desc[] __attribute__ ((__section__ (".arch.in NO_VIDEO, 1, 0, 1, 1, 1, NULL - }, { + }, +#endif +#ifdef CONFIG_ARCH_RPC + { MACH_TYPE_RISCPC, "Acorn-RiscPC", /* RMK */ 0x10000100, NO_VIDEO, 1, 1, 0, 0, 0, fixup_acorn - }, { - 2, - "unknown", - NO_PARAMS, - NO_VIDEO, - 0, 0, 0, 0, 0, - NULL - }, { + }, +#endif +#ifdef CONFIG_ARCH_NEXUSPCI + { MACH_TYPE_NEXUSPCI, "FTV/PCI", /* Philip Blundell */ NO_PARAMS, NO_VIDEO, 0, 0, 0, 0, 0, NULL - }, { + }, +#endif +#ifdef CONFIG_ARCH_EBSA285 + { MACH_TYPE_EBSA285, "EBSA285", /* RMK */ 0x00000100, 0x000a0000, 0x000bffff, 0, 0, 0, 0, 0, fixup_ebsa285 - }, { + }, +#endif +#ifdef CONFIG_ARCH_NETWINDER + { MACH_TYPE_NETWINDER, "Rebel-NetWinder", /* RMK */ 0x00000100, 0x000a0000, 0x000bffff, 1, 0, 1, 0, 0, fixup_netwinder - }, { + }, +#endif +#ifdef CONFIG_ARCH_CATS + { MACH_TYPE_CATS, "Chalice-CATS", /* Philip Blundell */ NO_PARAMS, 0x000a0000, 0x000bffff, 0, 0, 0, 0, 1, fixup_cats - }, { + }, +#endif +#ifdef CONFIG_ARCH_TBOX + { MACH_TYPE_TBOX, "unknown-TBOX", /* Philip Blundell */ NO_PARAMS, NO_VIDEO, 0, 0, 0, 0, 0, NULL - }, { + }, +#endif +#ifdef CONFIG_ARCH_CO285 + { MACH_TYPE_CO285, "co-EBSA285", /* Mark van Doesburg */ NO_PARAMS, NO_VIDEO, 0, 0, 0, 0, 0, fixup_coebsa285 - }, { + }, +#endif +#ifdef CONFIG_ARCH_CLPS7110 + { MACH_TYPE_CLPS7110, "CL-PS7110", /* Werner Almesberger */ NO_PARAMS, NO_VIDEO, 0, 0, 0, 0, 0, NULL - }, { + }, +#endif +#ifdef CONFIG_ARCH_ARC + { MACH_TYPE_ARCHIMEDES, "Acorn-Archimedes",/* RMK/DAG */ 0x0207c000, NO_VIDEO, 0, 0, 0, 0, 0, fixup_acorn - }, { + }, +#endif +#ifdef CONFIG_ARCH_A5K + { MACH_TYPE_A5K, "Acorn-A5000", /* RMK/PB */ 0x0207c000, NO_VIDEO, 0, 0, 0, 0, 0, fixup_acorn - }, { + }, +#endif +#ifdef CONFIG_ARCH_ETOILE + { MACH_TYPE_ETOILE, "Etoile", /* Alex de Vries */ NO_PARAMS, NO_VIDEO, 0, 0, 0, 0, 0, NULL - }, { + }, +#endif +#ifdef CONFIG_ARCH_LACIE_NAS + { MACH_TYPE_LACIE_NAS, "LaCie_NAS", /* Benjamin Herrenschmidt */ NO_PARAMS, NO_VIDEO, 0, 0, 0, 0, 0, NULL - }, { + }, +#endif +#ifdef CONFIG_ARCH_CLPS7500 + { MACH_TYPE_CLPS7500, "CL-PS7500", /* Philip Blundell */ NO_PARAMS, NO_VIDEO, 0, 0, 0, 0, 0, NULL - }, { + }, +#endif +#ifdef CONFIG_ARCH_SHARK + { MACH_TYPE_SHARK, "Shark", /* Alexander Schulz */ NO_PARAMS, 0x06000000, 0x06000000+0x001fffff, 0, 0, 0, 0, 0, NULL - }, { + }, +#endif +#ifdef CONFIG_ARCH_SA1100 + { MACH_TYPE_SA1100, "SA1100-based", /* Nicolas Pitre */ NO_PARAMS, NO_VIDEO, 0, 0, 0, 0, 0, fixup_sa1100 - }, { + }, +#endif +#ifdef CONFIG_ARCH_PERSONAL_SERVER + { MACH_TYPE_PERSONAL_SERVER, "Compaq Personal Server", NO_PARAMS, @@ -319,4 +361,5 @@ static struct machine_desc machine_desc[] __attribute__ ((__section__ (".arch.in 0, 0, 0, 0, 0, NULL } +#endif }; diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index 1b0a064d0..109e2f96d 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c @@ -164,7 +164,52 @@ void __init pcibios_update_irq(struct pci_dev *dev, int irq) void __init pcibios_fixup_bus(struct pci_bus *bus) { struct list_head *walk = &bus->devices; + struct arm_pci_sysdata *sysdata = + (struct arm_pci_sysdata *)bus->sysdata; + struct arm_bus_sysdata *busdata; + if (bus->number < MAX_NR_BUS) + busdata = sysdata->bus + bus->number; + else + BUG(); + + /* + * Walk the devices on this bus, working out what we can + * and can't support. + */ + for (walk = walk->next; walk != &bus->devices; walk = walk->next) { + struct pci_dev *dev = pci_dev_b(walk); + u16 status; + + pci_read_config_word(dev, PCI_STATUS, &status); + + /* + * If this device does not support fast back to back + * transfers, the bus as a whole cannot support them. + */ + if (!(status & PCI_STATUS_FAST_BACK)) + busdata->features &= ~PCI_COMMAND_FAST_BACK; + + /* + * Calculate the maximum devsel latency. + */ + if (busdata->maxdevsel < (status & PCI_STATUS_DEVSEL_MASK)) + busdata->maxdevsel = (status & PCI_STATUS_DEVSEL_MASK); + + /* + * If this device is an ISA bridge, set the have_isa_bridge + * flag. We will then go looking for things like keyboard, + * etc + */ + if (dev->class >> 8 == PCI_CLASS_BRIDGE_ISA || + dev->class >> 8 == PCI_CLASS_BRIDGE_EISA) + have_isa_bridge = !0; + } + + /* + * Now walk the devices again, this time setting them up. + */ + walk = &bus->devices; for (walk = walk->next; walk != &bus->devices; walk = walk->next) { struct pci_dev *dev = pci_dev_b(walk); u16 cmd; @@ -182,25 +227,15 @@ void __init pcibios_fixup_bus(struct pci_bus *bus) pci_write_config_dword(dev, 0x40, 0x80000000); /* - * If this device is an ISA bridge, set the have_isa_bridge - * flag. We will then go looking for things like keyboard, - * etc - */ - if (dev->class >> 8 == PCI_CLASS_BRIDGE_ISA || - dev->class >> 8 == PCI_CLASS_BRIDGE_EISA) - have_isa_bridge = !0; - - /* * Set latency timer to 32, and a cache line size to 32 bytes. - * Also, set system error enable, parity error enable, and - * fast back to back transaction enable. Disable ROM. + * Also, set system error enable, parity error enable. + * Disable ROM. */ pci_write_config_byte(dev, PCI_LATENCY_TIMER, 32); pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, 8); pci_read_config_word(dev, PCI_COMMAND, &cmd); - cmd |= PCI_COMMAND_FAST_BACK | PCI_COMMAND_SERR | - PCI_COMMAND_PARITY; + cmd |= busdata->features; pci_write_config_word(dev, PCI_COMMAND, cmd); pci_read_config_word(dev, PCI_COMMAND, &cmd); @@ -254,7 +289,7 @@ static struct hw_pci ebsa285_pci __initdata = { }; #endif -#ifdef CONFIG_CATS +#ifdef CONFIG_ARCH_CATS /* cats host-specific stuff */ static int irqmap_cats[] __initdata = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 }; @@ -323,7 +358,7 @@ static struct hw_pci netwinder_pci __initdata = { }; #endif -#ifdef CONFIG_PERSONAL_SERVER +#ifdef CONFIG_ARCH_PERSONAL_SERVER static int irqmap_personal_server[] __initdata = { IRQ_IN0, IRQ_IN1, IRQ_IN2, IRQ_IN3, 0, 0, 0, IRQ_DOORBELLHOST, IRQ_DMA1, IRQ_DMA2, IRQ_PCI @@ -399,7 +434,7 @@ void __init pcibios_init(void) break; } #endif -#ifdef CONFIG_CATS +#ifdef CONFIG_ARCH_CATS if (machine_is_cats()) { hw_pci = &cats_pci; break; @@ -411,7 +446,7 @@ void __init pcibios_init(void) break; } #endif -#ifdef CONFIG_PERSONAL_SERVER +#ifdef CONFIG_ARCH_PERSONAL_SERVER if (machine_is_personal_server()) { hw_pci = &personal_server_pci; break; diff --git a/arch/arm/kernel/bios32.h b/arch/arm/kernel/bios32.h index 9a4380732..525af165b 100644 --- a/arch/arm/kernel/bios32.h +++ b/arch/arm/kernel/bios32.h @@ -1,9 +1,27 @@ +#define MAX_NR_BUS 2 + +struct arm_bus_sysdata { + /* + * bitmask of features we can turn. + * See PCI command register for more info. + */ + u16 features; + /* + * Maximum devsel for this bus. + */ + u16 maxdevsel; +}; + +struct arm_pci_sysdata { + struct arm_bus_sysdata bus[MAX_NR_BUS]; +}; + struct hw_pci { - void (*init)(void); + void (*init)(void); unsigned long io_start; unsigned long mem_start; - u8 (*swizzle)(struct pci_dev *dev, u8 *pin); - int (*map_irq)(struct pci_dev *dev, u8 slot, u8 pin); + u8 (*swizzle)(struct pci_dev *dev, u8 *pin); + int (*map_irq)(struct pci_dev *dev, u8 slot, u8 pin); }; void __init dc21285_init(void); diff --git a/arch/arm/kernel/dec21285.c b/arch/arm/kernel/dec21285.c index 6158e995a..64c5861f0 100644 --- a/arch/arm/kernel/dec21285.c +++ b/arch/arm/kernel/dec21285.c @@ -206,8 +206,11 @@ static struct irqaction dc21285_error_action = { void __init dc21285_init(void) { static struct resource csrmem, csrio; - unsigned int mem_size; + struct arm_pci_sysdata sysdata; unsigned long cntl; + unsigned int mem_size, pci_cmd = PCI_COMMAND_IO | PCI_COMMAND_MEMORY | + PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE; + int i; mem_size = (unsigned int)high_memory - PAGE_OFFSET; *CSR_SDRAMBASEMASK = (mem_size - 1) & 0x0ffc0000; @@ -240,25 +243,34 @@ void __init dc21285_init(void) *CSR_PCICSRIOBASE = csrio.start; *CSR_PCISDRAMBASE = virt_to_bus((void *)PAGE_OFFSET); *CSR_PCIROMBASE = 0; - *CSR_PCICMD = PCI_COMMAND_IO | PCI_COMMAND_MEMORY | - PCI_COMMAND_MASTER | PCI_COMMAND_FAST_BACK | - PCI_COMMAND_INVALIDATE | PCI_COMMAND_PARITY | + *CSR_PCICMD = pci_cmd | (1 << 31) | (1 << 29) | (1 << 28) | (1 << 24); #endif printk(KERN_DEBUG "PCI: DC21285 footbridge, revision %02lX\n", *CSR_CLASSREV & 0xff); - pci_scan_bus(0, &dc21285_ops, NULL); + for (i = 0; i < MAX_NR_BUS; i++) { + sysdata.bus[i].features = PCI_COMMAND_FAST_BACK | + PCI_COMMAND_SERR | + PCI_COMMAND_PARITY; + sysdata.bus[i].maxdevsel = PCI_STATUS_DEVSEL_FAST; + } + + pci_scan_bus(0, &dc21285_ops, &sysdata); + + pci_cmd |= sysdata.bus[0].features; + + printk("Fast back to back PCI transfers %sabled\n", + (sysdata.bus[0].features & PCI_COMMAND_FAST_BACK) ? "en" : "dis"); /* * Clear any existing errors - we aren't * interested in historical data... */ - cntl = *CSR_SA110_CNTL & 0xffffde07; - *CSR_SA110_CNTL = cntl | SA110_CNTL_RXSERR; - cntl = *CSR_PCICMD & 0x0000ffff; - *CSR_PCICMD = cntl | 1 << 31 | 1 << 29 | 1 << 28 | 1 << 24; + cntl = *CSR_SA110_CNTL & 0xffffde07; + *CSR_SA110_CNTL = cntl | SA110_CNTL_RXSERR; + *CSR_PCICMD = pci_cmd | 1 << 31 | 1 << 29 | 1 << 28 | 1 << 24; /* * Initialise PCI error IRQ after we've finished probing diff --git a/arch/arm/kernel/hw-footbridge.c b/arch/arm/kernel/hw-footbridge.c index 8dcad0b93..f47e169c5 100644 --- a/arch/arm/kernel/hw-footbridge.c +++ b/arch/arm/kernel/hw-footbridge.c @@ -613,7 +613,7 @@ EXPORT_SYMBOL(cpld_modify); /* * CATS stuff */ -#ifdef CONFIG_CATS +#ifdef CONFIG_ARCH_CATS #define CONFIG_PORT 0x370 #define INDEX_PORT (CONFIG_PORT) @@ -698,7 +698,7 @@ void __init hw_init(void) #endif } #endif -#ifdef CONFIG_CATS +#ifdef CONFIG_ARCH_CATS if (machine_is_cats()) cats_hw_init(); #endif diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 46afd5938..6ea7916ef 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c @@ -1,7 +1,7 @@ /* * linux/arch/arm/kernel/process.c * - * Copyright (C) 1996-1999 Russell King - Converted to ARM. + * Copyright (C) 1996-2000 Russell King - Converted to ARM. * Origional Copyright (C) 1995 Linus Torvalds */ @@ -32,6 +32,7 @@ #include <asm/io.h> extern char *processor_modes[]; +extern void setup_mm_for_reboot(char mode); asmlinkage void ret_from_sys_call(void) __asm__("ret_from_sys_call"); @@ -96,15 +97,28 @@ __setup("reboot=", reboot_setup); void machine_restart(char * __unused) { /* - * Turn off caches, interrupts, etc + * Clean and disable cache, and turn off interrupts */ cpu_proc_fin(); + /* + * Tell the mm system that we are going to reboot - + * we may need it to insert some 1:1 mappings so that + * soft boot works. + */ + setup_mm_for_reboot(reboot_mode); + + /* + * Now call the architecture specific reboot code. + */ arch_reset(reboot_mode); + /* + * Whoops - the architecture was unable to reboot. + * Tell the user! + */ mdelay(1000); printk("Reboot failed -- System halted\n"); - cli(); while (1); } |