From: Franz S. <fs...@us...> - 2002-01-27 22:22:59
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/ppc/kernel In directory usw-pr-cvs1:/tmp/cvs-serv26410/linux/arch/ppc/kernel Modified Files: chrp_setup.c pmac_setup.c prep_setup.c Log Message: Sync PPC stuff with linux-dj. Index: chrp_setup.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/ppc/kernel/chrp_setup.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- chrp_setup.c 2001/12/26 17:28:11 1.4 +++ chrp_setup.c 2002/01/27 22:22:56 1.5 @@ -1,5 +1,5 @@ /* - * BK Id: SCCS/s.chrp_setup.c 1.38 11/13/01 21:26:07 paulus + * BK Id: SCCS/s.chrp_setup.c 1.40 12/19/01 09:45:54 trini */ /* * linux/arch/ppc/kernel/setup.c @@ -69,9 +69,12 @@ void rtas_display_progress(char *, unsigned short); void rtas_indicator_progress(char *, unsigned short); void btext_progress(char *, unsigned short); + extern unsigned long pmac_find_end_of_memory(void); +extern int of_show_percpuinfo(struct seq_file *, int); extern kdev_t boot_dev; + extern PTE *Hash, *Hash_end; extern unsigned long Hash_size, Hash_mask; extern int probingmem; @@ -350,7 +353,7 @@ openpic_init(1, NUM_8259_INTERRUPTS, chrp_int_ack_special, nmi_irq); for ( i = 0 ; i < NUM_8259_INTERRUPTS ; i++ ) irq_desc[i].handler = &i8259_pic; - i8259_init(); + i8259_init(NULL); } void __init Index: pmac_setup.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/ppc/kernel/pmac_setup.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- pmac_setup.c 2001/12/26 17:28:11 1.6 +++ pmac_setup.c 2002/01/27 22:22:56 1.7 @@ -1,5 +1,5 @@ /* - * BK Id: SCCS/s.pmac_setup.c 1.43 11/13/01 21:26:07 paulus + * BK Id: SCCS/s.pmac_setup.c 1.45 12/01/01 20:09:06 benh */ /* * linux/arch/ppc/kernel/setup.c @@ -59,13 +59,13 @@ #include <asm/pci-bridge.h> #include <asm/ohare.h> #include <asm/mediabay.h> -#include <asm/feature.h> #include <asm/machdep.h> #include <asm/dma.h> #include <asm/bootx.h> #include <asm/cputable.h> #include <asm/btext.h> +#include <asm/pmac_feature.h> #include <asm/time.h> #include "local_irq.h" #include "pmac_pic.h" @@ -80,6 +80,11 @@ extern void pmac_calibrate_decr(void); extern void pmac_pcibios_fixup(void); extern void pmac_find_bridges(void); +extern int pmac_ide_check_base(ide_ioreg_t base); +extern ide_ioreg_t pmac_ide_get_base(int index); +extern void pmac_ide_init_hwif_ports(hw_regs_t *hw, + ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq); + extern void pmac_nvram_update(void); extern int pmac_pci_enable_device_hook(struct pci_dev *dev, int initial); @@ -406,7 +411,8 @@ #endif #ifdef CONFIG_PMAC_PBOOK media_bay_init(); -#endif +#endif + pmac_feature_late_init(); } #ifdef CONFIG_SCSI @@ -574,14 +580,11 @@ static int __pmac pmac_ide_check_region(ide_ioreg_t from, unsigned int extent) { - /* - * We only do the check_region if `from' looks like a genuine - * I/O port number. If it actually refers to a memory-mapped - * register, it should be OK. - */ - if (from < ~_IO_BASE) - return check_region(from, extent); - return 0; +#ifdef CONFIG_BLK_DEV_IDE_PMAC + if (pmac_ide_check_base(from) >= 0) + return 0; +#endif + return check_region(from, extent); } static void __pmac @@ -589,24 +592,31 @@ unsigned int extent, const char *name) { - if (from < ~_IO_BASE) - request_region(from, extent, name); +#ifdef CONFIG_BLK_DEV_IDE_PMAC + if (pmac_ide_check_base(from) >= 0) + return; +#endif + request_region(from, extent, name); } static void __pmac pmac_ide_release_region(ide_ioreg_t from, unsigned int extent) { - if (from < ~_IO_BASE) - release_region(from, extent); +#ifdef CONFIG_BLK_DEV_IDE_PMAC + if (pmac_ide_check_base(from) >= 0) + return; +#endif + release_region(from, extent); } +#ifndef CONFIG_BLK_DEV_IDE_PMAC /* * This is only used if we have a PCI IDE controller, not * for the IDE controller in the ohare/paddington/heathrow/keylargo. */ static void __pmac -pmac_ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, +pmac_ide_pci_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq) { ide_ioreg_t reg = data_port; @@ -618,7 +628,8 @@ } hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port; } -#endif +#endif /* CONFIG_BLK_DEV_IDE_PMAC */ +#endif /* defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) */ /* * Read in a property describing some pieces of memory. @@ -738,12 +749,19 @@ ppc_md.find_end_of_memory = pmac_find_end_of_memory; -#if defined(CONFIG_BLK_DEV_IDE) && defined(CONFIG_BLK_DEV_IDE_PMAC) + ppc_md.feature_call = pmac_do_feature_call; + +#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) ppc_ide_md.ide_check_region = pmac_ide_check_region; ppc_ide_md.ide_request_region = pmac_ide_request_region; ppc_ide_md.ide_release_region = pmac_ide_release_region; +#ifdef CONFIG_BLK_DEV_IDE_PMAC ppc_ide_md.ide_init_hwif = pmac_ide_init_hwif_ports; -#endif /* CONFIG_BLK_DEV_IDE && CONFIG_BLK_DEV_IDE_PMAC */ + ppc_ide_md.default_io_base = pmac_ide_get_base; +#else /* CONFIG_BLK_DEV_IDE_PMAC */ + ppc_ide_md.ide_init_hwif = pmac_ide_pci_init_hwif_ports; +#endif /* CONFIG_BLK_DEV_IDE_PMAC */ +#endif /* defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) */ #ifdef CONFIG_BOOTX_TEXT ppc_md.progress = pmac_progress; Index: prep_setup.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/ppc/kernel/prep_setup.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- prep_setup.c 2002/01/20 03:54:45 1.9 +++ prep_setup.c 2002/01/27 22:22:56 1.10 @@ -1,5 +1,5 @@ /* - * BK Id: SCCS/s.prep_setup.c 1.44 11/13/01 21:26:07 paulus + * BK Id: SCCS/s.prep_setup.c 1.47 12/19/01 09:45:54 trini */ /* * linux/arch/ppc/kernel/setup.c @@ -170,7 +170,7 @@ no_l2: #ifdef CONFIG_PREP_RESIDUAL - if (res->ResidualLength == 0) { + if (res->ResidualLength != 0) { /* print info about SIMMs */ seq_printf(m, "simms\t\t: "); for (i = 0; (res->ActualNumMemories) && (i < MAX_MEMS); i++) { @@ -617,7 +617,7 @@ static int __prep prep_get_irq(struct pt_regs *regs) { - return i8259_irq(smp_processor_id()); + return i8259_irq(); } static void __init @@ -629,7 +629,7 @@ openpic_init(1, NUM_8259_INTERRUPTS, 0, -1); for ( i = 0 ; i < NUM_8259_INTERRUPTS ; i++ ) irq_desc[i].handler = &i8259_pic; - i8259_init(); + i8259_init(0xbffffff0); /* PCI interrupt ack address for MPC105 and 106 */ } #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) |