09 Jan, 2012

2 commits


21 Dec, 2011

2 commits

  • irq_set_chained_handler sets 'desc->handle_irq'.
    However this irq is called by handle_nested_irq from handle_twl4030_pih,
    and that uses action->thread_fn.

    So the handled set with irq_set_chained_handler is never called.

    So change to use request_threaded_irq instead - that sets the correct field.

    Tested on GTA04 Phoenux.

    Signed-off-by: NeilBrown
    Tested-by: Felipe Contreras
    Signed-off-by: Samuel Ortiz

    NeilBrown
     
  • As the interrupt source is only cleared by the threaded interrupt
    service routine, we need to make the base interrupt IRQF_ONESHOT.
    Without this, the first interrupt from the TWL4030 cause the CPU to
    enter an infinite loop trying to handle to interrupt but never
    clearing it.

    Signed-off-by: NeilBrown
    Tested-by: Felipe Contreras
    Signed-off-by: Samuel Ortiz

    NeilBrown
     

24 Oct, 2011

7 commits


27 Mar, 2011

2 commits

  • Converted with coccinelle.

    Signed-off-by: Thomas Gleixner
    Acked-by: Mark Brown
    Signed-off-by: Samuel Ortiz

    Thomas Gleixner
     
  • irq_desc checking in a function which is called with that irq
    descriptor locked, is pointless. Equally pointless as the irq desc
    check in the interrupt service routine. The driver sets those lines
    up, so that cant go away magically.

    Remove the open coded handler magic and use the proper accessor.

    No need to fiddle with irq_desc in the type setting function. The
    original value is in irq_data and the core code stores the new setting
    when the return value is 0.

    This driver needs to be converted to threaded interrupts and buslock.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Samuel Ortiz

    Thomas Gleixner
     

14 Jan, 2011

1 commit


29 Oct, 2010

2 commits

  • Fixes following sparse warnings for twl4030 and twl6030 irq files.

    drivers/mfd/twl4030-irq.c:783:5: warning: symbol 'twl4030_init_irq' was not
    declared. Should it be static?
    drivers/mfd/twl4030-irq.c:863:5: warning: symbol 'twl4030_exit_irq' was not
    declared. Should it be static?
    drivers/mfd/twl4030-irq.c:873:5: warning: symbol 'twl4030_init_chip_irq' was
    not declared. Should it be static?

    drivers/mfd/twl6030-irq.c:226:5: warning: symbol 'twl6030_init_irq' was not
    declared. Should it be static?
    drivers/mfd/twl6030-irq.c:290:5: warning: symbol 'twl6030_exit_irq' was not
    declared. Should it be static?

    Signed-off-by: G, Manjunath Kondaiah
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: Tony Lindgren
    Cc: Nishanth Menon
    Signed-off-by: Samuel Ortiz

    G, Manjunath Kondaiah
     
  • The chip TRM documentation contradicts itself about this bit, page 174
    of swcu050e says bit should be 0 for clear-on-read behavior, while
    page 487 says it should be 1. Testing shows it should be 1, so set
    the .set_cor flag accordingly. This is needed for upcoming BCI
    charging driver to function.

    Signed-off-by: Grazvydas Ignotas
    Acked-by: Tony Lindgren
    Signed-off-by: Samuel Ortiz

    Grazvydas Ignotas
     

08 Oct, 2010

1 commit


04 Oct, 2010

1 commit


28 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
     

01 Jan, 2010

1 commit


14 Dec, 2009

5 commits

  • This patch adds support for phoenix interrupt framework. New iInterrupt
    status register A, B, C are introduced in Phoenix and are cleared on write.
    Due to the differences in interrupt handling with respect to TWL4030,
    twl6030-irq.c is created for TWL6030 PMIC

    Signed-off-by: Rajendra Nayak
    Signed-off-by: Balaji T K
    Signed-off-by: Santosh Shilimkar
    Reviewed-by: Tony Lindgren
    Signed-off-by: Samuel Ortiz

    Balaji T K
     
  • This patch renames function names like twl4030_i2c_write_u8,
    twl4030_i2c_read_u8 to twl_i2c_write_u8, twl_i2c_read_u8
    and also common variable in twl-core.c

    Signed-off-by: Rajendra Nayak
    Signed-off-by: Balaji T K
    Signed-off-by: Santosh Shilimkar
    Acked-by: Kevin Hilman
    Signed-off-by: Samuel Ortiz

    Balaji T K
     
  • The upcoming TWL6030 is companion chip for OMAP4 like the current TWL4030
    for OMAP3. The common modules like RTC, Regulator creates opportunity
    to re-use the most of the code from twl4030.

    This patch renames few common drivers twl4030* files to twl* to enable
    the code re-use.

    Signed-off-by: Rajendra Nayak
    Signed-off-by: Balaji T K
    Signed-off-by: Santosh Shilimkar
    Acked-by: Kevin Hilman
    Signed-off-by: Samuel Ortiz

    Santosh Shilimkar
     
  • Signed-off-by: Alan Cox
    Signed-off-by: Samuel Ortiz

    Alan Cox
     
  • TWL5031 introduces two new interrupts in PIH. Moreover, BCI
    has changed remarkably and, thus, it's disabled when TWL5031
    is in use.

    Signed-off-by: Ilkka Koskinen
    Signed-off-by: Samuel Ortiz

    Ilkka Koskinen
     

17 Sep, 2009

1 commit


05 Aug, 2009

1 commit

  • The TWL4030 IRQ handler has a bug which leads to spinlock lock-up. It is
    calling the 'unmask' function in a process context. :The mask/unmask/ack
    functions are only designed to be called from the IRQ handler code,
    or the proper API interfaces found in linux/interrupt.h.

    Also there is no need to have IRQ chaining mechanism. The right way to
    handle this is to claim the parent interrupt as a standard interrupt
    and arrange for handle_twl4030_pih to take care of the rest of the devices.

    Mail thread on this issue can be found at:
    http://marc.info/?l=linux-arm-kernel&m=124629940123396&w=2

    Signed-off-by: Russell King
    Tested-by: Santosh Shilimkar
    Acked-by: Tony Lindgren
    Signed-off-by: Samuel Ortiz

    Russell King
     

18 Jun, 2009

1 commit

  • The defines and typedefs (hw_interrupt_type, no_irq_type, irq_desc_t) have
    been kept around for migration reasons. After more than two years it's
    time to remove them finally.

    This patch cleans up one of the remaining users. When all such patches
    hit mainline we can remove the defines and typedefs finally.

    Impact: cleanup

    Convert the last remaining users and remove the typedef.

    Signed-off-by: Thomas Gleixner
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Samuel Ortiz

    Thomas Gleixner
     

05 Apr, 2009

1 commit


04 Jan, 2009

1 commit


22 Oct, 2008

1 commit

  • - Move it into a separate file; clean and streamline it
    - Restructure the init code for reuse during secondary dispatch
    - Support both levels (primary, secondary) of IRQ dispatch
    - Use a workqueue for irq mask/unmask and trigger configuration

    Code for two subchips currently share that secondary handler code.
    One is the power subchip; its IRQs are now handled by this core,
    courtesy of this patch. The other is the GPIO module, which will
    be supported through a later patch.

    There are also minor changes to the header file, mostly related
    to GPIO support; nothing yet in mainline cares about those. A
    few references to OMAP-specific symbols are disabled; when they
    can all be removed, the TWL4030 support ceases being OMAP-specific.

    Signed-off-by: David Brownell
    Signed-off-by: Tony Lindgren
    Signed-off-by: Samuel Ortiz

    David Brownell