09 Dec, 2011

4 commits


20 Sep, 2011

1 commit

  • The various port_init_hw methods of ppc4xx_pciex_hwops should have been
    marked __init and when I added ppc4xx_pciex_port_reset_sdr(), which is
    __init. This added many section mismatch warnings like:

    WARNING: arch/powerpc/sysdev/built-in.o(.text+0x5c68): Section mismatch in reference from the function ppc440spe_pciex_init_port_hw() to the function .init.text:ppc4xx_pciex_port_reset_sdr()
    The function ppc440spe_pciex_init_port_hw() references
    the function __init ppc4xx_pciex_port_reset_sdr().
    This is often because ppc440spe_pciex_init_port_hw lacks a __init
    annotation or the annotation of ppc4xx_pciex_port_reset_sdr is wrong.

    Trivial patch to silence those warnings.

    Reported-By: Stephen Rothwell
    Signed-off-by: Tony Breeds

    Yours Tony
    Signed-off-by: Benjamin Herrenschmidt

    Tony Breeds
     

30 Aug, 2011

1 commit


12 Aug, 2011

1 commit

  • Adds a register to the config space for the 460sx. Changes the vc0
    detect to a pll detect. maps configuration space to test the link
    status. changes the setup to enable gen2 devices to operate at gen2
    speeds. fixes mapping that was not correct for the 460sx. added
    bit definitions for the OMRxMSKL registers. Removed reserved bit
    that was set incorrectly in the OMR2MSKL register.

    tested on the 460sx eiger and custom board

    Signed-off-by: Ayman El-Khashab
    Signed-off-by: Josh Boyer

    Ayman El-Khashab
     

05 Aug, 2011

1 commit


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
     

26 Jul, 2011

1 commit

  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (99 commits)
    drivers/virt: add missing linux/interrupt.h to fsl_hypervisor.c
    powerpc/85xx: fix mpic configuration in CAMP mode
    powerpc: Copy back TIF flags on return from softirq stack
    powerpc/64: Make server perfmon only built on ppc64 server devices
    powerpc/pseries: Fix hvc_vio.c build due to recent changes
    powerpc: Exporting boot_cpuid_phys
    powerpc: Add CFAR to oops output
    hvc_console: Add kdb support
    powerpc/pseries: Fix hvterm_raw_get_chars to accept < 16 chars, fixing xmon
    powerpc/irq: Quieten irq mapping printks
    powerpc: Enable lockup and hung task detectors in pseries and ppc64 defeconfigs
    powerpc: Add mpt2sas driver to pseries and ppc64 defconfig
    powerpc: Disable IRQs off tracer in ppc64 defconfig
    powerpc: Sync pseries and ppc64 defconfigs
    powerpc/pseries/hvconsole: Fix dropped console output
    hvc_console: Improve tty/console put_chars handling
    powerpc/kdump: Fix timeout in crash_kexec_wait_realmode
    powerpc/mm: Fix output of total_ram.
    powerpc/cpufreq: Add cpufreq driver for Momentum Maple boards
    powerpc: Correct annotations of pmu registration functions
    ...

    Fix up trivial Kconfig/Makefile conflicts in arch/powerpc, drivers, and
    drivers/cpufreq

    Linus Torvalds
     

13 Jul, 2011

1 commit


12 Jul, 2011

2 commits

  • 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
     
  • All current pcie controllers unconditionally use SDR to check the link and
    poll for reset. Refactor the code to include device reset in the
    port_init_hw() op and add a new check_link() op.

    This will make room fro new controllers that do not use SDR for these
    operations.

    Tested on 460ex.

    Signed-off-by: Tony Breeds
    Signed-off-by: Josh Boyer

    Tony Breeds
     

10 Jun, 2011

1 commit


08 May, 2010

1 commit


30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

29 Jan, 2010

1 commit

  • Some of the newer 4xx pci cores need an explicit bit set to send
    type 1 transactions instead of just comparing the bus numbers.

    This patch enables type 1 transations for pcix nodes, thus enabling
    devices behind PCI bridges.

    Signed-off-by: Stef van Os
    Signed-off-by: Benjamin Herrenschmidt

    Stef van Os
     

