1. 09 10月, 2013 1 次提交
  2. 29 8月, 2013 1 次提交
    • L
      regmap: rbtree: Make cache_present bitmap per node · 3f4ff561
      Lars-Peter Clausen 提交于
      With devices which have a dense and small register map but placed at a large
      offset the global cache_present bitmap imposes a huge memory overhead. Making
      the cache_present per rbtree node avoids the issue and easily reduces the memory
      footprint by a factor of ten. For devices with a more sparse map or without a
      large base register offset the memory usage might increase slightly by a few
      bytes, but not significantly. E.g. for a device which has ~50 registers at
      offset 0x4000 the memory footprint of the register cache goes down form 2496
      bytes to 175 bytes.
      
      Moving the bitmap to a per node basis means that the handling of the bitmap is
      now cache implementation specific and can no longer be managed by the core. The
      regcache_sync_block() function is extended by a additional parameter so that the
      cache implementation can tell the core which registers in the block are set and
      which are not. The parameter is optional and if NULL the core assumes that all
      registers are set. The rbtree cache also needs to implement its own drop
      callback instead of relying on the core to handle this.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      3f4ff561
  3. 09 8月, 2013 1 次提交
    • I
      regmap: regcache: allow read-only regs to be cached · 515f2261
      Ionut Nicu 提交于
      The regmap_writeable() check should not be done in
      regcache_write() because this prevents read-only
      registers to be cached. After a read on a read-only
      register its value will not be stored in the cache
      and the next time someone will try to read it the
      value will be read from the bus instead of the
      cache.
      
      Instead the regmap_writeable() check should be done
      in _regmap_write() to prevent callers from writing
      to read-only registers.
      Signed-off-by: NIonut Nicu <ioan.nicu.ext@nsn.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      515f2261
  4. 05 8月, 2013 1 次提交
    • L
      regmap: cache: Make sure to sync the last register in a block · 2d49b598
      Lars-Peter Clausen 提交于
      regcache_sync_block_raw_flush() expects the address of the register after last
      register that needs to be synced as its parameter. But the last call to
      regcache_sync_block_raw_flush() in regcache_sync_block_raw() passes the address
      of the last register in the block. This effectively always skips over the last
      register in a block, even if it needs to be synced. In order to fix it increase
      the address by one register.
      
      The issue was introduced in commit 75a5f89f ("regmap: cache: Write consecutive
      registers in a single block write").
      
      Cc: stable@vger.kernel.org # 3.10+
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      2d49b598
  5. 03 6月, 2013 1 次提交
  6. 24 5月, 2013 1 次提交
  7. 23 5月, 2013 1 次提交
  8. 12 5月, 2013 1 次提交
  9. 05 4月, 2013 2 次提交
  10. 30 3月, 2013 4 次提交
  11. 27 3月, 2013 1 次提交
  12. 04 3月, 2013 3 次提交
  13. 02 1月, 2013 1 次提交
    • M
      regmap: flat: Add flat cache type · 2ac902ce
      Mark Brown 提交于
      While for I2C and SPI devices the overhead of using rbtree for devices with
      only one block of registers is negligible the same isn't always going to
      be true for MMIO devices where the I/O costs are very much lower. Cater
      for these devices by adding a simple flat array type for them where the
      lookups are simple array accesses, taking us right back to the original
      ASoC cache implementation.
      
      Thanks to Magnus Damm for the discussion which prompted this.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      2ac902ce
  14. 13 4月, 2012 2 次提交
    • S
      regmap: implement register striding · edc9ae42
      Stephen Warren 提交于
      regmap_config.reg_stride is introduced. All extant register addresses
      are a multiple of this value. Users of serial-oriented regmap busses will
      typically set this to 1. Users of the MMIO regmap bus will typically set
      this based on the value size of their registers, in bytes, so 4 for a
      32-bit register.
      
      Throughout the regmap code, actual register addresses are used. Wherever
      the register address is used to index some array of values, the address
      is divided by the stride to determine the index, or vice-versa. Error-
      checking is added to all entry-points for register address data to ensure
      that register addresses actually satisfy the specified stride. The MMIO
      bus ensures that the specified stride is large enough for the register
      size.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      edc9ae42
    • S
      regmap: introduce fast_io busses, and use a spinlock for them · a42678c4
      Stephen Warren 提交于
      Some bus types have very fast IO. For these, acquiring a mutex for every
      IO operation is a significant overhead. Allow busses to indicate their IO
      is fast, and enhance regmap to use a spinlock for those busses.
      
      [Currently limited to native endian registers -- broonie]
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      a42678c4
  15. 10 4月, 2012 1 次提交
    • S
      regmap: implement register striding · f01ee60f
      Stephen Warren 提交于
      regmap_config.reg_stride is introduced. All extant register addresses
      are a multiple of this value. Users of serial-oriented regmap busses will
      typically set this to 1. Users of the MMIO regmap bus will typically set
      this based on the value size of their registers, in bytes, so 4 for a
      32-bit register.
      
      Throughout the regmap code, actual register addresses are used. Wherever
      the register address is used to index some array of values, the address
      is divided by the stride to determine the index, or vice-versa. Error-
      checking is added to all entry-points for register address data to ensure
      that register addresses actually satisfy the specified stride. The MMIO
      bus ensures that the specified stride is large enough for the register
      size.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      f01ee60f
  16. 06 4月, 2012 1 次提交
  17. 03 4月, 2012 1 次提交
  18. 12 3月, 2012 1 次提交
    • P
      device.h: cleanup users outside of linux/include (C files) · 51990e82
      Paul Gortmaker 提交于
      For files that are actively using linux/device.h, make sure
      that they call it out.  This will allow us to clean up some
      of the implicit uses of linux/device.h within include/*
      without introducing build regressions.
      
      Yes, this was created by "cheating" -- i.e. the headers were
      cleaned up, and then the fallout was found and fixed, and then
      the two commits were reordered.  This ensures we don't introduce
      build regressions into the git history.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      51990e82
  19. 24 2月, 2012 5 次提交
  20. 18 2月, 2012 2 次提交
  21. 16 2月, 2012 1 次提交
    • L
      regmap: Fix cache defaults initialization from raw cache defaults · 61cddc57
      Lars-Peter Clausen 提交于
      Currently registers with a value of 0 are ignored when initializing the register
      defaults from raw defaults. This worked in the past, because registers without a
      explicit default were assumed to have a default value of 0. This was changed in
      commit b03622a8 ("regmap: Ensure rbtree syncs registers set to zero properly").
      As a result registers, which have a raw default value of 0 are now assumed to
      have no default. This again can result in unnecessary writes when syncing the
      cache. It will also result in unnecessary reads for e.g. the first update
      operation. In the case where readback is not possible this will even let the
      update operation fail, if the register has not been written to before.
      
      So this patch removes the check. Instead it adds a check to ignore raw defaults
      for registers which are volatile, since those registers are not cached.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Cc: stable@vger.kernel.org
      61cddc57
  22. 31 1月, 2012 1 次提交
  23. 26 1月, 2012 3 次提交
  24. 23 1月, 2012 1 次提交
    • M
      regmap: Support register patch sets · 22f0d90a
      Mark Brown 提交于
      Device manufacturers frequently provide register sequences, usually not
      fully documented, to be run at startup in order to provide better defaults
      for devices (for example, improving performance in the light of silicon
      evaluation). Support such updates by allowing drivers to register update
      sets with the core. These updates will be written to the device immediately
      and will also be rewritten when the cache is synced.
      
      The assumption is that the reason for resyncing the cache will always be
      that the device has been powered off. If this turns out to not be the case
      then a separate operation can be provided.
      
      Currently the implementation only allows a single set of updates to be
      specified for a device, this could be extended in future.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      22f0d90a
  25. 13 12月, 2011 1 次提交
  26. 01 12月, 2011 1 次提交