1. 24 Feb, 2009 1 commit
    • Roel Kluin's avatar
      i2c: Timeouts reach -1 · a746b578
      Roel Kluin authored
      With a postfix decrement these timeouts reach -1 rather than 0, but
      after the loop it is tested whether they have become 0.
      
      As pointed out by Jean Delvare, the condition we are waiting for should
      also be tested before the timeout. With the current order, you could
      exit with a timeout error while the job is actually done.
      Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      a746b578
  2. 07 Jan, 2009 1 commit
  3. 27 Nov, 2008 1 commit
  4. 07 Oct, 2008 1 commit
  5. 03 Oct, 2008 1 commit
  6. 09 Sep, 2008 3 commits
  7. 07 Aug, 2008 2 commits
  8. 14 Jul, 2008 1 commit
  9. 07 Jul, 2008 1 commit
  10. 02 Jun, 2008 1 commit
  11. 22 Apr, 2008 2 commits
  12. 19 Apr, 2008 1 commit
  13. 24 Feb, 2008 1 commit
  14. 17 Feb, 2008 1 commit
  15. 27 Jan, 2008 2 commits
  16. 19 Oct, 2007 1 commit
  17. 12 Oct, 2007 1 commit
  18. 09 Sep, 2007 1 commit
  19. 12 Jul, 2007 1 commit
  20. 26 May, 2007 1 commit
    • Enrico Scholz's avatar
      [ARM] 4403/1: Make the PXA-I2C driver work with lockdep validator · 6776f3d2
      Enrico Scholz authored
      Using lockdep validator causes warnings like
      
        INFO: trying to register non-static key.
        the code is fine but needs lockdep annotation.
        turning off the locking correctness validator.
        [<c00241a0>] (dump_stack+0x0/0x14) from [<c00520f8>] (__lock_acquire+0x150/0xc40)
        [<c0051fa8>] (__lock_acquire+0x0/0xc40) from [<c00530a0>] (lock_acquire+0x5c/0x70)
        [<c0053044>] (lock_acquire+0x0/0x70) from [<c01d9e44>] (_spin_lock_irq+0x48/0x58)
         r7:c07e5144 r6:00000000 r5:c015fb94 r4:c07e50b8
        [<c01d9dfc>] (_spin_lock_irq+0x0/0x58) from [<c015fb94>] (i2c_pxa_xfer+0x110/0x2e0)
         r5:c07e50b8 r4:0000001f
      
      This is caused by memcpy'ing a statical initialized spin-lock. This patch
      removes a static pxa_i2c structure which was used only as a source for this
      memcpy() operation. Instead of, members and the spinlock will be
      initialized manually.
      Signed-off-by: default avatarEnrico Scholz <enrico.scholz@sigma-chemnitz.de>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      6776f3d2
  21. 10 May, 2007 1 commit
  22. 01 May, 2007 2 commits
  23. 21 Apr, 2007 2 commits
    • Eric Miao's avatar
      [ARM] 4304/1: removes the unnecessary bit number from CKENnn_XXXX · 7053acbd
      Eric Miao authored
      This patch removes the unnecessary bit number from CKENnn_XXXX
      definitions for PXA, so that
      
      	CKEN0_PWM0 --> CKEN_PWM0
      	CKEN1_PWM1 --> CKEN_PWM1
      	...
      	CKEN24_CAMERA --> CKEN_CAMERA
      
      The reasons for the change of these defitions are:
      
      1. they do not scale - they are currently valid for pxa2xx, but
      definitely not valid for pxa3xx, e.g., pxa3xx has bit 3 for camera
      instead of bit 24
      
      2. they are unnecessary - the peripheral name within the definition
      has already announced its usage, we don't need those bit numbers
      to know which peripheral we are going to enable/disable clock for
      
      3. they are inconvenient - think about this: a driver programmer
      for pxa has to remember which bit in the CKEN register to turn
      on/off
      
      Another change in the patch is to make the definitions equal to its
      clock bit index, so that
      
         #define CKEN_CAMERA  (24)
      
      instead of
      
         #define CKEN_CAMERA  (1 << 24)
      
      this change, however, will add a run-time bit shift operation in
      pxa_set_cken(), but the benefit of this change is that it scales
      when bit index exceeds 32, e.g., pxa3xx has two registers CKENA
      and CKENB, totally 64 bit for this, suppose CAMERA clock enabling
      bit is CKENB:10, one can simply define CKEN_CAMERA to be (32 + 10)
      and so that pxa_set_cken() need minimum change to adapt to that.
      Signed-off-by: default avatareric miao <eric.y.miao@gmail.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      7053acbd
    • Matej Kenda's avatar
      [ARM] 4246/1: i2c-pxa: add adapter class to platform specific data · a79220b7
      Matej Kenda authored
      Reposted patch for kernel 2.6.21-rc2.
      
      The driver i2c-pxa doesn't set the class member in i2c_adapter, which
      is used to register the I2C adapter. The hwmon (sensors) drivers (e.g.
      adm1021) that are connected to a i2c-pxa adapter don't attach because
      they expect that the adapter supports class I2C_CLASS_HWMON.
      
      This patch adds functionality to allow platforms to set the class and
      pass it as platform_data to the i2c-pxa driver. Sample usage in
      platform code:
      
      static struct i2c_pxa_platform_data my_i2c_platform_data = {
      	.class = I2C_CLASS_HWMON
      };
      
      static void __init my_platform_init(void)
      {
      	(void) platform_add_devices(devices, ARRAY_SIZE(devices));
      
      	pxa_set_i2c_info(&my_i2c_platform_data);
      }
      Signed-off-by: default avatarMatej Kenda <matej.kenda@hermes-softlab.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      a79220b7
  24. 08 Feb, 2007 1 commit
  25. 30 Nov, 2006 1 commit
  26. 28 Oct, 2006 1 commit
  27. 05 Oct, 2006 1 commit
    • David Howells's avatar
      IRQ: Maintain regs pointer globally rather than passing to IRQ handlers · 7d12e780
      David Howells authored
      Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
      of passing regs around manually through all ~1800 interrupt handlers in the
      Linux kernel.
      
      The regs pointer is used in few places, but it potentially costs both stack
      space and code to pass it around.  On the FRV arch, removing the regs parameter
      from all the genirq function results in a 20% speed up of the IRQ exit path
      (ie: from leaving timer_interrupt() to leaving do_IRQ()).
      
      Where appropriate, an arch may override the generic storage facility and do
      something different with the variable.  On FRV, for instance, the address is
      maintained in GR28 at all times inside the kernel as part of general exception
      handling.
      
      Having looked over the code, it appears that the parameter may be handed down
      through up to twenty or so layers of functions.  Consider a USB character
      device attached to a USB hub, attached to a USB controller that posts its
      interrupts through a cascaded auxiliary interrupt controller.  A character
      device driver may want to pass regs to the sysrq handler through the input
      layer which adds another few layers of parameter passing.
      
      I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
      main part of the code on FRV and i386, though I can't test most of the drivers.
      I've also done partial conversion for powerpc and MIPS - these at least compile
      with minimal configurations.
      
      This will affect all archs.  Mostly the changes should be relatively easy.
      Take do_IRQ(), store the regs pointer at the beginning, saving the old one:
      
      	struct pt_regs *old_regs = set_irq_regs(regs);
      
      And put the old one back at the end:
      
      	set_irq_regs(old_regs);
      
      Don't pass regs through to generic_handle_irq() or __do_IRQ().
      
      In timer_interrupt(), this sort of change will be necessary:
      
      	-	update_process_times(user_mode(regs));
      	-	profile_tick(CPU_PROFILING, regs);
      	+	update_process_times(user_mode(get_irq_regs()));
      	+	profile_tick(CPU_PROFILING);
      
      I'd like to move update_process_times()'s use of get_irq_regs() into itself,
      except that i386, alone of the archs, uses something other than user_mode().
      
      Some notes on the interrupt handling in the drivers:
      
       (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
           the input_dev struct.
      
       (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
           something different depending on whether it's been supplied with a regs
           pointer or not.
      
       (*) Various IRQ handler function pointers have been moved to type
           irq_handler_t.
      Signed-Off-By: default avatarDavid Howells <dhowells@redhat.com>
      (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
      7d12e780
  28. 26 Sep, 2006 1 commit
  29. 02 Jul, 2006 1 commit
  30. 23 Mar, 2006 1 commit
  31. 06 Feb, 2006 1 commit
  32. 12 Jan, 2006 1 commit
    • Richard Purdie's avatar
      [ARM] 3237/1: PXA I2C driver updates · ece5f7b3
      Richard Purdie authored
      Patch from Richard Purdie
      
      This patch adds a check to see if the pxa i2c interface is enabled
      before allowing it to be used and resets it if found to be disabled.
      This automatically restores the interface if the device has been
      suspended and resumed without causing any suspend/resume call ordering
      issues.
      
      The patch also fixes a build warning and adds an appropriate module
      licence (the module is gpl according to the header).
      Signed-off-by: default avatarRichard Purdie <rpurdie@rpsys.net>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      ece5f7b3
  33. 09 Nov, 2005 1 commit