1. 01 10月, 2014 5 次提交
    • Y
      ufs: Active Power Mode - configuring bActiveICCLevel · 3a4bf06d
      Yaniv Gardi 提交于
      The maximum power consumption in active is determined by bActiveICCLevel.
      The configuration is done by reading max current supported by the
      regulators connected to VCC, VCCQ and VCCQ2 rails on the boards, and
      reading the current consumption levels from the device for each rails
      (vcc/vccq/vccq2) using power descriptor.
      We configure the bActiveICCLevel attribute, with the max value that
      correspond to the minimum-of(VCC-current-level,VCCQ-current-level,
      VCCQ2-current-level).
      In order to minimize resume latency, pre-fetch icc levels and reference
      clock during initialization and avoid reading them each link startup
      during resume.
      Signed-off-by: NRaviv Shvili <rshvili@codeaurora.org>
      Signed-off-by: NYaniv Gardi <ygardi@codeaurora.org>
      Signed-off-by: NDolev Raviv <draviv@codeaurora.org>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      3a4bf06d
    • S
      ufs: improve init sequence · 1d337ec2
      Sujit Reddy Thumma 提交于
      In ->hce_enable_notify() callback the vendor specific initialization
      may carry out additional DME configuration using UIC commands and
      hence the UIC command completion interrupt enable bit should be set
      before the post reset notification.
      Add retries if the link-startup fails. This is required since due to
      hardware timing issues, the Uni-Pro link-startup might fail. The UFS
      HCI recovery procedure contradicts the Uni-Pro sequence. The UFS HCI
      specifies to resend DME_LINKSTARTUP command after IS.ULLS (link-lost
      interrupt) is received. The Uni-Pro specifies that if link-startup
      fails the link is in "down" state. The link-lost is indicated to the
      DME user only when the link is up. Hence, the UFS HCI recovery procedure
      of waiting for IS.ULLS and retrying link-startup may not work properly.
      
      At the end, if detection fails, power off (disable clocks, regulators,
      phy) if the UFS device detection fails. This saves power while UFS device
      is not embedded into the system.
      Signed-off-by: NSujit Reddy Thumma <sthumma@codeaurora.org>
      Signed-off-by: NDolev Raviv <draviv@codeaurora.org>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      1d337ec2
    • S
      ufs: Add clock initialization support · c6e79dac
      Sujit Reddy Thumma 提交于
      Add generic clock initialization support for UFSHCD platform
      driver. The clock info is read from device tree using standard
      clock bindings. A generic max-clock-frequency-hz property is
      defined to save information on maximum operating clock frequency
      the h/w supports.
      Signed-off-by: NSujit Reddy Thumma <sthumma@codeaurora.org>
      Signed-off-by: NDolev Raviv <draviv@codeaurora.org>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      c6e79dac
    • S
      ufs: Add regulator enable support · aa497613
      Sujit Reddy Thumma 提交于
      UFS devices are powered by at most three external power supplies -
      - VCC - The flash memory core power supply, 2.7V to 3.6V or 1.70V to 1.95V
      - VCCQ - The controller and I/O power supply, 1.1V to 1.3V
      - VCCQ2 - Secondary controller and/or I/O power supply, 1.65V to 1.95V
      
      For some devices VCCQ or VCCQ2 are optional as they can be
      generated using internal LDO inside the UFS device.
      
      Add DT bindings for voltage regulators that can be controlled
      from host driver.
      Signed-off-by: NSujit Reddy Thumma <sthumma@codeaurora.org>
      Signed-off-by: NDolev Raviv <draviv@codeaurora.org>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      aa497613
    • S
      ufs: Allow vendor specific initialization · 5c0c28a8
      Sujit Reddy Thumma 提交于
      Some vendor specific controller versions might need to configure
      vendor specific - registers, clocks, voltage regulators etc. to
      initialize the host controller UTP layer and Uni-Pro stack.
      Provide some common initialization operations that can be used
      to configure vendor specifics. The methods can be extended in
      future, for example, for power mode transitions.
      
      The operations are vendor/board specific and hence determined with
      the help of compatible property in device tree.
      Signed-off-by: NSujit Reddy Thumma <sthumma@codeaurora.org>
      Signed-off-by: NDolev Raviv <draviv@codeaurora.org>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      5c0c28a8
  2. 28 5月, 2014 4 次提交
  3. 07 9月, 2013 2 次提交
  4. 26 8月, 2013 3 次提交
    • S
      [SCSI] ufs: Add support for host assisted background operations · 66ec6d59
      Sujit Reddy Thumma 提交于
      Background operations in the UFS device can be disabled by
      the host to reduce the response latency of transfer requests.
      Add support for enabling/disabling the background operations
      during runtime suspend/resume of the device.
      
      If the device is in critical need of BKOPS it will raise an
      URGENT_BKOPS exception which should be handled by the host to
      make sure the device performs as expected.
      
      During bootup, the BKOPS is enabled in the device by default.
      The disable of BKOPS is supported only when the driver supports
      runtime suspend/resume operations as the runtime PM framework
      provides a way to determine the device idleness and hence BKOPS
      can be managed effectively. During runtime resume the BKOPS is
      disabled to reduce latency and during runtime suspend the BKOPS
      is enabled to allow device to carry out idle time BKOPS.
      
      In some cases where the BKOPS is disabled during runtime resume
      and due to continuous data transfers the runtime suspend is not
      triggered, the BKOPS is enabled when the device raises a level-2
      exception (outstanding operations - performance impact).
      Signed-off-by: NSujit Reddy Thumma <sthumma@codeaurora.org>
      Signed-off-by: NSantosh Y <santoshsy@gmail.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      66ec6d59
    • D
      [SCSI] ufs: Set fDeviceInit flag to initiate device initialization · 68078d5c
      Dolev Raviv 提交于
      Allow UFS device to complete its initialization and accept
      SCSI commands by setting fDeviceInit flag. The device may take
      time for this operation and hence the host should poll until
      fDeviceInit flag is toggled to zero. This step is mandated by
      UFS device specification for device initialization completion.
      Signed-off-by: NDolev Raviv <draviv@codeaurora.org>
      Signed-off-by: NSujit Reddy Thumma <sthumma@codeaurora.org>
      Signed-off-by: NSantosh Y <santoshsy@gmail.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      68078d5c
    • S
      [SCSI] ufs: Add support for sending NOP OUT UPIU · 5a0b0cb9
      Sujit Reddy Thumma 提交于
      As part of device initialization sequence, sending NOP OUT UPIU and
      waiting for NOP IN UPIU response is mandatory. This confirms that the
      device UFS Transport (UTP) layer is functional and the host can configure
      the device with further commands. Add support for sending NOP OUT UPIU to
      check the device connection path and test whether the UTP layer on the
      device side is functional during initialization.
      
      A tag is acquired from the SCSI tag map space in order to send the device
      management command. When the tag is acquired by internal command the scsi
      command is rejected with host busy flag in order to requeue the request.
      To avoid frequent collisions between internal commands and scsi commands
      the device management command tag is allocated in the opposite direction
      w.r.t block layer tag allocation.
      Signed-off-by: NSujit Reddy Thumma <sthumma@codeaurora.org>
      Signed-off-by: NDolev Raviv <draviv@codeaurora.org>
      Signed-off-by: NSantosh Y <santoshsy@gmail.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      5a0b0cb9
  5. 29 6月, 2013 3 次提交
  6. 26 2月, 2013 1 次提交