08 Jul, 2009

1 commit


21 May, 2009

1 commit


11 Mar, 2009

1 commit


27 Feb, 2009

1 commit

  • The PCI 2.x cells used on some 44x SoCs only let us configure the decode
    for the low 32-bit of the incoming PLB addresses. The top 4 bits (this
    is a 36-bit bus) are hard wired to different values depending on the
    specific SoC in use. Our code used to work "by accident" until I added
    support for the ISA memory holes and while at it added more validity
    checking of the addresses.

    This patch should bring it back to working condition. It still relies
    on the device-tree being correct but that's somewhat a pre-requisite
    for anything to work anyway.

    Signed-off-by: Benjamin Herrenschmidt
    Acked-by: Geert Uytterhoeven
    Acked-by: Josh Boyer

    Benjamin Herrenschmidt
     

15 Feb, 2009

1 commit

  • 4xx chips commonly now have multiple PHBs, there is no reason to not
    enable PCI domains on them. The main issue with PCI domains is X but
    currently its already somewhat busted for other reasons such as the
    36-bit physical address space, which I'm fixing separately.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Josh Boyer

    Benjamin Herrenschmidt
     

04 Dec, 2008

1 commit

  • This adds support for ISA memory holes on the PCI, PCI-X and
    PCI-E busses of the 4xx platforms. The patch includes changes
    to the Bamboo and Canyonlands device-trees to add such a hole,
    others can be updated separately.

    The ISA memory hole is an additional outbound window configured
    in the bridge to generate PCI cycles in the low memory addresses,
    thus allowing to access things such as the hard-decoded VGA
    aperture at 0xa0000..0xbffff or other similar things. It's made
    accessible to userspace via the new legacy_mem file in sysfs for
    which support was added by a previous patch.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Josh Boyer

    Benjamin Herrenschmidt
     

17 Oct, 2008

1 commit

  • * 'core-v28-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    do_generic_file_read: s/EINTR/EIO/ if lock_page_killable() fails
    softirq, warning fix: correct a format to avoid a warning
    softirqs, debug: preemption check
    x86, pci-hotplug, calgary / rio: fix EBDA ioremap()
    IO resources, x86: ioremap sanity check to catch mapping requests exceeding, fix
    IO resources, x86: ioremap sanity check to catch mapping requests exceeding the BAR sizes
    softlockup: Documentation/sysctl/kernel.txt: fix softlockup_thresh description
    dmi scan: warn about too early calls to dmi_check_system()
    generic: redefine resource_size_t as phys_addr_t
    generic: make PFN_PHYS explicitly return phys_addr_t
    generic: add phys_addr_t for holding physical addresses
    softirq: allocate less vectors
    IO resources: fix/remove printk
    printk: robustify printk, update comment
    printk: robustify printk, fix #2
    printk: robustify printk, fix
    printk: robustify printk

    Fixed up conflicts in:
    arch/powerpc/include/asm/types.h
    arch/powerpc/platforms/Kconfig.cputype
    manually.

    Linus Torvalds
     

02 Oct, 2008

1 commit


14 Sep, 2008

1 commit


02 Sep, 2008

1 commit

  • The declaration of total_memory removed. Now including
    instead. Since total_memory is a phys_addr_t which is 64-bit on 44x and
    is_power_of_2() works with u32 so I just inlined (size & (size-1)) != 0
    instead.

    Also this patch fixes default initialization: res->end should be 0x7fffffff
    not 0x80000000.

    Signed-off-by: Ilya Yanok
    Acked-by: Stefan Roese
    Signed-off-by: Josh Boyer

    Ilya Yanok
     

28 Aug, 2008

1 commit


18 Jun, 2008

