1. 07 1月, 2013 2 次提交
  2. 29 11月, 2012 2 次提交
  3. 23 11月, 2012 4 次提交
    • T
      dma: mv_xor: fix error handling path · 73d9cdca
      Thomas Petazzoni 提交于
      The ->probe() function of the mv_xor function contains in its error
      handling code a loop to cleanup the XOR channels that had been
      successfully initialized if some other XOR channel fails to be
      initialized. It does that by traveling the list of XOR channels, and
      cleanup those for which the pointer is not NULL.
      
      However, since the mv_xor_channel_add() function return a PTR_ERR
      style value, the pointer is not NULL on error. So, when handling the
      error of a given channel initialization, we cleanup this channel
      initialization and mark this channel entry as NULL in the array. This
      allows the remaining of the cleanup (for other channels) to work
      properly.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      73d9cdca
    • T
      dma: mv_xor: fix error checking of irq_of_parse_and_map() · f8eb9e7d
      Thomas Petazzoni 提交于
      The irq_of_parse_and_map() function returns 0 on failure, and does not
      return an error code, so we fix the calling site of
      irq_of_parse_and_map() in the mv_xor driver.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      f8eb9e7d
    • T
      dma: mv_xor: use request_irq() instead of devm_request_irq() · 2d0a0745
      Thomas Petazzoni 提交于
      Even through the usage of devm_*() functions is generally recommended
      over their classic variants, in the case of devm_request_irq()
      combined with irq_of_parse_and_map(), it doesn't work nicely.
      
      We have the following scenario:
      
       irq_of_parse_and_map(...)
       devm_request_irq(...)
      
      For some reason, the driver initialization fails at a later
      point. Since irq_of_parse_and_map() is no device-managed, we do a:
      
       irq_dispose_mapping(...)
      
      Unfortunately, this doesn't work, because the free_irq() must be done
      prior to calling irq_dispose_mapping(). But with the devm mechanism,
      the automatic free_irq() would happen only after we get out of the
      ->probe() function.
      
      So basically, we revert to using request_irq() with traditional error
      handling, so that in case of error, free_irq() gets called before
      irq_dispose_mapping().
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      2d0a0745
    • T
      dma: mv_xor: clear the window override control registers · c4b4b732
      Thomas Petazzoni 提交于
      The XOR channels on Marvell SoCs have a Window Override Control
      register that allow to do some fancy things with addresses. Those
      features are not used by the driver, but some U-Boot versions anyway
      modify those registers.
      
      For some reason, the U-Boot on OpenBlocks AX3-4 was setting an invalid
      value in those registers when the addition 2 GB DRAM chip was plugged
      into the board, causing the XOR driver to fail in using the XOR
      engines.
      
      By setting those registers to 0 during the driver initialization, we
      ensure that the registers are configured according with the driver
      operation model.
      
      Thanks to Lior Amsalem <alior@marvell.com> for his help in debugging
      this problem.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      c4b4b732
  4. 20 11月, 2012 26 次提交
  5. 19 9月, 2012 1 次提交
  6. 09 5月, 2012 1 次提交
  7. 13 3月, 2012 4 次提交