1. 13 11月, 2008 1 次提交
    • J
      atmel_spi: work-around required for new HW bug in AT91SAM9263 Rev.B SPI controller · 50d7d5bf
      Jean-Christophe Lallemand 提交于
      We're working with an AT91SAM9263 Rev B in our design and I experienced
      some inconsistency in spi-based touchscreen usage between our board and
      the Atmel evaluation kit we have that runs on a Rev A chip.
      
      The data was apparently delayed by 1 byte and got ridiculous data out of
      the touchscreen driver, very strange.  As everything looked normal in
      the spi, touchscreen and dma logs, I contacted the Atmel support and
      they triggered me on a new HW bug that appeared in the Rev B SPI
      controller.
      
      The problem is that the SPI controller on the Rev B needs that the
      software reset is performed two times so that it's performed correctly.
      
      Applying the patch below solves the issue on my Rev B board.  I've tested
      it as well on my Rev A evaluation kit and it has apparently no unwanted
      side effect, things continue to work as expected.
      Signed-off-by: NHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
      Cc: David Brownell <david-b@pacbell.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      50d7d5bf
  2. 07 8月, 2008 1 次提交
  3. 05 8月, 2008 1 次提交
    • G
      atmel_spi: fix hang due to missed interrupt · dc329442
      Gerard Kam 提交于
      For some time my at91sam9260 board with JFFS2 on serial flash (m25p80)
      would hang when accessing the serial flash and SPI bus.  Slowing the SPI
      clock down to 9 MHz reduced the occurrence of the hang from "always"
      during boot to a nuisance level that allowed other SW development to
      continue.  Finally had to address this issue when an application stresses
      the I/O to always cause a hang.
      
      Hang seems to be caused by a missed SPI interrupt, so that the task ends
      up waiting forever after calling spi_sync().  The fix has 2 parts.  First
      is to halt the DMA engine before the "current" PDC registers are loaded.
      This ensures that the "next" registers are loaded before the DMA operation
      takes off.  The second part of the fix is a kludge that adds a
      "completion" interrupt in case the ENDRX interrupt for the last segment of
      the DMA chaining operation was missed.
      
      The patch allows the SPI clock for the serial flash to be increased from 9
      MHz to 15 MHz (or more?).  No hangs or SPI overruns were encountered.
      
      Haavard: while this patch does indeed improve things, I still see overruns
      and CRC errors on my NGW100 board when running the DataFlash at 10 MHz.
      However, I think some improvement is better than nothing, so I'm passing
      this on for inclusion in 2.6.27.
      Signed-off-by: NGerard Kam <gerardk5@verizon.net>
      Signed-off-by: NHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
      Cc: David Brownell <david-b@pacbell.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      dc329442
  4. 27 7月, 2008 1 次提交
    • F
      dma-mapping: add the device argument to dma_mapping_error() · 8d8bb39b
      FUJITA Tomonori 提交于
      Add per-device dma_mapping_ops support for CONFIG_X86_64 as POWER
      architecture does:
      
      This enables us to cleanly fix the Calgary IOMMU issue that some devices
      are not behind the IOMMU (http://lkml.org/lkml/2008/5/8/423).
      
      I think that per-device dma_mapping_ops support would be also helpful for
      KVM people to support PCI passthrough but Andi thinks that this makes it
      difficult to support the PCI passthrough (see the above thread).  So I
      CC'ed this to KVM camp.  Comments are appreciated.
      
      A pointer to dma_mapping_ops to struct dev_archdata is added.  If the
      pointer is non NULL, DMA operations in asm/dma-mapping.h use it.  If it's
      NULL, the system-wide dma_ops pointer is used as before.
      
      If it's useful for KVM people, I plan to implement a mechanism to register
      a hook called when a new pci (or dma capable) device is created (it works
      with hot plugging).  It enables IOMMUs to set up an appropriate
      dma_mapping_ops per device.
      
      The major obstacle is that dma_mapping_error doesn't take a pointer to the
      device unlike other DMA operations.  So x86 can't have dma_mapping_ops per
      device.  Note all the POWER IOMMUs use the same dma_mapping_error function
      so this is not a problem for POWER but x86 IOMMUs use different
      dma_mapping_error functions.
      
      The first patch adds the device argument to dma_mapping_error.  The patch
      is trivial but large since it touches lots of drivers and dma-mapping.h in
      all the architecture.
      
      This patch:
      
      dma_mapping_error() doesn't take a pointer to the device unlike other DMA
      operations.  So we can't have dma_mapping_ops per device.
      
      Note that POWER already has dma_mapping_ops per device but all the POWER
      IOMMUs use the same dma_mapping_error function.  x86 IOMMUs use device
      argument.
      
      [akpm@linux-foundation.org: fix sge]
      [akpm@linux-foundation.org: fix svc_rdma]
      [akpm@linux-foundation.org: build fix]
      [akpm@linux-foundation.org: fix bnx2x]
      [akpm@linux-foundation.org: fix s2io]
      [akpm@linux-foundation.org: fix pasemi_mac]
      [akpm@linux-foundation.org: fix sdhci]
      [akpm@linux-foundation.org: build fix]
      [akpm@linux-foundation.org: fix sparc]
      [akpm@linux-foundation.org: fix ibmvscsi]
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: Muli Ben-Yehuda <muli@il.ibm.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Avi Kivity <avi@qumranet.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8d8bb39b
  5. 30 4月, 2008 1 次提交
  6. 28 4月, 2008 1 次提交
  7. 11 4月, 2008 1 次提交
  8. 24 2月, 2008 1 次提交
    • A
      atmel_spi: fix clock polarity · f6febccd
      Atsushi Nemoto 提交于
      The atmel_spi driver does not initialize clock polarity correctly (except for
      at91rm9200 CS0 channel) in some case.
      
      The atmel_spi driver uses gpio-controlled chipselect.  OTOH spi clock signal
      is controlled by CSRn.CPOL bit, but this register controls clock signal
      correctly only in 'real transfer' duration.  At the time of cs_activate()
      call, CSRn.CPOL will be initialized correctly, but the controller do not know
      which channel is to be used next, so clock signal will stay at the inactive
      state of last transfer.  If clock polarity of new transfer and last transfer
      was differ, new transfer will start with wrong clock signal state.
      
      For example, if you started SPI MODE 2 or 3 transfer after SPI MODE 0 or 1
      transfer, the clock signal state at the assertion of chipselect will be low.
      Of course this will violates SPI transfer.
      
      This patch is short term solution for this problem.  It makes all CSRn.CPOL
      match for the transfer before activating chipselect.  For longer term, the
      best fix might be to let NPCS0 stay selected permanently in MR and overwrite
      CSR0 with to the new slave's settings before asserting CS.
      Signed-off-by: NAtsushi Nemoto <anemo@mba.ocn.ne.jp>
      Acked-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      Cc: David Brownell <david-b@pacbell.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f6febccd
  9. 07 2月, 2008 3 次提交
  10. 11 12月, 2007 1 次提交
  11. 30 11月, 2007 1 次提交
  12. 17 10月, 2007 1 次提交
  13. 31 8月, 2007 1 次提交
  14. 18 7月, 2007 3 次提交
  15. 01 6月, 2007 1 次提交
  16. 10 5月, 2007 1 次提交
  17. 17 3月, 2007 1 次提交
  18. 21 2月, 2007 1 次提交
  19. 15 2月, 2007 1 次提交