~ubuntu-branches/ubuntu/trusty/linux-armadaxp/trusty

« back to all changes in this revision

Viewing changes to arch/powerpc/platforms/powermac/pci.c

  • Committer: Package Import Robot
  • Author(s): Michael Casadevall, Bryan Wu, Dann Frazier, Michael Casadeall
  • Date: 2012-03-10 15:00:54 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120310150054-flugb39zon8vvgwe
Tags: 3.2.0-1600.1
[ Bryan Wu ]
* UBUNTU: import debian/debian.env and debian.armadaxp

[ Dann Frazier ]
* ARM: Armada XP: remove trailing '/' in dirnames in mvRules.mk

[ Michael Casadeall ]
* tools: add some tools for Marvell Armada XP processor
* kernel: timer tick hacking from Marvell
* kernel: Sheeva Errata: add delay on Sheeva when powering down
* net: add Marvell NFP netfilter
* net: socket and skb modifications made by Marvell
* miscdevice: add minor IDs for some Marvell Armada drivers
* fs: introduce memory pool for splice()
* video: EDID detection updates from Marvell Armada XP patchset
* video: backlight: add Marvell Dove LCD backlight driver
* video: display: add THS8200 display driver
* video: framebuffer: add Marvell Dove and Armada XP processor onchip LCD controller driver
* usbtest: add Interrupt transfer testing by Marvell Armada XP code
* usb: ehci: add support for Marvell EHCI controler
* tty/serial: 8250: add support for Marvell Armada XP processor and DeviceTree work
* rtc: add support for Marvell Armada XP onchip RTC controller
* net: pppoe: add Marvell ethernet NFP hook in PPPoE networking driver
* mtd: nand: add support for Marvell Armada XP Nand Flash Controller
* mtd: maps: add Marvell Armada XP specific map driver
* mmc: add support for Marvell Armada XP MMC/SD host controller
* i2c: add support for Marvell Armada XP onchip i2c bus controller
* hwmon: add Kconfig option for Armada XP onchip thermal sensor driver
* dmaengine: add Net DMA support for splice and update Marvell XOR DMA engine driver
* ata: add support for Marvell Armada XP SATA controller and update some quirks
* ARM: add Marvell Armada XP machine to mach-types
* ARM: oprofile: add support for Marvell PJ4B core
* ARM: mm: more ARMv6 switches for Marvell Armada XP
* ARM: remove static declaration to allow compilation
* ARM: alignment access fault trick
* ARM: mm: skip some fault fixing when run on NONE SMP ARMv6 mode during early abort event
* ARM: mm: add Marvell Sheeva CPU Architecture for PJ4B
* ARM: introduce optimized copy operation for Marvell Armada XP
* ARM: SAUCE: hardware breakpoint trick for Marvell Armada XP
* ARM: big endian and little endian tricks for Marvell Armada XP
* ARM: SAUCE: Add Marvell Armada XP build rules to arch/arm/kernel/Makefile
* ARM: vfp: add special handling for Marvell Armada XP
* ARM: add support for Marvell U-Boot
* ARM: add mv_controller_num for ARM PCI drivers
* ARM: add support for local PMUs, general SMP tweaks and cache flushing
* ARM: add Marvell device identifies in glue-proc.h
* ARM: add IPC driver support for Marvell platforms
* ARM: add DMA mapping for Marvell platforms
* ARM: add Sheeva errata and PJ4B code for booting
* ARM: update Kconfig and Makefile to include Marvell Armada XP platforms
* ARM: Armada XP: import LSP from Marvell for Armada XP 3.2 kernel enablement

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#include <linux/init.h>
18
18
#include <linux/bootmem.h>
19
19
#include <linux/irq.h>
 
20
#include <linux/of_pci.h>
20
21
 
21
22
#include <asm/sections.h>
22
23
#include <asm/io.h>
235
236
 
236
237
        if (offset >= 0x100)
237
238
                return  PCIBIOS_BAD_REGISTER_NUMBER;
238
 
        np = pci_busdev_to_OF_node(bus, devfn);
 
239
        np = of_pci_find_child_device(bus->dev.of_node, devfn);
239
240
        if (np == NULL)
240
241
                return PCIBIOS_DEVICE_NOT_FOUND;
241
242
 
560
561
        .write = u4_pcie_write_config,
561
562
};
562
563
 
 
564
static void __devinit pmac_pci_fixup_u4_of_node(struct pci_dev *dev)
 
565
{
 
566
        /* Apple's device-tree "hides" the root complex virtual P2P bridge
 
567
         * on U4. However, Linux sees it, causing the PCI <-> OF matching
 
568
         * code to fail to properly match devices below it. This works around
 
569
         * it by setting the node of the bridge to point to the PHB node,
 
570
         * which is not entirely correct but fixes the matching code and
 
571
         * doesn't break anything else. It's also the simplest possible fix.
 
572
         */
 
573
        if (dev->dev.of_node == NULL)
 
574
                dev->dev.of_node = pcibios_get_phb_of_node(dev->bus);
 
575
}
 
576
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_APPLE, 0x5b, pmac_pci_fixup_u4_of_node);
 
577
 
563
578
#endif /* CONFIG_PPC64 */
564
579
 
565
580
#ifdef CONFIG_PPC32
731
746
static int __init setup_uninorth(struct pci_controller *hose,
732
747
                                 struct resource *addr)
733
748
{
734
 
        ppc_pci_add_flags(PPC_PCI_REASSIGN_ALL_BUS);
 
749
        pci_add_flags(PCI_REASSIGN_ALL_BUS);
735
750
        has_uninorth = 1;
736
751
        hose->ops = &macrisc_pci_ops;
737
752
        hose->cfg_addr = ioremap(addr->start + 0x800000, 0x1000);
838
853
         * into cfg_addr
839
854
         */
840
855
        hose->cfg_data = ioremap(cfg_res.start, 0x02000000);
841
 
        hose->cfg_addr = ioremap(self_res.start,
842
 
                                 self_res.end - self_res.start + 1);
 
856
        hose->cfg_addr = ioremap(self_res.start, resource_size(&self_res));
843
857
 
844
858
        /*
845
859
         * /ht node doesn't expose a "ranges" property, we read the register
998
1012
        struct device_node *np, *root;
999
1013
        struct device_node *ht = NULL;
1000
1014
 
1001
 
        ppc_pci_set_flags(PPC_PCI_CAN_SKIP_ISA_ALIGN);
 
1015
        pci_set_flags(PCI_CAN_SKIP_ISA_ALIGN);
1002
1016
 
1003
1017
        root = of_find_node_by_path("/");
1004
1018
        if (root == NULL) {
1057
1071
         * some offset between bus number and domains for now when we
1058
1072
         * assign all busses should help for now
1059
1073
         */
1060
 
        if (ppc_pci_has_flag(PPC_PCI_REASSIGN_ALL_BUS))
 
1074
        if (pci_has_flag(PCI_REASSIGN_ALL_BUS))
1061
1075
                pcibios_assign_bus_offset = 0x10;
1062
1076
#endif
1063
1077
}
1323
1337
                 */
1324
1338
                if (r->start >= 0xf0000000 && r->start < 0xf3000000)
1325
1339
                        continue;
1326
 
                if (!region || (r->end - r->start) >
1327
 
                    (region->end - region->start))
 
1340
                if (!region || resource_size(r) > resource_size(region))
1328
1341
                        region = r;
1329
1342
        }
1330
1343
        /* Nothing found, bail */