27 Jul, 2011

1 commit

  • …git/arm/linux-arm-soc

    * 'next/cross-platform' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc:
    ARM: Consolidate the clkdev header files
    ARM: set vga memory base at run-time
    ARM: convert PCI defines to variables
    ARM: pci: make pcibios_assign_all_busses use pci_has_flag
    ARM: remove unnecessary mach/hardware.h includes
    pci: move microblaze and powerpc pci flag functions into asm-generic
    powerpc: rename ppc_pci_*_flags to pci_*_flags

    Fix up conflicts in arch/microblaze/include/asm/pci-bridge.h

    Linus Torvalds
     

12 Jul, 2011

1 commit

  • This renames pci flags functions and enums in preparation for creating
    generic version in asm-generic/pci-bridge.h. The following search and
    replace is done:

    s/ppc_pci_/pci_/
    s/PPC_PCI_/PCI_/

    Direct accesses to ppc_pci_flag variable are replaced with helper
    functions.

    Signed-off-by: Rob Herring
    Acked-by: Benjamin Herrenschmidt
    Cc: Paul Mackerras

    Rob Herring
     

10 Jun, 2011

1 commit


21 May, 2009

1 commit


16 Dec, 2008

2 commits

  • Currently there are a number of platforms that open code access to
    the ppc_pci_flags global variable. However, that variable is not
    present if CONFIG_PCI is not set, which can lead to a build break.

    This introduces a number of accessor functions that are defined
    to be empty in the case of CONFIG_PCI being disabled. The
    various platform files in the kernel are updated to use these.

    Signed-off-by: Josh Boyer
    Signed-off-by: Paul Mackerras

    Josh Boyer
     
  • of_node_put is needed before discarding a value received from
    of_find_node_by_name, eg in error handling code or when the device
    node is no longer used.

    The semantic match that catches the bug is as follows:
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @r exists@
    local idexpression struct device_node *n;
    position p1, p2;
    statement S1,S2;
    expression E,E1;
    expression *ptr != NULL;
    @@

    (
    if (!(n@p1 = of_find_node_by_name(...))) S1
    |
    n@p1 = of_find_node_by_name(...)
    )
    }
    when != true !n || ...
    when != n = E
    when != E = n
    if (!n || ...) S2
    ...>
    (
    return \(0\|\|ptr\);
    |
    return@p2 ...;
    |
    n = E1
    |
    E1 = n
    )
    @script:python@
    p1 << r.p1;
    p2 << r.p2;
    @@

    print "* file: %s of_find_node_by_name %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
    //

    Signed-off-by: Nicolas Palix
    Signed-off-by: Julia Lawall
    Acked-by: Stephen Rothwell
    Signed-off-by: Paul Mackerras

    Nicolas Palix
     

15 Oct, 2008

2 commits

  • Recently, indirect_pci was changed to test if the bus number requested
    is the one hanging straight off the PHB, then it substitutes the bus
    number with another one contained in a new "self_busno" field of the
    pci_controller structure.

    However, this breaks CHRP which didn't initialize this new field, and
    which relies on having the right bus number passed to the hardware.

    This fixes it by initializing this variable properly for all CHRP bridges

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • The detection of the IBM "Python" PCI host bridge on IBM CHRP
    machines such as old RS6000 was broken when we changed
    of_device_is_compatible() from strncasecmp to strcasecmp (dropped
    the "n" variant) due to the way IBM encodes the chip version.

    We fix that by instead doing a match on the model property like
    we do for others bridges in that file. It should be good enough
    for those machines. If yours is still broken, let me know.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     

22 Jul, 2008

1 commit


25 Jan, 2008

1 commit

  • Commit 6d98bda79bea0e1be26c0767d0e9923ad3b72f2e changed the init order
    for chrp_pci_fixup_vt8231_ata().

    It can not work anymore because either the irq is not yet set to 14 or
    pci_get_device() returns nothing. At least the printk() in
    chrp_pci_fixup_vt8231_ata() does not trigger anymore.
    pata_via works again on Pegasos with the change below.

    Signed-off-by: Olaf Hering
    Signed-off-by: Paul Mackerras

    Olaf Hering
     

20 Dec, 2007

1 commit

  • This adds to the 32 bits PCI code some flags, replacing the old
    pci_assign_all_busses global, that allow us to control various
    aspects of the PCI probing, such as whether to re-assign all
    resources or not, or to not try to assign anything at all.

    This also adds the flag x86 already has to avoid ISA alignment
    on bridges that don't have ISA forwarding enabled (no legacy
    devices on the top level bus) and sets it for PowerMacs.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Benjamin Herrenschmidt
     

10 Dec, 2007

1 commit

  • PowerMac and CHRP/BriQ platforms have quirks to switch some IDE
    controllers from legacy mode to fully native mode. Those quirks
    however will not work properly anymore due to a change to the
    generic code to better handle legacy IDE resources.

    This fixes it by moving those quirk to "early" quirks (so they
    run before resources are probed for the devices) and clearing
    all BARs after the conversion to force a reallocation of sane
    values.

    Signed-off-by: Benjamin Herrenschmidt
    Acked-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     

23 Aug, 2007

1 commit


22 Aug, 2007

1 commit

  • The built-in IDE controller is configured in legacy mode, but the PCI
    registers advertise native mode. Force the PCI class into legacy
    mode. This allows pata_via to access two drives.

    The Pegasos specific irq enforcement in the via82cxxx driver must stay
    because there is apparently no generic way to setup irq per channel.

    Tested on Pegasos2 with firmware version 20040810, and two IDE disks.

    Signed-off-by: Olaf Hering
    Signed-off-by: Paul Mackerras

    Olaf Hering
     

17 Aug, 2007

1 commit


24 Jul, 2007

1 commit


