1. 31 Jul, 2010 2 commits
    • Russell King's avatar
      ARM: AMBA: Add pclk support to AMBA bus infrastructure · 7cfe2494
      Russell King authored
      Some platforms gate the pclk (APB - the bus - clock) to the peripherals
      for power saving, along with the functional clock.  When devices are
      accessed without pclk enabled, the kernel will oops.
      
      This gives them two options:
      
      1. Leave all clocks on all the time.
      2. Attempt to gate pclk along with the functional clock.
      
      (With some hardware, pclk and the functional clock are gated by a single
      bit in a register.)
      
      (1) has the disadvantage that it causes increased power usage, which is
      bad news for battery operated devices.  (2) can lead to kernel oops if
      registers are accessed without the functional clock being enabled.
      
      So, introduce the apb_pclk signal in such a way existing drivers don't
      need to be updated.  Essentially, this means we guarantee that:
      
      1. pclk will be enabled whenever the driver is bound to a device -
         from probe() to remove() time.
      2. pclk will also be enabled when reading the primecell IDs from the device.
      
      In order to allow drivers to be incrementally updated to achieve greater
      power savings, we provide two additional calls to allow drivers to
      manage the pclk - amba_pclk_enable()/amba_pclk_disable().
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      7cfe2494
    • Linus Walleij's avatar
      ARM: 6278/2: fix regression in RealView after the introduction of pclk · 06385e49
      Linus Walleij authored
      The patch to add the apb_pclk to the AMBA/PrimeCell bus broke
      RealView, since the clockdevice is not registered at probe() time.
      This moves clock initialization to a core_initcall()
      
      [rmk:moved before the problematical commit to avoid bisect problems]
      Signed-off-by: default avatarLinus Walleij <linus.walleij@stericsson.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      06385e49
  2. 22 Jul, 2010 1 commit
  3. 15 Jul, 2010 3 commits
  4. 14 Jul, 2010 4 commits
  5. 12 Jul, 2010 8 commits
  6. 11 Jul, 2010 10 commits
  7. 10 Jul, 2010 3 commits
    • Russell King's avatar
      ARM: lockdep: fix unannotated irqs-on · ac78884e
      Russell King authored
      CPU: Testing write buffer coherency: ok
      ------------[ cut here ]------------
      WARNING: at kernel/lockdep.c:3145 check_flags+0xcc/0x1dc()
      Modules linked in:
      [<c0035120>] (unwind_backtrace+0x0/0xf8) from [<c0355374>] (dump_stack+0x20/0x24)
      [<c0355374>] (dump_stack+0x20/0x24) from [<c0060c04>] (warn_slowpath_common+0x58/0x70)
      [<c0060c04>] (warn_slowpath_common+0x58/0x70) from [<c0060c3c>] (warn_slowpath_null+0x20/0x24)
      [<c0060c3c>] (warn_slowpath_null+0x20/0x24) from [<c008f224>] (check_flags+0xcc/0x1dc)
      [<c008f224>] (check_flags+0xcc/0x1dc) from [<c00945dc>] (lock_acquire+0x50/0x140)
      [<c00945dc>] (lock_acquire+0x50/0x140) from [<c0358434>] (_raw_spin_lock+0x50/0x88)
      [<c0358434>] (_raw_spin_lock+0x50/0x88) from [<c00fd114>] (set_task_comm+0x2c/0x60)
      [<c00fd114>] (set_task_comm+0x2c/0x60) from [<c007e184>] (kthreadd+0x30/0x108)
      [<c007e184>] (kthreadd+0x30/0x108) from [<c0030104>] (kernel_thread_exit+0x0/0x8)
      ---[ end trace 1b75b31a2719ed1c ]---
      possible reason: unannotated irqs-on.
      irq event stamp: 3
      hardirqs last  enabled at (2): [<c0059bb0>] finish_task_switch+0x48/0xb0
      hardirqs last disabled at (3): [<c002f0b0>] ret_slow_syscall+0xc/0x1c
      softirqs last  enabled at (0): [<c005f3e0>] copy_process+0x394/0xe5c
      softirqs last disabled at (0): [<(null)>] (null)
      
      Fix this by ensuring that the lockdep interrupt state is manipulated in
      the appropriate places.  We essentially treat userspace as an entirely
      separate environment which isn't relevant to lockdep (lockdep doesn't
      monitor userspace.)  We don't tell lockdep that IRQs will be enabled
      in that environment.
      
      Instead, when creating kernel threads (which is a rare event compared
      to entering/leaving userspace) we have to update the lockdep state.  Do
      this by starting threads with IRQs disabled, and in the kthread helper,
      tell lockdep that IRQs are enabled, and enable them.
      
      This provides lockdep with a consistent view of the current IRQ state
      in kernel space.
      
      This also revert portions of 0d928b0b
      which didn't fix the problem.
      Tested-by: default avatarMing Lei <tom.leiming@gmail.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      ac78884e
    • Guenter Roeck's avatar
      i2c/mips: Fix error return codes from Sibyte i2c bus driver · 102b59c6
      Guenter Roeck authored
      Sibyte i2c bus driver returns non-descriptive error values.
      Update to return error values as defined in Documentation/i2c/fault-codes.
      Signed-off-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      102b59c6
    • Jean Delvare's avatar
      i2c: Fix probability check · 827900c5
      Jean Delvare authored
      The new unified probing function differs from the original code, and
      the preliminary test whether probing is possible must be updated
      accordingly.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      827900c5
  8. 09 Jul, 2010 9 commits