From 3546e811f13673f2364c15d966a178e8b670cbce Mon Sep 17 00:00:00 2001 From: Olof Johansson Date: Mon, 26 Feb 2007 00:35:14 -0600 Subject: [POWERPC] No DEEPNAP on 970MP 1.0 970MP rev 1.0 is reported to have nonworking DEEPNAP support, we've had bug reports of lockups on those machines. Appearantly Apple used them on some dual-core dual-cpu systems. Rev 1.1 is OK, and that's the one that all 4-way systems seem to use. Signed-off-by: Olof Johansson Signed-off-by: Paul Mackerras --- arch/powerpc/kernel/cputable.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'arch') diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 7ec4ac77c0f..e4006dc087c 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c @@ -225,6 +225,22 @@ static struct cpu_spec cpu_specs[] = { .oprofile_type = PPC_OPROFILE_POWER4, .platform = "ppc970", }, + { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */ + .pvr_mask = 0xffffffff, + .pvr_value = 0x00440100, + .cpu_name = "PPC970MP", + .cpu_features = CPU_FTRS_PPC970, + .cpu_user_features = COMMON_USER_POWER4 | + PPC_FEATURE_HAS_ALTIVEC_COMP, + .icache_bsize = 128, + .dcache_bsize = 128, + .num_pmcs = 8, + .cpu_setup = __setup_cpu_ppc970, + .cpu_restore = __restore_cpu_ppc970, + .oprofile_cpu_type = "ppc64/970MP", + .oprofile_type = PPC_OPROFILE_POWER4, + .platform = "ppc970", + }, { /* PPC970MP */ .pvr_mask = 0xffff0000, .pvr_value = 0x00440000, -- cgit v1.2.3 From c99176a230097b076c2f98e4bf963399fe114ffd Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Mon, 26 Feb 2007 18:14:06 +0900 Subject: [POWERPC] Add missing newline in xmon help output My patch to add spu disassembly (af89fb8041562508895c8f3ba04790d7c2f4338c) removed a newline from the xmon help that it shouldn't have, put it back. Signed-off-by: Michael Ellerman Signed-off-by: Paul Mackerras --- arch/powerpc/xmon/xmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index 0183e5fbaf4..bf299b66f3f 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c @@ -218,7 +218,7 @@ Commands:\n\ " ss stop execution on all spus\n\ sr restore execution on stopped spus\n\ sf # dump spu fields for spu # (in hex)\n\ - sd # dump spu local store for spu # (in hex)\ + sd # dump spu local store for spu # (in hex)\n\ sdi # disassemble spu local store for spu # (in hex)\n" #endif " S print special registers\n\ -- cgit v1.2.3 From 8388374f1cd45ef67039d3ea128d250fac484df3 Mon Sep 17 00:00:00 2001 From: Ishizaki Kou Date: Fri, 2 Mar 2007 16:59:25 +0900 Subject: [POWERPC] Celleb: bug fix caused by not casting pointer types This fixes a bug caused by changes of pointer type in commit f1fda89522c5aaa1bd4ef69605e85e6ee9c85faf. hose->cfg_addr type is "volatile unsigned int __iomem *", so "hose->cfg_addr + X" will not make an intended address. This patch also adds comments for usage of cfg_addr and cfg_data in pci_controller structure. We use them in irregular way, and the original code is short of explanations about them. Signed-off-by: Kou Ishizaki Acked-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras --- arch/powerpc/platforms/celleb/scc_epci.c | 82 ++++++++++++++++++++++++-------- 1 file changed, 61 insertions(+), 21 deletions(-) (limited to 'arch') diff --git a/arch/powerpc/platforms/celleb/scc_epci.c b/arch/powerpc/platforms/celleb/scc_epci.c index c11b39c3776..fb23d53eb09 100644 --- a/arch/powerpc/platforms/celleb/scc_epci.c +++ b/arch/powerpc/platforms/celleb/scc_epci.c @@ -43,11 +43,34 @@ #define iob() __asm__ __volatile__("eieio; sync":::"memory") +static inline volatile void __iomem *celleb_epci_get_epci_base( + struct pci_controller *hose) +{ + /* + * Note: + * Celleb epci uses cfg_addr as a base address for + * epci control registers. + */ + + return hose->cfg_addr; +} + +static inline volatile void __iomem *celleb_epci_get_epci_cfg( + struct pci_controller *hose) +{ + /* + * Note: + * Celleb epci uses cfg_data as a base address for + * configuration area for epci devices. + */ + + return hose->cfg_data; +} #if 0 /* test code for epci dummy read */ static void celleb_epci_dummy_read(struct pci_dev *dev) { - void __iomem *epci_base; + volatile void __iomem *epci_base; struct device_node *node; struct pci_controller *hose; u32 val; @@ -58,7 +81,7 @@ static void celleb_epci_dummy_read(struct pci_dev *dev) if (!hose) return; - epci_base = hose->cfg_addr; + epci_base = celleb_epci_get_epci_base(hose); val = in_be32(epci_base + SCC_EPCI_WATRP); iosync(); @@ -70,19 +93,20 @@ static void celleb_epci_dummy_read(struct pci_dev *dev) static inline void clear_and_disable_master_abort_interrupt( struct pci_controller *hose) { - void __iomem *addr; - addr = hose->cfg_addr + PCI_COMMAND; - out_be32(addr, in_be32(addr) | (PCI_STATUS_REC_MASTER_ABORT << 16)); + volatile void __iomem *epci_base, *reg; + epci_base = celleb_epci_get_epci_base(hose); + reg = epci_base + PCI_COMMAND; + out_be32(reg, in_be32(reg) | (PCI_STATUS_REC_MASTER_ABORT << 16)); } static int celleb_epci_check_abort(struct pci_controller *hose, - void __iomem *addr) + volatile void __iomem *addr) { - void __iomem *reg, *epci_base; + volatile void __iomem *reg, *epci_base; u32 val; iob(); - epci_base = hose->cfg_addr; + epci_base = celleb_epci_get_epci_base(hose); reg = epci_base + PCI_COMMAND; val = in_be32(reg); @@ -108,20 +132,21 @@ static int celleb_epci_check_abort(struct pci_controller *hose, return PCIBIOS_SUCCESSFUL; } -static void __iomem *celleb_epci_make_config_addr(struct pci_controller *hose, +static volatile void __iomem *celleb_epci_make_config_addr( + struct pci_controller *hose, unsigned int devfn, int where) { - void __iomem *addr; + volatile void __iomem *addr; struct pci_bus *bus = hose->bus; if (bus->self) - addr = hose->cfg_data + + addr = celleb_epci_get_epci_cfg(hose) + (((bus->number & 0xff) << 16) | ((devfn & 0xff) << 8) | (where & 0xff) | 0x01000000); else - addr = hose->cfg_data + + addr = celleb_epci_get_epci_cfg(hose) + (((devfn & 0xff) << 8) | (where & 0xff)); pr_debug("EPCI: config_addr = 0x%p\n", addr); @@ -132,7 +157,7 @@ static void __iomem *celleb_epci_make_config_addr(struct pci_controller *hose, static int celleb_epci_read_config(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 * val) { - void __iomem *addr; + volatile void __iomem *epci_base, *addr; struct device_node *node; struct pci_controller *hose; @@ -142,13 +167,14 @@ static int celleb_epci_read_config(struct pci_bus *bus, node = (struct device_node *)bus->sysdata; hose = pci_find_hose_for_OF_device(node); - if (!hose->cfg_data) + if (!celleb_epci_get_epci_cfg(hose)) return PCIBIOS_DEVICE_NOT_FOUND; if (bus->number == hose->first_busno && devfn == 0) { /* EPCI controller self */ - addr = hose->cfg_addr + where; + epci_base = celleb_epci_get_epci_base(hose); + addr = epci_base + where; switch (size) { case 1: @@ -185,7 +211,7 @@ static int celleb_epci_read_config(struct pci_bus *bus, } pr_debug("EPCI: " - "addr=0x%lx, devfn=0x%x, where=0x%x, size=0x%x, val=0x%x\n", + "addr=0x%p, devfn=0x%x, where=0x%x, size=0x%x, val=0x%x\n", addr, devfn, where, size, *val); return celleb_epci_check_abort(hose, NULL); @@ -194,7 +220,7 @@ static int celleb_epci_read_config(struct pci_bus *bus, static int celleb_epci_write_config(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) { - void __iomem *addr; + volatile void __iomem *epci_base, *addr; struct device_node *node; struct pci_controller *hose; @@ -204,13 +230,15 @@ static int celleb_epci_write_config(struct pci_bus *bus, node = (struct device_node *)bus->sysdata; hose = pci_find_hose_for_OF_device(node); - if (!hose->cfg_data) + + if (!celleb_epci_get_epci_cfg(hose)) return PCIBIOS_DEVICE_NOT_FOUND; if (bus->number == hose->first_busno && devfn == 0) { /* EPCI controller self */ - addr = hose->cfg_addr + where; + epci_base = celleb_epci_get_epci_base(hose); + addr = epci_base + where; switch (size) { case 1: @@ -258,10 +286,10 @@ struct pci_ops celleb_epci_ops = { static int __devinit celleb_epci_init(struct pci_controller *hose) { u32 val; - void __iomem *reg, *epci_base; + volatile void __iomem *reg, *epci_base; int hwres = 0; - epci_base = hose->cfg_addr; + epci_base = celleb_epci_get_epci_base(hose); /* PCI core reset(Internal bus and PCI clock) */ reg = epci_base + SCC_EPCI_CKCTRL; @@ -382,6 +410,18 @@ int __devinit celleb_setup_epci(struct device_node *node, pr_debug("PCI: celleb_setup_epci()\n"); + /* + * Note: + * Celleb epci uses cfg_addr and cfg_data member of + * pci_controller structure in irregular way. + * + * cfg_addr is used to map for control registers of + * celleb epci. + * + * cfg_data is used for configuration area of devices + * on Celleb epci buses. + */ + if (of_address_to_resource(node, 0, &r)) goto error; hose->cfg_addr = ioremap(r.start, (r.end - r.start + 1)); -- cgit v1.2.3 From 84532c91206bc6748991fb1ae3ba8a1894d339fa Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Wed, 7 Mar 2007 11:27:37 +0100 Subject: [POWERPC] Fix warning in prom_parse.c of_irq_map_oldworld() This function spews a warning due to possible use of an uninitialized variable. This can happen on broken device-trees or when called with a NULL argument. Makes ure we properly fail instead. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras --- arch/powerpc/kernel/prom_parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c index ea6fd552c7e..91b443c9a48 100644 --- a/arch/powerpc/kernel/prom_parse.c +++ b/arch/powerpc/kernel/prom_parse.c @@ -916,7 +916,7 @@ EXPORT_SYMBOL_GPL(of_irq_map_raw); static int of_irq_map_oldworld(struct device_node *device, int index, struct of_irq *out_irq) { - const u32 *ints; + const u32 *ints = NULL; int intlen; /* -- cgit v1.2.3 From e71c5c38ed578b4fff3139cc5c76fb5d0544f80c Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Wed, 7 Mar 2007 11:27:45 +0100 Subject: [POWERPC] Fix warning in powermac feature.c This fixes a warning due to unused return from pci_enable_device() in powermac feature.c core99_ata100_enable() function. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras --- arch/powerpc/platforms/powermac/feature.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c index c29a6a064d2..24cc50c1774 100644 --- a/arch/powerpc/platforms/powermac/feature.c +++ b/arch/powerpc/platforms/powermac/feature.c @@ -810,6 +810,7 @@ core99_ata100_enable(struct device_node *node, long value) unsigned long flags; struct pci_dev *pdev = NULL; u8 pbus, pid; + int rc; if (uninorth_rev < 0x24) return -ENODEV; @@ -828,7 +829,9 @@ core99_ata100_enable(struct device_node *node, long value) pdev = pci_find_slot(pbus, pid); if (pdev == NULL) return 0; - pci_enable_device(pdev); + rc = pci_enable_device(pdev); + if (rc) + return rc; pci_set_master(pdev); } return 0; -- cgit v1.2.3 From b5d99e64bc6ec1eef03ed5ffe99088b28f5ad4a4 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Wed, 7 Mar 2007 11:27:55 +0100 Subject: [POWERPC] Fix warning in powermac pci.c This fixes a warning due to unused result from pci_enable_device() in powermac pci.c Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras --- arch/powerpc/platforms/powermac/pci.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c index f42475b27c1..6fbac308ded 100644 --- a/arch/powerpc/platforms/powermac/pci.c +++ b/arch/powerpc/platforms/powermac/pci.c @@ -1191,8 +1191,11 @@ void __init pmac_pcibios_after_init(void) * -- BenH */ for_each_pci_dev(dev) { - if ((dev->class >> 16) == PCI_BASE_CLASS_STORAGE) - pci_enable_device(dev); + if ((dev->class >> 16) != PCI_BASE_CLASS_STORAGE) + continue; + if (pci_enable_device(dev)) + printk(KERN_WARNING + "pci: Failed to enable %s\n", pci_name(dev)); } #endif /* CONFIG_BLK_DEV_IDE */ -- cgit v1.2.3 From aea12b75480c0842028bd1bfe0146d9148db2298 Mon Sep 17 00:00:00 2001 From: Li Yang Date: Tue, 6 Mar 2007 17:11:06 +0800 Subject: [POWERPC] 83xx: Minor fixes for 834x_mds USB setup code Fix broken node manipulating code, and clarify inaccurate comment. Signed-off-by: Li Yang Signed-off-by: Kumar Gala --- arch/powerpc/platforms/83xx/mpc834x_mds.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'arch') diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c index e5d81916687..8aa9a93e2aa 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c @@ -55,9 +55,9 @@ static int mpc834x_usb_cfg(void) struct device_node *np = NULL; int port0_is_dr = 0; - if ((np = of_find_compatible_node(np, "usb", "fsl-usb2-dr")) != NULL) + if ((np = of_find_compatible_node(NULL, "usb", "fsl-usb2-dr")) != NULL) port0_is_dr = 1; - if ((np = of_find_compatible_node(np, "usb", "fsl-usb2-mph")) != NULL){ + if ((np = of_find_compatible_node(NULL, "usb", "fsl-usb2-mph")) != NULL){ if (port0_is_dr) { printk(KERN_WARNING "There is only one USB port on PB board! \n"); @@ -103,8 +103,8 @@ static int mpc834x_usb_cfg(void) return -1; /* - * if MDS board is plug into PIB board, - * force to use the PHY on MDS board + * if Processor Board is plugged into PIB board, + * force to use the PHY on Processor Board */ bcsr5 = in_8(bcsr_regs + 5); if (!(bcsr5 & BCSR5_INT_USB)) -- cgit v1.2.3 From 49fdf3f078f8f5d84ecd10d62624c9158e755ec7 Mon Sep 17 00:00:00 2001 From: Segher Boessenkool Date: Thu, 22 Feb 2007 23:52:02 +0100 Subject: [POWERPC] Select u-image as default image for Linkstation Fixes image build error: ln: accessing `arch/powerpc/boot/zImage': No such file or directory make[1]: *** [arch/powerpc/boot/zImage] Error 1 make: *** [zImage] Error 2 Signed-off-by: Segher Boessenkool Acked-by: G. Liakhovetski Signed-off-by: Kumar Gala --- arch/powerpc/platforms/embedded6xx/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'arch') diff --git a/arch/powerpc/platforms/embedded6xx/Kconfig b/arch/powerpc/platforms/embedded6xx/Kconfig index 886c522d78e..3410bcbc9db 100644 --- a/arch/powerpc/platforms/embedded6xx/Kconfig +++ b/arch/powerpc/platforms/embedded6xx/Kconfig @@ -79,6 +79,7 @@ config LINKSTATION select MPIC select FSL_SOC select PPC_UDBG_16550 if SERIAL_8250 + select DEFAULT_UIMAGE help Select LINKSTATION if configuring for one of PPC- (MPC8241) based NAS systems from Buffalo Technology. So far only -- cgit v1.2.3 From f194bda4ce7e71cc95535f494a4a5515cd91ed85 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Wed, 7 Mar 2007 23:14:57 -0600 Subject: [POWERPC] 85xx: Enable CONFIG_SERIAL_8250_SHARE_IRQ On chip 8250 UARTs share an interrupts on existing 85xx processors. Signed-off-by: Kumar Gala --- arch/powerpc/platforms/85xx/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'arch') diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig index eb661ccf2da..e764c0aced8 100644 --- a/arch/powerpc/platforms/85xx/Kconfig +++ b/arch/powerpc/platforms/85xx/Kconfig @@ -47,6 +47,7 @@ config MPC85xx bool select PPC_UDBG_16550 select PPC_INDIRECT_PCI + select SERIAL_8250_SHARE_IRQ if SERIAL_8250 default y if MPC8540_ADS || MPC85xx_CDS || MPC8560_ADS || MPC85xx_MDS config PPC_INDIRECT_PCI_BE -- cgit v1.2.3