1 commit

  • The 440EPx/GRx chips don't support PCI MRM commands. Drivers determine this
    by looking for a zero value in the PCI cache line size register. However,
    some drivers write to this register upon initialization. This can cause
    MRMs to be used on these chips, which may cause deadlocks on PLB4.

    The workaround implemented here introduces a new indirect_type flag, called
    PPC_INDIRECT_TYPE_BROKEN_MRM. This is set in the pci_controller structure in
    the pci fixup function for 4xx PCI bridges by determining if the bridge is
    compatible with 440EPx/GRx. The flag is checked in the indirect_write_config
    function, and forces any writes to the PCI_CACHE_LINE_SIZE register to be
    zero, which will disable MRMs for these chips.

    A similar workaround has been tested by AMCC on various PCI cards, such as
    the Silicon Image ATA card and Intel E1000 GIGE card. Hangs were seen with
    the Silicon Image card, and MRMs were seen on the bus with a PCI analyzer.
    With the workaround in place, the card functioned properly and only Memory
    Reads were seen on the bus with the analyzer.

    Acked-by: Stefan Roese
    Signed-off-by: Josh Boyer

    Josh Boyer
     

11 Jun, 2008

1 commit

  • This patch add a check to the PPC4xx PCIe driver to detect if the port
    is disabled via the device-tree. This is needed for the AMCC Canyonlands
    board which has an option to either select 2 PCIe ports or 1 PCIe port
    and one SATA port. The SATA port and the 1st PCIe port pins are multiplexed
    so we can't start both drivers.

    Signed-off-by: Stefan Roese
    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Josh Boyer

    Stefan Roese
     

07 May, 2008

1 commit

  • This patch adds basic endpoint support to the 4xx PCIe driver.

    This is done by checking the device_type property of the PCIe
    device node ("pci" for root-complex and "pci-endpoint" for endpoint
    configuration).

    Note: Currently we map a fixed 64MByte window to PLB address 0 (SDRAM).
    This should probably be configurable via a dts property.

    Signed-off-by: Stefan Roese
    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Josh Boyer

    Stefan Roese
     

03 Apr, 2008

2 commits


26 Mar, 2008

2 commits


08 Jan, 2008

1 commit


24 Dec, 2007

4 commits

  • This patch sets the ibpre flag (Inbound Presence) for the 405EX
    in the 4xx PCIe driver.

    Signed-off-by: Stefan Roese
    Signed-off-by: Josh Boyer

    Stefan Roese
     
  • This patch adds runtime detection of the 440SPe revision A chips. These
    chips are equipped with a slighly different PCIe core and need special/
    different initialization. The compatible node is changed to
    "plb-pciex-440spe" ("A" and "B" dropped). This is needed for boards that
    can be equipped with both PPC revisions like the AMCC Yucca.

    Signed-off-by: Stefan Roese
    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Josh Boyer

    Stefan Roese
     
  • This improves the way the 4xx PCI-E code handles checking for a link
    and adds explicit testing of CRS result codes on config space accesses.

    This should make it more reliable.

    Also, bridges with no link are now still created, though config space
    accesses beyond the root complex are filtered. This is one step toward
    eventually supporting hotplug.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Josh Boyer

    Benjamin Herrenschmidt
     
  • This adds to the previous 2 patches the support for the 4xx PCI Express
    cells as found in the 440SPe revA, revB and 405EX.

    Unfortunately, due to significant differences between these, and other
    interesting "features" of those pieces of HW, the code isn't as simple
    as it is for PCI and PCI-X and some of the functions differ significantly
    between the 3 implementations. Thus, not only this code can only support
    those 3 implementations for now and will refuse to operate on any other,
    but there are added ifdef's to avoid the bloat of building a fairly large
    amount of code on platforms that don't need it.

    Also, this code currently only supports fully initializing root complex
    nodes, not endpoint. Some more code will have to be lifted from the
    arch/ppc implementation to add the endpoint support, though it's mostly
    differences in memory mapping, and the question on how to represent
    endpoint mode PCI in the device-tree is thus open.

    Many thanks to Stefan Roese for testing & fixing up the 405EX bits !

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Stefan Roese
    Signed-off-by: Josh Boyer

    Benjamin Herrenschmidt