1. 15 10月, 2012 4 次提交
  2. 09 9月, 2012 1 次提交
  3. 31 8月, 2012 1 次提交
  4. 08 8月, 2012 1 次提交
  5. 04 8月, 2012 7 次提交
  6. 19 7月, 2012 1 次提交
  7. 06 7月, 2012 1 次提交
  8. 19 6月, 2012 1 次提交
  9. 18 6月, 2012 2 次提交
  10. 14 6月, 2012 1 次提交
  11. 08 6月, 2012 1 次提交
  12. 05 6月, 2012 2 次提交
  13. 03 6月, 2012 5 次提交
  14. 30 5月, 2012 1 次提交
  15. 23 5月, 2012 1 次提交
  16. 18 5月, 2012 1 次提交
  17. 15 5月, 2012 1 次提交
  18. 14 5月, 2012 2 次提交
  19. 09 5月, 2012 2 次提交
    • L
      regmap: fix possible memory corruption in regmap_bulk_read() · 6560ffd1
      Laxman Dewangan 提交于
      The function regmap_bulk_read() calls the regmap_read() for
      each register if set of register has volatile and cache is
      enabled. In this case, last few register read makes the memory
      corruption if the register size is not the size of unsigned int.
      The regam_read() takes argument as unsigned int for returning
      value and it update the value as
      	*val = map->format.parse_val(map->work_buf);
      This causes complete 4 bytes (size of unsigned int) to get written.
      Now if client pass the memory pointer for value which is equal to the
      required size of register count in regmap_bulk_read() then last few
      register read actually update the memory beyond passed pointer size.
      
      Avoid this by using local variable for read and then do memcpy()
      for actual byte copy to passed pointer based on register size.
      
      I allocated one pointer ptr and take first 16 bytes dump of that
      pointer then call regmap_bulk_read() with pointer which is just
      on top of this allocated pointer and register count of 128. Here
      register size is 1 byte.
      The memory trace of last 5 register read are as follows:
      
      [    5.438589] regmap_bulk_read after regamp_read() for register 122
      [    5.447421] 0xef993c20 0xef993c00 0x00000000 0x00000001
      [    5.467535] regmap_bulk_read after regamp_read() for register 123
      [    5.476374] 0xef993c20 0xef993c00 0x00000000 0x00000001
      [    5.496425] regmap_bulk_read after regamp_read() for register 124
      [    5.505260] 0xef993c20 0xef993c00 0x00000000 0x00000001
      [    5.525372] regmap_bulk_read after regamp_read() for register 125
      [    5.534205] 0xef993c00 0xef993c00 0x00000000 0x00000001
      [    5.554258] regmap_bulk_read after regamp_read() for register 126
      [    5.563100] 0xef990000 0xef993c00 0x00000000 0x00000001
      [    5.554258] regmap_bulk_read after regamp_read() for register 127
      [    5.587108] 0xef000000 0xef993c00 0x00000000 0x00000001
      
      Here it is observed that the memory content at first word started changing
      on last 3 regmap_read() and so corruption happened.
      Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      6560ffd1
    • M
      regmap: Implement dev_get_regmap() · 72b39f6f
      Mark Brown 提交于
      Use devres to implement dev_get_regmap(). This should mean that in almost
      all cases devices wishing to take advantage of framework features based on
      regmap shouldn't need to explicitly pass the regmap into the framework.
      This simplifies device setup a bit.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      72b39f6f
  20. 01 5月, 2012 3 次提交
  21. 13 4月, 2012 1 次提交
    • S
      regmap: fix compile errors in regmap-irq.c due to stride changes · a21361b9
      Stephen Warren 提交于
      Commit f01ee60f ("regmap: implement register striding") caused the
      compile errors below. Fix them.
      
      drivers/base/regmap/regmap-irq.c: In function 'regmap_irq_sync_unlock':
      drivers/base/regmap/regmap-irq.c:62:12: error: 'map' undeclared (first use in this function)
      drivers/base/regmap/regmap-irq.c:62:12: note: each undeclared identifier is reported only once for each function it appears in
      drivers/base/regmap/regmap-irq.c: In function 'regmap_irq_enable':
      drivers/base/regmap/regmap-irq.c:77:37: error: 'map' undeclared (first use in this function)
      drivers/base/regmap/regmap-irq.c: In function 'regmap_irq_disable':
      drivers/base/regmap/regmap-irq.c:85:37: error: 'map' undeclared (first use in this function)
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      a21361b9