1. 05 Sep, 2012 5 commits
    • Marek Vasut's avatar
      spi/mxs: Make the SPI block clock speed configurable via DT · e64d07a2
      Marek Vasut authored
      Add "clock-frequency" property, which allows configuring the SPI block's
      base speed.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      e64d07a2
    • Marek Vasut's avatar
      mxs/spi: Rework the mxs_ssp_timeout to be more readable · f13639dc
      Marek Vasut authored
      Rework the mxs_ssp_timeout() function to make it a bit more readable
      and hopefully less error prone. Also, have only one successful exit
      from the function and one failing exit instead of two.
      
      Finally, discard the udelay() from this function altogether, as this
      tightloop is quick enough it's pointless.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      f13639dc
    • Marek Vasut's avatar
      mxs/spi: Decrement the DMA/PIO border · 727c10e3
      Marek Vasut authored
      This driver checks the length of transfer to be made and based
      on this information, either chooses to transfer data via DMA or
      PIO. Decrement this border further to gain better performace eg.
      during SPI flash writes.
      
      Empiric measurement shows that this gives extra 3kB/s write speed
      with a M25P80 flash clocked at 40MHz.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      727c10e3
    • Marek Vasut's avatar
      mxs/spi: Increment the transfer length only if transfer succeeded · 204e706f
      Marek Vasut authored
      The transfer function incremented (struct spi_message)->actual_length
      unconditionally, even if the transfer failed. Rectify this by incrementing
      this only if transfer succeeded.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      204e706f
    • Marek Vasut's avatar
      mxs/spi: Fix issues when doing long continuous transfer · 010b4818
      Marek Vasut authored
      When doing long continuous transfer, eg. from SPI flash via /dev/mtd,
      the driver dies. This is caused by a bug in the DMA chaining. Rework
      the DMA transfer code so that this issue does not happen any longer.
      
      This involves proper allocation of correct amount of sg-list members.
      Also, this means proper creation of DMA descriptors. There is actually an
      important catch to this, the data transfer descriptors must be interleaved
      with PIO register write descriptor, otherwise the transfer stalls. This
      can be done in one descriptor, but due to the limitation of the DMA API,
      it's not possible.
      
      It turns out that in order for the SPI DMA to properly support
      continuous transfers longer than 65280 bytes, there are some very
      important parts that were left out from the documentation about about
      the PIO transfer that is used.
      
      Firstly, the XFER_SIZE register is not written with the whole length
      of a transfer, but is written by each and every chained descriptor
      with the length of the descriptors data buffer.
      
      Next, unlike the demo code supplied by FSL, which only writes one PIO
      word per descriptor, this does not apply if the descriptors are chained,
      since the XFER_SIZE register must be written. Therefore, it is essential
      to use four PIO words, CTRL0, CMD0, CMD1, XFER_SIZE. CMD0 and CMD1 are
      written with zero, since they don't apply. The DMA programs the PIO words
      in an incrementing order, so four PIO words.
      
      Finally, unlike the demo code supplied by FSL, the SSP_CTRL0_IGNORE_CRC
      must not be set during the whole transfer, but it must be set only on the
      last descriptor in the chain.
      
      Lastly, this code lends code from drivers/mtd/nand/omap2.c, which solves
      trouble when the buffer supplied to the DMA transfer was vmalloc()'d. So
      with this patch, it's safe to use /dev/mtdblockX interface again.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      010b4818
  2. 27 Aug, 2012 3 commits
    • Guenter Roeck's avatar
      spi/mxs: Fix device remove function · 7d520d28
      Guenter Roeck authored
      The call sequence spi_alloc_master/spi_register_master/spi_unregister_master
      is complete; it reduces the device reference count to zero, which results in
      device memory being freed. The remove function accesses the freed memory after
      the call to spi_unregister_master(), _and_ it calls spi_master_put on the freed
      memory.
      
      Acquire a reference to the SPI master device and release it after cleanup is
      complete (with the existing spi_master_put) to solve the problem.
      
      Also, the device subsystem ensures that the remove function is only called once,
      and resets device driver data to NULL. Remove the unnecessaary calls to
      platform_set_drvdata().
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Reviewed-by: default avatarMarek Vasut <marex@denx.de>
      Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      7d520d28
    • Marek Vasut's avatar
      mxs/spi: Fix misuse of init_completion · 41682e03
      Marek Vasut authored
      The init_completion() call does reinit not only the variable carrying
      the flag that the completion finished, but also initialized the
      waitqueue associated with the completion. On the contrary, the
      INIT_COMPLETION() call only reinits the flag.
      
      In case there was anything still stuck in the waitqueue, subsequent call
      to init_completion() would be able to create possible race condition. This
      patch uses the proper function and moves init_completion() into .probe() call
      of the driver, to be issued only once.
      
      Note that such scenario is impossible, since two threads can never enter the
      mxs_spi_txrx_dma(), since whole this section is protected by mutex in SPI core.
      This by no means allows this issue to exit though.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Chris Ball <cjb@laptop.org>
      Cc: Shawn Guo <shawn.guo@linaro.org>
      Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
      Cc: Fabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      41682e03
    • Marek Vasut's avatar
      mxs/spi: Restart the block after unsuccessful transfer · c895db0f
      Marek Vasut authored
      Restart the SSP block in case the SSP transfer failed in any way.
      The block hung in some cases otherwise.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Chris Ball <cjb@laptop.org>
      Cc: Shawn Guo <shawn.guo@linaro.org>
      Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
      Cc: Fabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      c895db0f
  3. 17 Aug, 2012 9 commits
  4. 16 Aug, 2012 11 commits
  5. 15 Aug, 2012 3 commits
    • Dave Airlie's avatar
      Merge branch 'drm-nouveau-fixes' of git://git.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes · 2e26c73a
      Dave Airlie authored
      * 'drm-nouveau-fixes' of git://git.freedesktop.org/git/nouveau/linux-2.6:
        drm/nv86/fifo: suspend fix
        drm/nouveau: disable copy engine on NVAF
        nouveau: fixup scanout enable in nvc0_pm
        drm/nouveau/aux: mask off higher bits of auxch index in i2c table entry
        drm/nvd0/disp: mask off high 16 bit of negative cursor x-coordinate
        drm/nve0/fifo: add support for the flip completion swmthd
      2e26c73a
    • Dave Airlie's avatar
      Merge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel into drm-fixes · a389b6a1
      Dave Airlie authored
      Daniel Vetter writes:
      
      "A few important fixers:
      - fix various lvds backlight issues, regressed in 3.6 (Takashi Iwai)
      - make the retina mbp work (ignore bogus edp bpc value in vbt)
      - fix a gmbus regression introduced in (iirc) 3.4 (Jani Nikula)
      - fix an edp panel power sequence regression, fixes the new macbook air
      - apply the tlb invalidate w/a
      
      Otherwise we still have another gmbus regression (patches are awaiting
      tested-bys) and there's something odd going with some rare systems not
      entering rc6 often enough (and hence blowing through too much power).  It
      seems to be a timing-related issue and can be mitigated by frobbing the
      magic tuning parameters. We're still working on that one. Also, we still
      have some fallout from the hw context support, but you can only hit that
      with mesa master."
      
      * 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel:
        drm/i915: Apply post-sync write for pipe control invalidates
        drm/i915: reorder edp disabling to fix ivb MacBook Air
        drm/i915: ensure i2c adapter is all set before adding it
        drm/i915: ignore eDP bpc settings from vbt
        drm/i915: Fix blank panel at reopening lid
      a389b6a1
    • David S. Miller's avatar
      sparc64: Be less verbose during vmemmap population. · 2856cc2e
      David S. Miller authored
      On a 2-node machine with 256GB of ram we get 512 lines of
      console output, which is just too much.
      
      This mimicks Yinghai Lu's x86 commit c2b91e2e
      (x86_64/mm: check and print vmemmap allocation continuous) except that
      we aren't ever going to get contiguous block pointers in between calls
      so just print when the virtual address or node changes.
      
      This decreases the output by an order of 16.
      
      Also demote this to KERN_DEBUG.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2856cc2e
  6. 14 Aug, 2012 5 commits
    • Chris Wilson's avatar
      drm/i915: Apply post-sync write for pipe control invalidates · 7d54a904
      Chris Wilson authored
      When invalidating the TLBs it is documentated as requiring a post-sync
      write. Failure to do so seems to result in a GPU hang.
      
      Exposure to this hang on IVB seems to be a result of removing the extra
      stalls required for SNB pipecontrol workarounds:
      
      commit 6c6cf5aa
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Fri Jul 20 18:02:28 2012 +0100
      
          drm/i915: Only apply the SNB pipe control w/a to gen6
      
      Note: Manually switch the pipe_control cmd to 4 dwords to avoid a
      (silent) functional conflict with -next. This way will get a loud (but
      conflict with next (since the scratch_addr has been deleted there).
      
      Reported-and-tested-by: yex.tian@intel.com
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53322Acked-by: default avatarBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      [danvet: added note about merge conflict with -next.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      7d54a904
    • Daniel Vetter's avatar
      drm/i915: reorder edp disabling to fix ivb MacBook Air · 35a38556
      Daniel Vetter authored
      eDP is tons of fun. It turns out that at least the new MacBook Air 5,1
      model absolutely doesn't like the new force vdd dance we've introduced
      in
      
      commit 6cb49835
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Sun May 20 17:14:50 2012 +0200
      
          drm/i915: enable vdd when switching off the eDP panel
      
      But that patch also tried to fix some neat edp sequence issue with the
      force_vdd timings. Closer inspection reveals that we've raised
      force_vdd only to do the aux channel communication dp_sink_dpms. If we
      move the edp_panel_off below that, we don't need any force_vdd for the
      disable sequence, which makes the Air happy.
      
      Unfortunately the reporter of the original bug that the above commit
      fixed is travelling, so we can't test whether this regresses things.
      But my theory is that since we don't check for any power-off ->
      force_vdd-on delays in edp_panel_vdd_on, this was the actual
      root-cause of this failure. With that force_vdd dance completely
      eliminated, I'm hopeful the original bug stays fixed, too.
      
      For reference the old bug, which hopefully doesn't get broken by this:
      
      https://bugzilla.kernel.org/show_bug.cgi?id=43163
      
      In any case, regression fixers win over plain bugfixes, so this needs
      to go in asap.
      
      v2: The crucial pieces seems to be to clear the force_vdd flag
      uncoditionally, too, in edp_panel_off. Looks like this is left behind
      by the firmware somehow.
      
      v3: The Apple firmware seems to switch off the panel on it's own, hence
      we still need to keep force_vdd on, but properly clear it when switching
      the panel off.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=45671Tested-by: default avatarRoberto Romer <sildurin@gmail.com>
      Tested-by: default avatarDaniel Wagner <wagi@monom.org>
      Tested-by: default avatarKeith Packard <keithp@keithp.com>
      Cc: stable@vger.kernel.org
      Cc: Keith Packard <keithp@keithp.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      35a38556
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · ddf343f6
      Linus Torvalds authored
      Pull s390 patches from Martin Schwidefsky:
       "Included are bug fixes and a patch to enable system call filtering
        with BPF."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/compat: fix mmap compat system calls
        s390/compat: fix compat wrappers for process_vm system calls
        s390: do not clobber personality flags in sys_32_personality()
        s390/seccomp: add support for system call filtering using BPF
        s390/sclp_sdias: Add missing break and "fall through"
        s390/mm: remove MAX_PHYSADDR_BITS define
      ddf343f6
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 930a93a5
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Radeon and intel fixes mostly, one fix to the mgag200 driver to not
        hang on certain server variants."
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (32 commits)
        drm/radeon: fix typo in function header comment
        drm/radeon/kms: implement timestamp userspace query (v2)
        drm/radeon/kms: add MSAA texture support for r600-evergreen
        drm/radeon/kms: reorder code in r600_check_texture_resource
        drm/radeon: fence virtual address and free it once idle v4
        drm/radeon: fix some missing parens in asic macros
        drm/radeon: add some new SI pci ids
        drm/radeon: fix ordering in pll picking on dce4+
        drm/radeon: do not reenable crtc after moving vram start address
        drm/radeon: fix bank tiling parameters on cayman
        drm/radeon: fix bank tiling parameters on evergreen
        drm/radeon: fix bank tiling parameters on SI
        drm/radeon: properly handle crtc powergating
        drm/radeon: properly handle SS overrides on TN (v2)
        drm/radeon/dce4+: set a more reasonable cursor watermark
        drm/radeon: fix handling for ddc type 5 on combios
        drm/mgag200: fix G200ER pll picking algorithm
        drm/edid: Fix potential memory leak in edid_load()
        drm/udl: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(.. [1]
        drm/radeon/kms: allow "invalid" DB formats as a means to disable DB
        ...
      930a93a5
    • Arnd Bergmann's avatar
      GPIO: gpio-pxa: fix building without CONFIG_OF · f43e04ec
      Arnd Bergmann authored
      Commit 72121572 ("GPIO: gpio-pxa: fix devicetree functions") added an
      "xlate" function pointer to the irq_domain_ops, but this function is nor
      declared or defined anywhere when CONFIG_OF is disabled, causing the
      build error:
      
        drivers/gpio/gpio-pxa.c:532:11: error: 'irq_domain_xlate_twocell' undeclared here (not in a function)
      
      Extending the DT-only code section to cover the irq_domain_ops and the
      pxa_gpio_dt_ids solves this problem and makes it clearer which code is
      actually used without DT.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f43e04ec
  7. 13 Aug, 2012 4 commits