From 7659c038d3d0a635b5aeff04aed523d7b6c1dde8 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Wed, 25 Jul 2007 00:29:53 -0500 Subject: [POWERPC] Fix PCI indirect for big-endian cfg_addr We didn't actually propogate the flag we pass into setup_indirect_pci() to set indirect_type and thus were getting the wrong endianness if PPC_INDIRECT_TYPE_BIG_ENDIAN was set. Also, we need to or in additional flags rather than just doing a direct assignment. Signed-off-by: Kumar Gala --- arch/powerpc/sysdev/fsl_pci.c | 2 +- arch/powerpc/sysdev/indirect_pci.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'arch/powerpc') diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index 51c223385feb..87122275c9b4 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c @@ -216,7 +216,7 @@ int __init fsl_add_bridge(struct device_node *dev, int is_primary) /* check PCI express link status */ if (early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) { - hose->indirect_type = PPC_INDIRECT_TYPE_EXT_REG | + hose->indirect_type |= PPC_INDIRECT_TYPE_EXT_REG | PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS; if (fsl_pcie_check_link(hose)) hose->indirect_type |= PPC_INDIRECT_TYPE_NO_PCIE_LINK; diff --git a/arch/powerpc/sysdev/indirect_pci.c b/arch/powerpc/sysdev/indirect_pci.c index a8ac2dfdd3d4..5294560c7b00 100644 --- a/arch/powerpc/sysdev/indirect_pci.c +++ b/arch/powerpc/sysdev/indirect_pci.c @@ -160,4 +160,5 @@ setup_indirect_pci(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data, u32 mbase = ioremap(cfg_data & PAGE_MASK, PAGE_SIZE); hose->cfg_data = mbase + (cfg_data & ~PAGE_MASK); hose->ops = &indirect_pci_ops; + hose->indirect_type = flags; } -- cgit v1.2.3 From 2052d6d25decc04dc05beb99348b3d78f6e3490d Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Wed, 25 Jul 2007 00:44:11 -0500 Subject: [POWERPC] Don't try to allocate resources for a Freescale POWERPC PHB The Freescale PCI PHBs actual report back values in the BAR registers this causes issues in that we try to allocate resources for them and will get error messages like the following on MPC8544 DS: PCI: Failed to allocate mem resource #1:80000000@0 for 0000:00:00.0 To address this if we are class PCI_CLASS_PROCESSOR_POWERPC, a normal header type, and the PHB we clear out all the resources. Signed-off-by: Kumar Gala --- arch/powerpc/kernel/pci_32.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'arch/powerpc') diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c index 721a69400d65..395086f63239 100644 --- a/arch/powerpc/kernel/pci_32.c +++ b/arch/powerpc/kernel/pci_32.c @@ -59,6 +59,24 @@ LIST_HEAD(hose_list); static int pci_bus_count; +static void +fixup_hide_host_resource_fsl(struct pci_dev* dev) +{ + int i, class = dev->class >> 8; + + if ((class == PCI_CLASS_PROCESSOR_POWERPC) && + (dev->hdr_type == PCI_HEADER_TYPE_NORMAL) && + (dev->bus->parent == NULL)) { + for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { + dev->resource[i].start = 0; + dev->resource[i].end = 0; + dev->resource[i].flags = 0; + } + } +} +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MOTOROLA, PCI_ANY_ID, fixup_hide_host_resource_fsl); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_FREESCALE, PCI_ANY_ID, fixup_hide_host_resource_fsl); + static void fixup_broken_pcnet32(struct pci_dev* dev) { -- cgit v1.2.3 From 9a9bcf4e00281cd135e69f8d996acbbeb5aef6d0 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Thu, 26 Jul 2007 00:07:36 -0500 Subject: [POWERPC] Fix ethernet PHY support on MPC8544 DS The MPC8544 dts needed to set the new phy-connection-type to rgmii-id for the Vitesse PHY on the board to work properly. Signed-off-by: Kumar Gala --- arch/powerpc/boot/dts/mpc8544ds.dts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/powerpc') diff --git a/arch/powerpc/boot/dts/mpc8544ds.dts b/arch/powerpc/boot/dts/mpc8544ds.dts index 4a900c6df762..d8ee4a0198e4 100644 --- a/arch/powerpc/boot/dts/mpc8544ds.dts +++ b/arch/powerpc/boot/dts/mpc8544ds.dts @@ -104,6 +104,7 @@ interrupts = <1d 2 1e 2 22 2>; interrupt-parent = <&mpic>; phy-handle = <&phy0>; + phy-connection-type = "rgmii-id"; }; ethernet@26000 { @@ -117,6 +118,7 @@ interrupts = <1f 2 20 2 21 2>; interrupt-parent = <&mpic>; phy-handle = <&phy1>; + phy-connection-type = "rgmii-id"; }; serial@4500 { -- cgit v1.2.3 From 282045b45060d5a8be0ebd13c1506551c6a0a0b8 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Thu, 26 Jul 2007 00:16:05 -0500 Subject: [POWREPC] Fixup a number of modpost warnings on ppc32 Fixed the following warnings: WARNING: vmlinux.o(.text+0x2934): Section mismatch: reference to .init.text:__alloc_bootmem (between 'irq_alloc_host' and 'irq_set_default_host') WARNING: vmlinux.o(.text+0xb2aa): Section mismatch: reference to .init.data:boot_command_line (between 'register_early_udbg_console' and 'udbg_printf') WARNING: vmlinux.o(.text+0xb2b2): Section mismatch: reference to .init.data:boot_command_line (between 'register_early_udbg_console' and 'udbg_printf') WARNING: vmlinux.o(.text+0xe354): Section mismatch: reference to .init.text:__alloc_bootmem (between 'pcibios_alloc_controller' and 'pci_domain_nr') WARNING: vmlinux.o(.text+0x12768): Section mismatch: reference to .init.text:update_bridge_resource (between 'quirk_fsl_pcie_transparent' and 'indirect_read_config') WARNING: vmlinux.o(.text+0x127a8): Section mismatch: reference to .init.text:update_bridge_resource (between 'quirk_fsl_pcie_transparent' and 'indirect_read_config') WARNING: vmlinux.o(.text+0x17566c): Section mismatch: reference to .init.text:pcibios_fixup_bus (between 'pci_scan_child_bus' and 'pci_scan_bus_parented') Signed-off-by: Kumar Gala --- arch/powerpc/kernel/irq.c | 8 ++++---- arch/powerpc/kernel/pci-common.c | 2 +- arch/powerpc/kernel/pci_32.c | 2 +- arch/powerpc/kernel/udbg.c | 2 +- arch/powerpc/sysdev/fsl_pci.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) (limited to 'arch/powerpc') diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 2fc87862146c..24bea97c736c 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c @@ -418,10 +418,10 @@ irq_hw_number_t virq_to_hw(unsigned int virq) } EXPORT_SYMBOL_GPL(virq_to_hw); -struct irq_host *irq_alloc_host(unsigned int revmap_type, - unsigned int revmap_arg, - struct irq_host_ops *ops, - irq_hw_number_t inval_irq) +__init_refok struct irq_host *irq_alloc_host(unsigned int revmap_type, + unsigned int revmap_arg, + struct irq_host_ops *ops, + irq_hw_number_t inval_irq) { struct irq_host *host; unsigned int size = sizeof(struct irq_host); diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index fe7d1255e11e..7b41a99baae4 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c @@ -65,7 +65,7 @@ static void __devinit pci_setup_pci_controller(struct pci_controller *hose) spin_unlock(&hose_spinlock); } -struct pci_controller * pcibios_alloc_controller(struct device_node *dev) +__init_refok struct pci_controller * pcibios_alloc_controller(struct device_node *dev) { struct pci_controller *phb; diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c index 395086f63239..cd35c969bb28 100644 --- a/arch/powerpc/kernel/pci_32.c +++ b/arch/powerpc/kernel/pci_32.c @@ -1247,7 +1247,7 @@ pcibios_init(void) subsys_initcall(pcibios_init); -void __init pcibios_fixup_bus(struct pci_bus *bus) +void pcibios_fixup_bus(struct pci_bus *bus) { struct pci_controller *hose = (struct pci_controller *) bus->sysdata; unsigned long io_offset; diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c index cbca1df8bc60..0f9b4eadfbcb 100644 --- a/arch/powerpc/kernel/udbg.c +++ b/arch/powerpc/kernel/udbg.c @@ -155,7 +155,7 @@ static int early_console_initialized; * Called by setup_system after ppc_md->probe and ppc_md->early_init. * Call it again after setting udbg_putc in ppc_md->setup_arch. */ -void register_early_udbg_console(void) +void __init register_early_udbg_console(void) { if (early_console_initialized) return; diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index 87122275c9b4..9fb0ce5c7176 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c @@ -107,7 +107,7 @@ void __init setup_pci_cmd(struct pci_controller *hose) } } -static void __devinit quirk_fsl_pcie_transparent(struct pci_dev *dev) +static void __init quirk_fsl_pcie_transparent(struct pci_dev *dev) { struct resource *res; int i, res_idx = PCI_BRIDGE_RESOURCES; -- cgit v1.2.3 From 006af9e229bf28b59c451e8370deca87c7cc3ee6 Mon Sep 17 00:00:00 2001 From: Roy Zang Date: Wed, 11 Jul 2007 14:39:17 +0800 Subject: [POWERPC] Fix mpc7448hpc2 tsi108 device_type bug Fix mpc7448hpc2 tsi108 device_type bug. Wrong device type will break the board startup. Signed-off-by: Roy Zang Signed-off-by: Kumar Gala --- arch/powerpc/boot/dts/mpc7448hpc2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/powerpc') diff --git a/arch/powerpc/boot/dts/mpc7448hpc2.dts b/arch/powerpc/boot/dts/mpc7448hpc2.dts index 0e3d314a7158..b9158eb2797e 100644 --- a/arch/powerpc/boot/dts/mpc7448hpc2.dts +++ b/arch/powerpc/boot/dts/mpc7448hpc2.dts @@ -45,7 +45,7 @@ #address-cells = <1>; #size-cells = <1>; #interrupt-cells = <2>; - device_type = "tsi108-bridge"; + device_type = "tsi-bridge"; ranges = <00000000 c0000000 00010000>; reg = ; bus-frequency = <0>; -- cgit v1.2.3 From 10ce8c69d09c8dcdebe926adb2e7d28f540e2939 Mon Sep 17 00:00:00 2001 From: Roy Zang Date: Fri, 13 Jul 2007 17:35:33 +0800 Subject: [POWERPC] Fix the ability to reset on MPC8544 DS and MPC8568 MDS boards Add global-utilities node with has-rstcr on MPC8544 DS and MPC8568 MDS boards so they are able to reset properly. Signed-off-by: Roy Zang Signed-off-by: Kumar Gala --- arch/powerpc/boot/dts/mpc8544ds.dts | 6 ++++++ arch/powerpc/boot/dts/mpc8568mds.dts | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'arch/powerpc') diff --git a/arch/powerpc/boot/dts/mpc8544ds.dts b/arch/powerpc/boot/dts/mpc8544ds.dts index d8ee4a0198e4..4680e2010887 100644 --- a/arch/powerpc/boot/dts/mpc8544ds.dts +++ b/arch/powerpc/boot/dts/mpc8544ds.dts @@ -350,6 +350,12 @@ }; + global-utilities@e0000 { //global utilities block + compatible = "fsl,mpc8548-guts"; + reg = ; + fsl,has-rstcr; + }; + mpic: pic@40000 { clock-frequency = <0>; interrupt-controller; diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/boot/dts/mpc8568mds.dts index 99fa5a0ea425..b1dcfbe8c1f8 100644 --- a/arch/powerpc/boot/dts/mpc8568mds.dts +++ b/arch/powerpc/boot/dts/mpc8568mds.dts @@ -170,6 +170,12 @@ interrupt-parent = <&mpic>; }; + global-utilities@e0000 { //global utilities block + compatible = "fsl,mpc8548-guts"; + reg = ; + fsl,has-rstcr; + }; + pci@8000 { interrupt-map-mask = ; interrupt-map = < -- cgit v1.2.3 From d1c813123f3beebcffb8446929e0e917defda67f Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Thu, 26 Jul 2007 00:43:36 -0500 Subject: [POWERPC] Only allow building of BootX text support on PPC_MULTIPLATFORM BootX text code is only supported on systems with real OF at this point which is PPC_OF && PPC_MULTIPLATFORM. Signed-off-by: Kumar Gala --- arch/powerpc/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/powerpc') diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug index 346cd3befe1e..5c71624ee38d 100644 --- a/arch/powerpc/Kconfig.debug +++ b/arch/powerpc/Kconfig.debug @@ -134,7 +134,7 @@ config BDI_SWITCH config BOOTX_TEXT bool "Support for early boot text console (BootX or OpenFirmware only)" - depends PPC_OF + depends PPC_OF && PPC_MULTIPLATFORM help Say Y here to see progress messages from the boot firmware in text mode. Requires either BootX or Open Firmware. -- cgit v1.2.3 From 141707892e92dca69b7b8af65b9367da2d1f8120 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Thu, 26 Jul 2007 00:46:15 -0500 Subject: [POWERPC] Fix register labels on show_regs() message for 4xx/Book-E In a show_regs() message The DEAR and ESR were reported as DAR and DSISR which only exist on classic parts. Signed-off-by: Kumar Gala --- arch/powerpc/kernel/process.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch/powerpc') diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 84f000a45e36..a83727b308a0 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -423,7 +423,11 @@ void show_regs(struct pt_regs * regs) printk(" CR: %08lx XER: %08lx\n", regs->ccr, regs->xer); trap = TRAP(regs); if (trap == 0x300 || trap == 0x600) +#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) + printk("DEAR: "REG", ESR: "REG"\n", regs->dar, regs->dsisr); +#else printk("DAR: "REG", DSISR: "REG"\n", regs->dar, regs->dsisr); +#endif printk("TASK = %p[%d] '%s' THREAD: %p", current, current->pid, current->comm, task_thread_info(current)); -- cgit v1.2.3