07 Feb, 2008

24 commits

  • Josh Boyer
     
  • Since we have mfdcri() and mtdcri() as macros, we can't use constructions,
    such as "mtdcri(base, reg, mfdcri(base, reg) | val)". In this case the
    mfdcri() stuff is not evaluated first. It's evaluated inside the mtdcri()
    macro and we have the dcr_ind_lock spinlock acquired twice.

    To avoid this error, I've added __mfdcri()/__mtdcri() inline functions that
    take the lock after register name fix-up.

    Signed-off-by: Valentine Barshak
    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Josh Boyer

    Valentine Barshak
     
  • The include/asm-powerpc/dcr-native.h declares extern spinlock_t dcr_ind_lock;
    but it's actually isn't defined. This patch adds a missing dcr_ind_lock.

    Signed-off-by: Valentine Barshak
    Signed-off-by: Josh Boyer

    Valentine Barshak
     
  • While merging, I found a small bug that I forgot to send. I add an
    offset to a value twice.

    Signed-off-by: Sean MacLennan
    Signed-off-by: Josh Boyer

    Sean MacLennan
     
  • Adds USB EHCI entry to PowerPC 440EPx Sequoia DTS.

    Signed-off-by: Valentine Barshak
    Signed-off-by: Josh Boyer

    Valentine Barshak
     
  • Adds EHCI OF bindings to documentation.

    Signed-off-by: Valentine Barshak
    Signed-off-by: Josh Boyer

    Valentine Barshak
     
  • The addition of of_rtc for the Walnut board was only half complete. Select
    OF_RTC in the Kconfig and include the appropriate header to make it compile.

    Signed-off-by: Josh Boyer

    Josh Boyer
     
  • The xics code does update the default server information when the boot
    cpu is removed. This patch recognizes when the boot cpu is being
    removed and updates the appropriate information based on the new 'boot
    cpu'.

    Failure to update this information can causes us to leave irqs pinned
    to cpus that are being removed, especially when removing the boot cpu.
    The cpu is removed from the kernel, but cpu dlpar remove operations
    fail since we cannot return the cpu to the hypervisor.

    Signed-off-by: Nathan Fonteno
    Signed-off-by: Paul Mackerras

    Nathan Fontenot
     
  • It appears that xics.c has its own of_get_cpu_node(). Remove this and
    use the common one from prom.c.

    Signed-off-by: Nathan Fontenot
    Signed-off-by: Paul Mackerras

    Nathan Fontenot
     
  • This splits off the kexec path bits of the xics_teardown_cpu() routine
    into its own xics_kexec_teardown_cpu() routine. With the previous
    combined routine the CPPR for a cpu that is being removed may have its
    CPPR reset in the plpar_eoi() call (which explicitly sets the CPPR to
    a non-zero value). Splitting of the kexec bits of the code prevents
    this from happening in the cpu remove path.

    Once again, this does not cause the cpu remove from the kernel to
    fail, but it does cause cpu dlpar operations to not be able to return
    the cpu to the hypervisor.

    Signed-off-by: Nathan Fontenot
    Signed-off-by: Paul Mackerras

    Nathan Fontenot
     
  • The affinity mask in the virq descriptor needs to be set before we
    reset the affinity for the virq. Without doing this the call to get
    the new irq server fails and we end up leaving the virq pinned to the
    cpu we are removing.

    This does not fail the cpu remove from the kernel, but it does prevent
    cpu dlpar remove operations from returning the cpu to the hypervisor.

    Signed-off-by: Nathan Fontenot
    Signed-off-by: Paul Mackerras

    Nathan Fontenot
     
  • Currently, the kernel uses CONFIG_DEVICE_TREE to wrap a kernel image
    with a fdt blob which means for any given configuration only one dts
    file can be selected and so support for only one board can be built

    This moves the selection of the default .dts file out of the kernel
    config and into the bootwrapper makefile. The makefile chooses which
    images to build based on the kernel config and the dts source file
    name is taken directly from the image name. For example "cuImage.ebony"
    will use "ebony.dts" as the device tree source file.

    In addition, this patch allows a specific image to be requested from the
    command line by adding "cuImage.%" and "treeImage.%" targets to the list
    of valid built targets in arch/powerpc/Makefile. This allows the default
    dts selection to be overridden.

    Another advantage to this change is it allows a single defconfig to be
    supplied for all boards using the same chip family and only differing in
    the device tree.

    Important note: This patch adds two new zImage targets; zImage.dtb.% and
    zImage.dtb.initrd.% for zImages with embedded dtb files. Currently
    there are 5 platforms which require this: ps3, ep405, mpc885ads, ep88xc,
    adder875-redboot and ep8248e. This patch *changes the zImage filenames*
    for those platforms. ie. 'zImage.ps3' is now 'zImage.dtb.ps3'.

    This new zImage.dtb targets were added so that the .dts file could be
    part of the dependancies list for building them.

    Signed-off-by: Grant Likely
    Signed-off-by: Paul Mackerras

    Grant Likely
     
  • Here's a dumb simple implementation of fake NUMA nodes for PowerPC.
    Fake NUMA nodes can be specified using the following command line
    option

    numa=fake=

    node range is of the format ,,...

    Each of the rangeX parameters is passed using memparse(). I find the
    patch useful for fake NUMA emulation on my simple PowerPC machine.
    I've tested it on a numa box with the following arguments

    numa=fake=512M
    numa=fake=512M,768M
    numa=fake=256M,512M mem=512M
    numa=fake=1G mem=768M
    numa=fake=
    without any numa= argument

    The other side-effect introduced by this patch is that; in the case
    where we don't have NUMA information, we now set a node online after
    adding each LMB. This node could very well be node 0, but in the case
    that we enable fake NUMA nodes, when we cross node boundaries, we need
    to set the new node online.

    Signed-off-by: Balbir Singh
    Signed-off-by: Paul Mackerras

    Balbir Singh
     
  • Looks like "[POWERPC] kdump shutdown hook support" broke builds when
    CONFIG_DEBUGGER=n and CONFIG_KEXEC=y, such as in g5_defconfig:

    arch/powerpc/kernel/crash.c: In function 'default_machine_crash_shutdown':
    arch/powerpc/kernel/crash.c:388: error: '__debugger_fault_handler' undeclared (first use in this function)
    arch/powerpc/kernel/crash.c:388: error: (Each undeclared identifier is reported only once
    arch/powerpc/kernel/crash.c:388: error: for each function it appears in.)

    Move the debugger hooks to under CONFIG_DEBUGGER || CONFIG_KEXEC, since
    that's when the crash code is enabled.

    (I should have caught this with my build-script pre-merge, my bad. :( )

    Signed-off-by: Olof Johansson
    Signed-off-by: Paul Mackerras

    Olof Johansson
     
  • Paul Mackerras
     
  • Add 512x support using the psc_ops framework established
    with the previous patch.

    All 512x PSCs share the same interrupt so add
    IRQF_SHARED to irq flags.

    Signed-off-by: John Rigby
    Signed-off-by: Grant Likely

    John Rigby
     
  • PSC devices are different between the mpc5200 and the mpc5121
    this patch localizes the differences in preparation for adding mpc5121
    support to the psc uart driver.

    Signed-off-by: John Rigby
    Signed-off-by: Grant Likely

    John Rigby
     
  • Minimal /dts-v1/ device tree for mpc5121 ads.

    port-number property in uart nodes
    will go away after the driver learns to use aliases

    Signed-off-by: John Rigby
    Signed-off-by: Grant Likely

    John Rigby
     
  • 512x is very similar to 83xx and most
    of this is patterned after code from 83xx.

    New platform:
    changed:
    arch/powerpc/Kconfig
    arch/powerpc/platforms/Kconfig
    arch/powerpc/platforms/Kconfig.cputype
    arch/powerpc/platforms/Makefile
    new:
    arch/powerpc/platforms/512x/*
    include/asm-powerpc/mpc512x.h

    Signed-off-by: John Rigby
    Signed-off-by: Grant Likely

    John Rigby
     
  • The ICAP device in Xilinx FPGAs differs slightly between different
    FPGAs. The driver needs an additional attribute in the device tree to
    distinguish this.

    Signed-off-by: Stephen Neuendorffer
    Signed-off-by: Grant Likely

    Stephen Neuendorffer
     
  • This includes code for new fifo-based xps_hwicap in addition to the
    older opb_hwicap, which has a significantly different interface. The
    common code between the two drivers is largely shared.

    Significant differences exists between this driver and what is
    supported in the EDK drivers. In particular, most of the
    architecture-specific code for reconfiguring individual FPGA resources
    has been removed. This functionality is likely better provided in a
    user-space support library. In addition, read and write access is
    supported. In addition, although the xps_hwicap cores support
    interrupt-driver mode, this driver only supports polled operation, in
    order to make the code simpler, and since the interrupt processing
    overhead is likely to slow down the throughput under Linux.

    Signed-off-by: Stephen Neuendorffer
    Signed-off-by: Grant Likely

    Stephen Neuendorffer
     
  • Probing of the console at console_initcall time is broken. It tries to
    call memory allocation routines which aren't initialized yet.

    Problem solved by removing the early probe entirely. The console init
    is called again anyway after the uartlite device is initialized and the
    memory allocation routines can be called safely.

    Signed-off-by: Grant Likely
    Acked-by: Peter Korsgaard

    Grant Likely
     
  • Mainly, this involves two changes:
    1) xilinx->xlnx (recognized standard is to use the stock ticker)
    2) In order to have the device tree focus on describing what the
    hardware is as exactly as possible, the compatible strings contain the
    full IP name and IP version.

    Signed-off-by: Stephen Neuendorffer
    Acked-by: Peter Korsgaard
    Signed-off-by: Grant Likely

    Stephen Neuendorffer
     
  • Fix compile errors in the xilinxfb, xsysace and uartlite drivers used
    by the Xilinx Virtex platform

    Signed-off-by: Grant Likely
    Acked-by: Peter Korsgaard

    Grant Likely
     

06 Feb, 2008

16 commits

  • …owerpc into for-2.6.25

    Paul Mackerras
     
  • Of_get_parent and of_find_compatible_node do a of_node_get, and thus a
    corresponding of_code_put is needed in both the error case and the normal
    return case.

    The problem was found using the following semantic match.
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @@
    type T,T1,T2;
    identifier E;
    statement S;
    expression x1,x2,x3;
    int ret;
    @@

    T E;
    ...
    * E = \(of_get_parent\|of_find_compatible_node\)(...);
    if (E == NULL) S
    ... when != of_node_put(...,(T1)E,...)
    when != if (E != NULL) { ... of_node_put(...,(T1)E,...); ...}
    when != x1 = (T1)E
    when != E = x3;
    when any
    if (...) {
    ... when != of_node_put(...,(T2)E,...)
    when != if (E != NULL) { ... of_node_put(...,(T2)E,...); ...}
    when != x2 = (T2)E
    (
    * return;
    |
    * return ret;
    )
    }
    //

    Signed-off-by: Julia Lawall
    Cc: Stephen Rothwell
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Kumar Gala
    Signed-off-by: Andrew Morton
    Signed-off-by: Paul Mackerras

    Julia Lawall
     
  • The functions of_find_compatible_node and of_find_node_by_type both
    call of_node_get on their result. So any error handling code
    thereafter should call of_node_put(np). This is taken care of in the
    case where there is a goto out, but not when there is a direct return.

    The function irq_alloc_host puts np into the returned structure, which is
    stored in the global variable mpc8xx_pic_host, so the reference count
    should be set for the lifetime of that variable. The current solution ups
    the reference count again in the argument to irq_alloc_host so that it can
    be decremented on the way out. This seems a bit unnecessary, and also
    doesn't work in the case where irq_alloc_host fails, because then the
    reference count only goes does by one, whereas it should go down by two. A
    better solution is to not increment the reference count in the argument to
    irq_alloc_host and only decrement it on the way out in an error case.

    The problem was found using the following semantic match.
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @@
    type T,T1,T2;
    identifier E;
    statement S;
    expression x1,x2,x3;
    int ret;
    @@

    T E;
    ...
    * E = \(of_get_parent\|of_find_compatible_node\)(...);
    if (E == NULL) S
    ... when != of_node_put(...,(T1)E,...)
    when != if (E != NULL) { ... of_node_put(...,(T1)E,...); ...}
    when != x1 = (T1)E
    when != E = x3;
    when any
    if (...) {
    ... when != of_node_put(...,(T2)E,...)
    when != if (E != NULL) { ... of_node_put(...,(T2)E,...); ...}
    when != x2 = (T2)E
    (
    * return;
    |
    * return ret;
    )
    }
    //

    Signed-off-by: Julia Lawall
    Cc: Stephen Rothwell
    Cc: Benjamin Herrenschmidt
    Cc: Kumar Gala
    Signed-off-by: Andrew Morton
    Signed-off-by: Paul Mackerras

    Julia Lawall
     
  • Of_get_parent and of_find_compatible_node do an of_node_get, and thus a
    corresponding of_code_put is needed in the error case.

    The problem was found using the following semantic match.
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @@
    type T,T1,T2;
    identifier E;
    statement S;
    expression x1,x2,x3;
    int ret;
    @@

    T E;
    ...
    * E = \(of_get_parent\|of_find_compatible_node\)(...);
    if (E == NULL) S
    ... when != of_node_put(...,(T1)E,...)
    when != if (E != NULL) { ... of_node_put(...,(T1)E,...); ...}
    when != x1 = (T1)E
    when != E = x3;
    when any
    if (...) {
    ... when != of_node_put(...,(T2)E,...)
    when != if (E != NULL) { ... of_node_put(...,(T2)E,...); ...}
    when != x2 = (T2)E
    (
    * return;
    |
    * return ret;
    )
    }
    //

    Signed-off-by: Julia Lawall
    Cc: Stephen Rothwell
    Cc: Benjamin Herrenschmidt
    Cc: Kumar Gala
    Signed-off-by: Andrew Morton
    Signed-off-by: Paul Mackerras

    Julia Lawall
     
  • The 8572 is a dual core processor, not reason not to describe both
    cores in the device tree.

    Signed-off-by: Kumar Gala

    Kumar Gala
     
  • One is intoduced by me (of_node_put() absence) and another was
    present already (not checking for NULL).

    Found by Stephen Rothwell.

    Signed-off-by: Anton Vorontsov
    Acked-by: Stephen Rothwell
    Signed-off-by: Kumar Gala

    Anton Vorontsov
     
  • Enable math emulation and ucc_geth and some PHYs mpc83xx boards use.

    Signed-off-by: Kim Phillips
    Signed-off-by: Kumar Gala

    Kim Phillips
     
  • calling platform_device_register after platform_device_alloc causes
    this:

    kobject (c3841a70): tried to init an initialized object, something is seriously wrong.
    Call Trace:
    [c381fe20] [c0007bb8] show_stack+0x3c/0x194 (unreliable)
    [c381fe50] [c01322a8] kobject_init+0xb8/0xbc
    [c381fe60] [c01591cc] device_initialize+0x30/0x9c
    [c381fe80] [c015ee34] platform_device_register+0x1c/0x34
    [c381fea0] [c02f1fe0] of_fsl_spi_probe+0x21c/0x22c
    [c381ff30] [c02f2044] fsl_spi_init+0x54/0x160
    [c381ff60] [c02f3924] __machine_initcall_mpc832x_rdb_mpc832x_spi_init+0x120/0x138
    [c381ff70] [c02e61b4] kernel_init+0x98/0x284
    [c381fff0] [c000f740] kernel_thread+0x44/0x60

    fixed by calling platform_device_add (second half of
    platform_device_register) instead.

    Signed-off-by: Kim Phillips
    Signed-off-by: Kumar Gala

    Kim Phillips
     
  • arch/powerpc/platforms/83xx/mpc832x_rdb.c: In function ‘mpc832x_rdb_setup_arch’:
    arch/powerpc/platforms/83xx/mpc832x_rdb.c:104: warning: ‘np’ is used uninitialized in this function

    Signed-off-by: Kim Phillips
    Signed-off-by: Kumar Gala

    Kim Phillips
     
  • The e300 c3 and c4 variants support hardware performance monitor counters
    which are identical to those found in the e500.

    Signed-off-by: Andy Fleming
    Signed-off-by: Kumar Gala

    Andy Fleming
     
  • Some of the more recent e300 cores have the same performance monitor
    implementation as the e500. e300 isn't book-e, so the name isn't
    really appropriate. In preparation for e300 support, rename a bunch
    of fsl_booke things to say fsl_emb (Freescale Embedded Performance Monitors).

    Signed-off-by: Andy Fleming
    Signed-off-by: Kumar Gala

    Andy Fleming
     
  • Cleaned up IRQ layout and removed unsused ISU allocations.
    Fixed RTC address typo from /dts-v1/ conversion.
    Incorporated list suggestions to use an "iomega," vendor prefix,
    and to use a node reference rather than a hard path.

    Signed-off-by: Jon Loeliger
    Signed-off-by: Kumar Gala

    Jon Loeliger
     
  • cpm_uart_core has a dependency on fsl,cpm-brg/clock-frequency, this
    means that a .dts that uses the cpm uart driver needs to supply a
    clock-frequency entry for get_brgfreq to return a meaningful number.

    Signed-off-by: Bryan O'Donoghue
    Signed-off-by: Kumar Gala

    Bryan O'Donoghue
     
  • The 8313 rdb has a ds1339 at address 0x68.

    Signed-off-by: Kim Phillips
    Signed-off-by: Kumar Gala

    Kim Phillips
     
  • Currently, update_mmu_cache will crash if given a no-access PTE.
    There's no need to synchronize dcache/icache unless it's an exec
    mapping -- however, due to the existence of older glibc versions that
    execute out of a read-but-no-exec page, readability is tested instead.

    This assumes no exec-only mappings; if such mappings become supported,
    they will need to go through the kmap_atomic() version of
    dcache/icache synchronization.

    This fixes a bug reported by some users where the kernel would crash
    while dumping core on a threaded program.

    Signed-off-by: Scott Wood
    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Scott Wood
     
  • The patch to legacy_serial.c (1a7507c7da2df6856e085e0fbb0c9ea8c12ac4e,
    Reduce code duplication in legacy_serial, add UART parent types) changed
    the semantics for opb ports from type = "opb" || compatible = "ibm,opb"
    to type = "opb" && compatible = "ibm,opb".

    The result is serial ports on our QS21s (Cell blades) don't get found,
    and for some reason the machine doesn't boot at all - possibly it's
    panicking due to lack of a console?

    The fix is to add two entries to the of_device_id table, one that looks
    for type = "opb" and the other compatible = "ibm,opb".

    Signed-off-by: Michael Ellerman
    Acked-by: Paul Gortmaker
    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Michael Ellerman