1. 11 2月, 2013 1 次提交
  2. 29 1月, 2013 2 次提交
  3. 14 1月, 2013 2 次提交
  4. 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
  5. 11 12月, 2012 1 次提交
    • M
      regmap: debugfs: Cache offsets of valid regions for dump · 5166b7c0
      Mark Brown 提交于
      Avoid doing a linear scan of the entire register map for each read() of
      the debugfs register dump by recording the offsets where valid registers
      exist when we first read the registers file. This assumes the set of
      valid registers never changes, if this is not the case invalidation of
      the cache will be required.
      
      This could be further improved for large blocks of contiguous registers
      by calculating the register we will read from within the block - currently
      we do a linear scan of the block. An rbtree may also be worthwhile.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      5166b7c0
  6. 06 12月, 2012 1 次提交
  7. 21 11月, 2012 1 次提交
  8. 17 10月, 2012 1 次提交
  9. 15 10月, 2012 2 次提交
  10. 18 6月, 2012 1 次提交
    • K
      regmap: Add support for register indirect addressing. · 6863ca62
      Krystian Garbaciak 提交于
      Devices with register paging or indirectly accessed registers can configure
      register mapping to map those on virtual address range. During access to
      virtually mapped register range, indirect addressing is processed
      automatically, in following steps:
        1. selector for page or indirect register is updated (when needed);
        2. register in data window is accessed.
      
      Configuration should provide minimum and maximum register for virtual range,
      details of selector field for page selection, minimum and maximum register of
      data window for indirect access.
      
      Virtual range registers are managed by cache as well as direct access
      registers. In order to make indirect access more efficient, selector register
      should be declared as non-volatile, if possible.
      
      struct regmap_config is extended with the following:
      struct regmap_range_cfg	*ranges;
      unsigned int		n_ranges;
      
      [Also reordered debugfs init to later on since the cleanup code was
      conflicting with the new cleanup code for ranges anyway -- broonie]
      Signed-off-by: NKrystian Garbaciak <krystian.garbaciak@diasemi.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      6863ca62
  11. 09 5月, 2012 1 次提交
  12. 01 5月, 2012 1 次提交
  13. 13 4月, 2012 6 次提交
  14. 10 4月, 2012 3 次提交
  15. 06 4月, 2012 2 次提交
  16. 01 4月, 2012 1 次提交
  17. 24 2月, 2012 1 次提交
    • M
      regmap: Supply ranges to the sync operations · ac8d91c8
      Mark Brown 提交于
      In order to allow us to support partial sync operations add minimum and
      maximum register arguments to the sync operation and update the rbtree
      and lzo caches to use this new information. The LZO implementation is
      obviously not good, we could exit the iteration earlier, but there may
      be room for more wide reaching optimisation there.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      ac8d91c8
  18. 07 2月, 2012 1 次提交
  19. 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
  20. 20 1月, 2012 1 次提交
  21. 13 12月, 2011 1 次提交
  22. 21 11月, 2011 1 次提交
  23. 17 11月, 2011 1 次提交
  24. 08 11月, 2011 1 次提交
  25. 29 9月, 2011 1 次提交
  26. 20 9月, 2011 4 次提交
    • D
      regmap: Add the LZO cache support · 2cbbb579
      Dimitris Papastamos 提交于
      This patch adds support for LZO compression when storing the register
      cache.
      
      For a typical device whose register map would normally occupy 25kB or 50kB
      by using the LZO compression technique, one can get down to ~5-7kB.  There
      might be a performance penalty associated with each individual read/write
      due to decompressing/compressing the underlying cache, however that should not
      be noticeable.  These memory benefits depend on whether the target architecture
      can get rid of the memory occupied by the original register defaults cache
      which is marked as __devinitconst.  Nevertheless there will be some memory
      gain even if the target architecture can't get rid of the original register
      map, this should be around ~30-32kB instead of 50kB.
      Signed-off-by: NDimitris Papastamos <dp@opensource.wolfsonmicro.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      2cbbb579
    • D
      regmap: Add the rbtree cache support · 28644c80
      Dimitris Papastamos 提交于
      This patch adds support for the rbtree cache compression type.
      
      Each rbnode manages a variable length block of registers.  There can be no
      two nodes with overlapping blocks.  Each block has a base register and a
      currently top register, all the other registers, if any, lie in between these
      two and in ascending order.
      
      The reasoning behind the construction of this rbtree is simple.  In the
      snd_soc_rbtree_cache_init() function, we iterate over the register defaults
      provided by the regcache core.  For each register value that is non-zero we
      insert it in the rbtree.  In order to determine in which rbnode we need
      to add the register, we first look if there is another register already
      added that is adjacent to the one we are about to add.  If that is the case
      we append it in that rbnode block, otherwise we create a new rbnode
      with a single register in its block and add it to the tree.
      
      There are various optimizations across the implementation to speed up lookups
      by caching the most recently used rbnode.
      Signed-off-by: NDimitris Papastamos <dp@opensource.wolfsonmicro.com>
      Tested-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      28644c80
    • D
      regmap: Add the indexed cache support · 195af65c
      Dimitris Papastamos 提交于
      This is the simplest form of a cache available in regcache.  Any
      registers whose default value is 0 are ignored.  If any of those
      registers are modified in the future, they will be placed in the
      cache on demand.  The cache layout is essentially using the provided
      register defaults by the regcache core directly and does not re-map
      it to another representation.
      Signed-off-by: NDimitris Papastamos <dp@opensource.wolfsonmicro.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      195af65c
    • D
      regmap: Introduce caching support · 9fabe24e
      Dimitris Papastamos 提交于
      This patch introduces caching support for regmap.  The regcache API
      has evolved essentially out of ASoC soc-cache so most of the actual
      caching types (except LZO) have been tested in the past.
      
      The purpose of regcache is to optimize in time and space the handling
      of register caches.  Time optimization is achieved by not having to go
      over a slow bus like I2C to read the value of a register, instead it is
      cached locally in memory and can be retrieved faster.  Regarding space
      optimization, some of the cache types are better at packing the caches,
      for e.g. the rbtree and the LZO caches.  By doing this the sacrifice in
      time still wins over doing I2C transactions.
      Signed-off-by: NDimitris Papastamos <dp@opensource.wolfsonmicro.com>
      Tested-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      9fabe24e