1. 06 2月, 2015 2 次提交
  2. 05 2月, 2015 4 次提交
  3. 04 2月, 2015 1 次提交
  4. 03 2月, 2015 4 次提交
    • R
      spi: imx: use pio mode for i.mx6dl · a02bb401
      Robin Gong 提交于
      For TKT238285 hardware issue which may cause txfifo store data twice can only
      be caught on i.mx6dl, we use pio mode instead of DMA mode on i.mx6dl.
      
      Fixes: f62caccd (spi: spi-imx: add DMA support)
      Signed-off-by: NRobin Gong <b38343@freescale.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Cc: stable@vger.kernel.org
      a02bb401
    • B
      spi: fsl-dspi: Remove possible memory leak of 'chip' · ceadfd8d
      Bhuvanchandra DV 提交于
      Move the check for spi->bits_per_word
      before allocation, to avoid memory leak.
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NBhuvanchandra DV <bhuvanchandra.dv@toradex.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      ceadfd8d
    • N
      spi: sh-msiof: Update calculation of frequency dividing · 65d5665b
      Nobuhiro Iwamatsu 提交于
      sh-msiof of frequency dividing does not perform the calculation, driver have
      to manage setting value in the table. It is not possible to set frequency
      dividing value close to the actual data in this way. This changes from
      frequency dividing of table management to setting by calculation.
      This driver is able to set a value close to the actual data.
      Signed-off-by: NNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      65d5665b
    • I
      spi: spidev: Convert buf pointers for 32-bit compat SPI_IOC_MESSAGE(n) · 7782a1a9
      Ian Abbott 提交于
      The SPI_IOC_MESSAGE(n) ioctl commands' argument points to an array of n
      struct spi_ioc_transfer elements.  The spidev's compat_ioctl handler
      just converts this pointer and passes it on to the unlocked_ioctl
      handler to process it.
      
      The tx_buf and rx_buf members of struct spi_ioc_transfer are of type
      __u64 and hold pointer values.  A 32-bit userspace application running
      in a 64-bit kernel might not have widened the 32-bit pointers correctly
      for the kernel.  The application might have sign-extended the pointer to
      when the kernel expects it to be zero-extended, or vice versa, leading
      to an -EFAULT being returned by spidev_message() if the widened pointer
      is invalid.
      
      Handle the SPI_IOC_MESSAGE(n) ioctl commands specially in the
      compat_ioctl handler, calling new function spidev_compat_ioctl_message()
      to handle them.  This processes them in the same way as the
      unlocked_ioctl handler except that it uses compat_ptr() to convert the
      tx_buf and rx_buf members of each struct spi_ioc_transfer element.
      
      To save code, factor out part of the unlocked_ioctl handler into a new
      function spidev_get_ioc_message().  This checks the ioctl command code
      is a valid SPI_IOC_MESSAGE(n), determines n and copies the array of n
      struct spi_ioc_transfer elements from userspace into dynamically
      allocated memory, returning either a pointer to the memory, an
      ERR_PTR(-err) value, or NULL (for SPI_IOC_MESSAGE(0)).
      Signed-off-by: NIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      7782a1a9
  5. 29 1月, 2015 3 次提交
    • C
      spi: spi-fsl-dspi: Remove spi-bitbang · 9298bc72
      Chao Fu 提交于
      DSPI module need cs change information in
      a spi transfer. According to cs change, DSPI
      will give last data the right flag. Bitbang
      provide cs change behind the last data in
      a transfer. So DSPI can not deal the last
      data in every transfer properly, so remove
      the bitbang in the driver.
      Signed-off-by: NBhuvanchandra DV <bhuvanchandra.dv@toradex.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      9298bc72
    • A
      spi: pl08x: do not select S3C64XX_PL080 · 75d30c51
      Arnd Bergmann 提交于
      The pl08x driver originally selected S3C64XX_PL080 to avoid having
      the legacy Samsung DMA interfaces. Those are now gone, so the
      select is no longer needed, but it now causes problems when
      CONFIG_DMA_ENGINE is disabled:
      
      arch/arm/plat-samsung/built-in.o: In function `s3c64xx_spi0_set_platdata':
      :(.init.text+0x518): undefined reference to `pl08x_filter_id'
      
      This simply removes the 'select' to avoid this problem.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      75d30c51
    • A
      spi/rockchip: avoid uninitialized-use warning · 97cf5669
      Arnd Bergmann 提交于
      We currently get a warning about potentially uninitialized variables
      in the rockchip spi driver, at least in certain toolchain versions:
      
      spi/spi-rockchip.c: In function 'rockchip_spi_prepare_dma':
      include/linux/dmaengine.h:796:2: warning: 'txdesc' may be used uninitialized in this function
      include/linux/dmaengine.h:796:2: warning: 'rxdesc' may be used uninitialized in this function
      
      The reason seems to be that gcc cannot know whether the value
      of the rs->rx and rs->tx variables change between the two points
      these are accessed.
      
      The code is actually correct, but to make this clearer to the
      compiler, this changes the conditionals to test for the local
      rxdesc/txdesc variables instead, which it knows won't change.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      97cf5669
  6. 28 1月, 2015 2 次提交
  7. 27 1月, 2015 1 次提交
  8. 17 1月, 2015 1 次提交
  9. 16 1月, 2015 1 次提交
  10. 15 1月, 2015 2 次提交
  11. 08 1月, 2015 4 次提交
  12. 07 1月, 2015 3 次提交
  13. 06 1月, 2015 5 次提交
  14. 30 12月, 2014 3 次提交
    • F
      spi: spi-imx: Do not store the irq number in the private structure · 4b5d6aad
      Fabio Estevam 提交于
      The irq number is only used inside the probe function, so there is really no
      need to store it in the private structure.
      
      Use a local 'irq' variable to hold the the irq number instead.
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      4b5d6aad
    • I
      spi: qup: Add SPI_CPOL configuration support · 0667dd5f
      Ivan T. Ivanov 提交于
      Device support SPI_CPOL, but driver have missed to add
      support for this configuration.
      Signed-off-by: NIvan T. Ivanov <iivanov@mm-sol.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      0667dd5f
    • M
      spi/pxa2xx: Clear cur_chip pointer before starting next message · c957e8f0
      Mika Westerberg 提交于
      Once the current message is finished, the driver notifies SPI core about
      this by calling spi_finalize_current_message(). This function queues next
      message to be transferred. If there are more messages in the queue, it is
      possible that the driver is asked to transfer the next message at this
      point.
      
      When spi_finalize_current_message() returns the driver clears the
      drv_data->cur_chip pointer to NULL. The problem is that if the driver
      already started the next message clearing drv_data->cur_chip will cause
      NULL pointer dereference which crashes the kernel like:
      
       BUG: unable to handle kernel NULL pointer dereference at 0000000000000048
       IP: [<ffffffffa0022bc8>] cs_deassert+0x18/0x70 [spi_pxa2xx_platform]
       PGD 78bb8067 PUD 37712067 PMD 0
       Oops: 0000 [#1] SMP
       Modules linked in:
       CPU: 1 PID: 11 Comm: ksoftirqd/1 Tainted: G           O   3.18.0-rc4-mjo #5
       Hardware name: Intel Corp. VALLEYVIEW B3 PLATFORM/NOTEBOOK, BIOS MNW2CRB1.X64.0071.R30.1408131301 08/13/2014
       task: ffff880077f9f290 ti: ffff88007a820000 task.ti: ffff88007a820000
       RIP: 0010:[<ffffffffa0022bc8>]  [<ffffffffa0022bc8>] cs_deassert+0x18/0x70 [spi_pxa2xx_platform]
       RSP: 0018:ffff88007a823d08  EFLAGS: 00010202
       RAX: 0000000000000008 RBX: ffff8800379a4430 RCX: 0000000000000026
       RDX: 0000000000000000 RSI: 0000000000000246 RDI: ffff8800379a4430
       RBP: ffff88007a823d18 R08: 00000000ffffffff R09: 000000007a9bc65a
       R10: 000000000000028f R11: 0000000000000005 R12: ffff880070123e98
       R13: ffff880070123de8 R14: 0000000000000100 R15: ffffc90004888000
       FS:  0000000000000000(0000) GS:ffff880079a80000(0000) knlGS:0000000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
       CR2: 0000000000000048 CR3: 000000007029b000 CR4: 00000000001007e0
       Stack:
        ffff88007a823d58 ffff8800379a4430 ffff88007a823d48 ffffffffa0022c89
        0000000000000000 ffff8800379a4430 0000000000000000 0000000000000006
        ffff88007a823da8 ffffffffa0023be0 ffff88007a823dd8 ffffffff81076204
       Call Trace:
        [<ffffffffa0022c89>] giveback+0x69/0xa0 [spi_pxa2xx_platform]
        [<ffffffffa0023be0>] pump_transfers+0x710/0x740 [spi_pxa2xx_platform]
        [<ffffffff81076204>] ? pick_next_task_fair+0x744/0x830
        [<ffffffff81049679>] tasklet_action+0xa9/0xe0
        [<ffffffff81049a0e>] __do_softirq+0xee/0x280
        [<ffffffff81049bc0>] run_ksoftirqd+0x20/0x40
        [<ffffffff810646df>] smpboot_thread_fn+0xff/0x1b0
        [<ffffffff810645e0>] ? SyS_setgroups+0x150/0x150
        [<ffffffff81060f9d>] kthread+0xcd/0xf0
        [<ffffffff81060ed0>] ? kthread_create_on_node+0x180/0x180
        [<ffffffff8187a82c>] ret_from_fork+0x7c/0xb0
      
      Fix this by clearing drv_data->cur_chip before we call spi_finalize_current_message().
      Reported-by: NMartin Oldfield <m@mjoldfield.com>
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Cc: stable@vger.kernel.org
      c957e8f0
  15. 24 12月, 2014 4 次提交
反馈
建议
客服 返回
顶部