1. 24 Apr, 2015 3 commits
  2. 22 Apr, 2015 1 commit
    • Christophe Leroy's avatar
      spi: fsl-spi: use devm_ioremap_resource() to map parameter ram on CPM1 · 575bec53
      Christophe Leroy authored
      On CPM2, the SPI parameter RAM is dynamically allocated in the
      dualport RAM whereas in CPM1, it is statically allocated to a default
      address with capability to relocate it somewhere else via the use of
      CPM micropatch. The address of the parameter RAM is given by the boot
      loader and expected to be mapped via devm_ioremap_resource()
      
      In the current implementation, in function fsl_spi_cpm_get_pram()
      there is a confusion between the SPI_BASE register and the base of the
      SPI parameter RAM. Fortunatly, it is working properly with MPC866 and
      MPC885 because they do set SPI_BASE, but on MPC860 and other old
      MPC8xx that doesn't set SPI_BASE, pram_ofs is not properly set.
      Also, the parameter RAM is not properly mapped with
      devm_ioremap_resource() as it should but still gets accessible by
      chance through the full RAM which is mapped from somewhere else.
      
      This patch applies to the SPI driver the same principle as for the
      CPM UART: when the CPM is of type CPM1, we simply do an
      devm_ioremap_resource() of the area provided via the device tree.
      Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      575bec53
  3. 18 Apr, 2015 1 commit
  4. 16 Apr, 2015 2 commits
    • Robin Gong's avatar
      spi: check tx_buf and rx_buf in spi_unmap_msg · f8bb820d
      Robin Gong authored
      Some spi device drivers use the same tx_buf and rx_buf repeatly for better
      performance such as driver/input/touchsreen/ads7846.c, but spi core grab tx_buf
      /rx_buf of transfer and set them as dummy_tx/dummy_rx once they are NULL. Thus,
      in the second time the tx_buf/rx_buf will be replaced by dummy_tx/dummy_rx and
      the data which produced by the last tx or rx may be wrongly sent to the device
      or handled by the upper level protocol. This patch just keep the orignal value
      of tx_buf/rx_buf if they are NULL after this transfer processed.
      Signed-off-by: default avatarRobin Gong <b38343@freescale.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      f8bb820d
    • Martin Sperl's avatar
      spi: bcm2835: change timeout of polling driver to 1s · 145367ba
      Martin Sperl authored
      The way that the timeout code is written in the polling function
      the timeout does also trigger when interrupted or rescheduled while
      in the polling loop.
      
      This patch changes the timeout from effectively 20ms (=2 jiffies) to
      1 second and removes the time that the transfer really takes out of
      the computation, as - per design - this is <30us and the jiffie resolution
      is 10ms so that does not make any difference what so ever.
      Signed-off-by: default avatarMartin Sperl <kernel@martin.sperl.org>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      145367ba
  5. 14 Apr, 2015 1 commit
    • Guenter Roeck's avatar
      spi: bcm2835: Add GPIOLIB dependency · 8844d0f1
      Guenter Roeck authored
      Fix:
      
      drivers/spi/spi-bcm2835.c: In function 'chip_match_name':
      drivers/spi/spi-bcm2835.c:356:21: error:
      			dereferencing pointer to incomplete type
      drivers/spi/spi-bcm2835.c: In function 'bcm2835_spi_setup':
      drivers/spi/spi-bcm2835.c:382:2: error:
      	`		implicit declaration of function 'gpiochip_find'
      drivers/spi/spi-bcm2835.c:387:21: error:
      			dereferencing pointer to incomplete type
      
      by adding the now mandatory GPIOLIB dependency.
      
      Fixes: a30a555d ("spi: bcm2835: transform native-cs to gpio-cs
      	on first spi_setup")
      Cc: Martin Sperl <kernel@martin.sperl.org>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      8844d0f1
  6. 12 Apr, 2015 3 commits
  7. 11 Apr, 2015 21 commits
  8. 10 Apr, 2015 8 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · 49850a14
      Linus Torvalds authored
      Pull SCSI target fixes from Nicholas Bellinger:
       "Just a few small fixes:
      
        Two from Andy, the first addresses a v4.0 target specific regression
        to a user visible configfs attribute, and the second adds a set of
        missing brackets around IPv6 discovery portal information within
        iscsi-target.
      
        And one from Mike that fixes an OOPs regression in traditional
        iscsi-target when an iovec allocation fails, that has been present
        since v3.10.y code.  (CC'd to stable)"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
        iscsi target: fix oops when adding reject pdu
        iscsi-target: TargetAddress in SendTargets should bracket ipv6 addresses
        target: Allow userspace to write 1 to attrib/emulate_fua_write
      49850a14
    • Mike Christie's avatar
      iscsi target: fix oops when adding reject pdu · b815fc12
      Mike Christie authored
      This fixes a oops due to a double list add when adding a reject PDU for
      iscsit_allocate_iovecs allocation failures. The cmd has already been
      added to the conn_cmd_list in iscsit_setup_scsi_cmd, so this has us call
      iscsit_reject_cmd.
      
      Note that for ERL0 the reject PDU is not actually sent, so this patch
      is not completely tested. Just verified we do not oops. The problem is the
      add reject functions return -1 which is returned all the way up to
      iscsi_target_rx_thread which for ERL0 will drop the connection.
      Signed-off-by: default avatarMike Christie <michaelc@cs.wisc.edu>
      Cc: <stable@vger.kernel.org> # v3.10+
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      b815fc12
    • Martin Sperl's avatar
      spi: bcm2835: enabling polling mode for transfers shorter than 30us · 704f32d4
      Martin Sperl authored
      In cases of short transfer times the CPU is spending lots of time
      in the interrupt handler and scheduler to reschedule the worker thread.
      
      Measurements show that we have times where it takes 29.32us to between
      the last clock change and the time that the worker-thread is running again
      returning from wait_for_completion_timeout().
      
      During this time the interrupt-handler is running calling complete()
      and then also the scheduler is rescheduling the worker thread.
      
      This time can vary depending on how much of the code is still in
      CPU-caches, when there is a burst of spi transfers the subsequent delays
      are in the order of 25us, so the value of 30us seems reasonable.
      
      With polling the whole transfer of 4 bytes at 10MHz finishes after 6.16us
      (CS down to up) with the real transfer (clock running) taking 3.56us.
      So the efficiency has much improved and is also freeing CPU cycles,
      reducing interrupts and context switches.
      
      Because of the above 30us seems to be a reasonable limit for polling.
      Signed-off-by: default avatarMartin Sperl <kernel@martin.sperl.org>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      704f32d4
    • Martin Sperl's avatar
      spi: bcm2835: transform native-cs to gpio-cs on first spi_setup · a30a555d
      Martin Sperl authored
      Transforms the bcm-2835 native SPI-chip select to their gpio-cs equivalent.
      
      This allows for some support of some optimizations that are not
      possible due to HW-gliches on the CS line - especially filling
      the FIFO before enabling SPI interrupts (by writing to CS register)
      while the transfer is already in progress (See commit: e3a2be30)
      
      This patch also works arround some issues in bcm2835-pinctrl which does not
      set the value when setting the GPIO as output - it just sets up output and
      (typically) leaves the GPIO as low.  When a fix for this is merged then this
      gpio_set_value can get removed from bcm2835_spi_setup.
      Signed-off-by: default avatarMartin Sperl <kernel@martin.sperl.org>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      a30a555d
    • Linus Torvalds's avatar
      Merge tag 'sound-4.0' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · cfc4957b
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Here are fixes gathered for 4.0-final; one FireFire endian fix, two
        USB-audio quirks, and three HD-audio quirks.
      
        All relatively small and device-specific fixes, should be pretty safe
        to apply"
      
      * tag 'sound-4.0' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: usb - Creative USB X-Fi Pro SB1095 volume knob support
        ALSA: hda - Fix headphone pin config for Lifebook T731
        ALSA: bebob: fix to processing in big-endian machine for sending cue
        ALSA: hda/realtek - Make more stable to get pin sense for ALC283
        ALSA: usb-audio: don't try to get Benchmark DAC1 sample rate
        ALSA: hda/realtek - Support Dell headset mode for ALC256
      cfc4957b
    • Linus Torvalds's avatar
      Merge tag 'nios2-fixes-v4.0-final' of git://git.rocketboards.org/linux-socfpga-next · 6fb805fb
      Linus Torvalds authored
      Pull arch/nios2 fixes from Ley Foon Tan:
       "There are 3 arch/nios2 fixes for 4.0 final:
      
         - fix cache coherency issue when debugging with gdb
      
         - move restart_block to struct task_struct (aligned with other
           architectures)
      
         - fix for missing registers defines for ptrace"
      
      * tag 'nios2-fixes-v4.0-final' of git://git.rocketboards.org/linux-socfpga-next:
        nios2: fix cache coherency issue when debug with gdb
        nios2: add missing ptrace registers defines
        nios2: signal: Move restart_block to struct task_struct
      6fb805fb
    • Ley Foon Tan's avatar
      nios2: fix cache coherency issue when debug with gdb · 4a89c308
      Ley Foon Tan authored
      Remove the end address checking for flushda function. We need to flush
      each address line for flushda instruction, from start to end address.
      This is because flushda instruction only flush the cache if tag and line
      fields are matched.
      
      Change to use ldwio instruction (bypass cache) to load the instruction
      that causing trap. Our interest is the actual instruction that executed
      by the processor, this should be uncached.
      Note, EA address might be an userspace cached address.
      Signed-off-by: default avatarLey Foon Tan <lftan@altera.com>
      4a89c308
    • Linus Torvalds's avatar
      Merge tag 'pm+acpi-4.0-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · e5e02de0
      Linus Torvalds authored
      Pull power management and ACPI fixes from Rafael Wysocki:
       "These are stable-candidate fixes of some recently reported issues in
        the cpufreq core, cpuidle core, the ACPI cpuidle driver and the
        hibernate core.
      
        Specifics:
      
         - Revert a 3.17 hibernate commit that was supposed to fix an issue
           related to e820 reserved regions, but broke resume from hibernation
           on Lenovo x230 (Rafael J Wysocki).
      
         - Prevent the ACPI cpuidle driver from overwriting the name and
           description of the C0 state set by the core when the list of
           C-states changes (Thomas Schlichter).
      
         - Remove the no longer needed state_count field from struct
           cpuidle_device which prevents the list of C-states shown by the
           sysfs interface from becoming incorrect when the current number of
           them is different from the number of C-states on boot (Bartlomiej
           Zolnierkiewicz).
      
         - The cpufreq core updates the policy object of the only online CPU
           during system resume to make it reflect the current hardware state,
           but it always assumes that CPU to be CPU0 which need not be the
           case, so fix the code to avoid that assumption (Viresh Kumar)"
      
      * tag 'pm+acpi-4.0-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        Revert "PM / hibernate: avoid unsafe pages in e820 reserved regions"
        cpuidle: ACPI: do not overwrite name and description of C0
        cpuidle: remove state_count field from struct cpuidle_device
        cpufreq: Schedule work for the first-online CPU on resume
      e5e02de0