29 Jun, 2007

2 commits


07 May, 2007

1 commit


24 Apr, 2007

2 commits


13 Apr, 2007

2 commits


04 Dec, 2006

1 commit

  • This patch reworks the way IRQs are fixed up on PCI for arch powerpc.

    It makes pci_read_irq_line() called by default in the PCI code for
    devices that are probed, and add an optional per-device fixup in
    ppc_md for platforms that really need to correct what they obtain
    from pci_read_irq_line().

    It also removes ppc_md.irq_bus_setup which was only used by pSeries
    and should not be needed anymore.

    I've also removed the pSeries s7a workaround as it can't work with
    the current interrupt code anyway. I'm trying to get one of these
    machines working so I can test a proper fix for that problem.

    I also haven't updated the old-style fixup code from 85xx_cds.c
    because it's actually buggy :) It assigns pci_dev->irq hard coded
    numbers which is no good with the new IRQ mapping code. It should
    at least use irq_create_mapping(NULL, hard_coded_number); and possibly
    also set_irq_type() to set them as level low.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Benjamin Herrenschmidt
     

31 Jul, 2006

1 commit


07 Jul, 2006

1 commit

  • The support for Briq machines has been floating around as patches for
    ages. This cleans it up and adds it once for all.

    Some of this is based on initial code provided by Karsten Jeppesen
    and mostly rewritten from scratch by me.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Benjamin Herrenschmidt
     

03 Jul, 2006

1 commit

  • This adds the new irq remapper core and removes the old one. Because
    there are some fundamental conflicts with the old code, like the value
    of NO_IRQ which I'm now setting to 0 (as per discussions with Linus),
    etc..., this commit also changes the relevant platform and driver code
    over to use the new remapper (so as not to cause difficulties later
    in bisecting).

    This patch removes the old pre-parsing of the open firmware interrupt
    tree along with all the bogus assumptions it made to try to renumber
    interrupts according to the platform. This is all to be handled by the
    new code now.

    For the pSeries XICS interrupt controller, a single remapper host is
    created for the whole machine regardless of how many interrupt
    presentation and source controllers are found, and it's set to match
    any device node that isn't a 8259. That works fine on pSeries and
    avoids having to deal with some of the complexities of split source
    controllers vs. presentation controllers in the pSeries device trees.

    The powerpc i8259 PIC driver now always requests the legacy interrupt
    range. It also has the feature of being able to match any device node
    (including NULL) if passed no device node as an input. That will help
    porting over platforms with broken device-trees like Pegasos who don't
    have a proper interrupt tree.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Benjamin Herrenschmidt
     

01 Jul, 2006

1 commit


28 Jun, 2006

1 commit


05 Apr, 2006

1 commit


07 Feb, 2006

1 commit

  • setup_peg2 must do some refcounting.
    of_get_pci_address may need to drop the node

    Pegasos l2cr : L2 cache was not active, activating
    PCI bus 0 controlled by pci at 80000000
    Badness in kref_get at /home/olaf/kernel/olh/ppc64/linux-2.6.16-rc2-olh/lib/kref.c:32
    Call Trace:
    [C037BD00] [C0007934] show_stack+0x5c/0x184 (unreliable)
    [C037BD30] [C000E068] program_check_exception+0x184/0x584
    [C037BD90] [C000F5F0] ret_from_except_full+0x0/0x4c
    --- Exception: 700 at kref_get+0xc/0x24
    LR = of_node_get+0x24/0x3c
    [C037BE50] [C004FD94] __pte_alloc_kernel+0x64/0x80 (unreliable)
    [C037BE70] [C000CA18] of_get_parent+0x34/0x58
    [C037BE90] [C0009B18] of_get_address+0x24/0x174
    [C037BED0] [C000A108] of_address_to_resource+0x24/0x68
    [C037BF00] [C038B128] chrp_find_bridges+0x114/0x470
    [C037BF90] [C038AE48] chrp_setup_arch+0x1fc/0x32c
    [C037BFB0] [C03849B0] setup_arch+0x144/0x188
    [C037BFD0] [C037C45C] start_kernel+0x34/0x1a8
    [C037BFF0] [000037A0] 0x37a0
    Badness in kref_get at /home/olaf/kernel/olh/ppc64/linux-2.6.16-rc2-olh/lib/kref.c:32
    Call Trace:
    [C037BC90] [C0007934] show_stack+0x5c/0x184 (unreliable)
    [C037BCC0] [C000E068] program_check_exception+0x184/0x584
    [C037BD20] [C000F5F0] ret_from_except_full+0x0/0x4c
    --- Exception: 700 at kref_get+0xc/0x24
    LR = of_node_get+0x24/0x3c
    [C037BDE0] [00000000] 0x0 (unreliable)
    [C037BE00] [C000CA18] of_get_parent+0x34/0x58
    [C037BE20] [C0009CE8] of_translate_address+0x2c/0x2fc
    [C037BEA0] [C0009FE8] __of_address_to_resource+0x30/0xc4
    [C037BED0] [C000A130] of_address_to_resource+0x4c/0x68
    [C037BF00] [C038B128] chrp_find_bridges+0x114/0x470
    [C037BF90] [C038AE48] chrp_setup_arch+0x1fc/0x32c
    [C037BFB0] [C03849B0] setup_arch+0x144/0x188
    [C037BFD0] [C037C45C] start_kernel+0x34/0x1a8
    [C037BFF0] [000037A0] 0x37a0
    PCI bus 0 controlled by pci at c0000000
    Top of RAM: 0x10000000, Total RAM: 0x10000000

    Signed-off-by: Olaf Hering
    Signed-off-by: Paul Mackerras

    Olaf Hering
     

14 Jan, 2006

1 commit


26 Oct, 2005

1 commit