1. 18 6月, 2015 1 次提交
  2. 17 6月, 2015 2 次提交
    • R
      ahci: Add support for Cavium's ThunderX host controller · b7ae128d
      Robert Richter 提交于
      This patch adds support for Cavium's ThunderX host controller. The
      controller resides on the SoC and is a AHCI compatible SATA controller
      with one port, compliant with Serial ATA 3.1 and AHCI Revision 1.31.
      There can exists multiple SATA controllers on the SoC.
      
      The controller depends on MSI-X support since the PCI ECAM controller
      on the SoC does not implement MSI nor lagacy intx interrupt support.
      Thus, during device initialization, if MSI fails MSI-X will be used to
      enable the device's interrupts.
      
      The controller uses non-standard BAR0 for its register range. The
      already existing device lookup (vendor and device id) that is already
      implemented for other host controllers is used to change the PCI BAR.
      Signed-off-by: NRobert Richter <rrichter@cavium.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      b7ae128d
    • R
      ahci: Add generic MSI-X support for single interrupts to SATA PCI driver · ee2aad42
      Robert Richter 提交于
      This patch adds generic MSI-X support for single interrupts to the
      SATA PCI driver. MSI-X support is needed for host controller that only
      have MSI-X support implemented, but no MSI or intx. This patch only
      adds support for single interrupts, multiple per-port MSI-X interrupts
      are not yet implemented.
      
      The new implementation still initializes MSIs first. Only if that
      fails, the code tries to enable MSI-X. If that fails too, setup is
      continued with intx interrupts.
      
      To not break other chips by this generic code change, there are the
      following precautions:
      
       * Interrupt ranges are not enabled at all.
      
       * Only single interrupt mode is enabled for msix cap devices. Thus,
         only one interrupt will be setup.
      
       * During the discussion with Tejun we agreed to change the init
         sequence from msix-msi-intx to msi-msix-intx. Thus, if a device
         offers msi and init does not fail, the msix init code will not be
         executed. This is equivalent to current code.
      
      With this, the code only setups single mode msix as a last resort if
      msi fails. No interrupt range is enabled at all. Only one interrupt
      will be enabled.
      
      tj: comment edits.
      
      Changes of the patch series:
      
      v5:
       * updated patch subject that the patch only implements single IRQ
       * moved Cavium specific code to a separate patch
       * detect Cavium ThunderX device with PCI_CLASS_STORAGE_SATA_AHCI
         instead of vendor/dev id
       * added more comments to the code
       * enable single msix support for all kind of devices (removing strict
         check)
       * rebased onto update libata/for-4.2 with patch 1, 2 applied
      
      v4:
       * removed implementation of ahci_init_intx()
       * improved patch descriptions
       * rebased onto libata/for-4.2
      
      v3:
       * store irq number in struct ahci_host_priv
       * change initialization order from msix-msi-intx to msi-msix-intx
       * improve comments in ahci_init_msix()
       * improve error message in ahci_init_msix()
       * do not enable MSI-X if MSI is actively disabled for the device
      
      v2:
       * determine irq vector from pci_dev->msi_list
      
      Based on a patch from Sunil Goutham <sgoutham@cavium.com>.
      Signed-off-by: NRobert Richter <rrichter@cavium.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      ee2aad42
  3. 10 6月, 2015 2 次提交
  4. 09 6月, 2015 1 次提交
  5. 03 6月, 2015 2 次提交
    • R
      ahci: Store irq number in struct ahci_host_priv · 21bfd1aa
      Robert Richter 提交于
      Currently, ahci supports only msi and intx. To also support msix the
      handling of the irq number need to be changed. The irq number for msix
      devices is taken from msi_list instead of pci_dev. Thus, the irq
      number of a device needs to be stored in struct ahci_host_priv now.
      This allows the host controller to be activated in a generic way.
      
      This change is only intended for ahci drivers. For that reason the irq
      number is stored in struct ahci_host_priv used only by ahci drivers.
      Thus, the ABI changes only for ahci_host_activate(), but existing ata
      drivers (about 50) are unaffected and keep unchanged. All users of
      ahci_host_activate() have been updated.
      
      While touching drivers/ata/libahci.c, doing a small code cleanup in
      ahci_port_start().
      Signed-off-by: NRobert Richter <rrichter@cavium.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      21bfd1aa
    • R
      ahci: Move interrupt enablement code to a separate function · a1c82311
      Robert Richter 提交于
      This patch refactors ahci_init_interrupts() and moves msi code to a
      separate function. Need the split since we add msix initialization in
      a later patch. The initialization for msix will be done after msi but
      before intx.
      Signed-off-by: NRobert Richter <rrichter@cavium.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      a1c82311
  6. 29 5月, 2015 1 次提交
  7. 26 5月, 2015 1 次提交
  8. 25 5月, 2015 1 次提交
  9. 22 5月, 2015 2 次提交
  10. 19 5月, 2015 1 次提交
  11. 11 5月, 2015 1 次提交
    • S
      ata: ahci_xgene: Add AHCI Support for 2nd HW version of APM X-Gene SoC AHCI SATA Host controller. · c9802a4b
      Suman Tripathi 提交于
      This patch enables full AHCI feature support for APM X-Gene SoC SATA
      host controller. The following errata's are removed:
      
      1. 2a0bdff6 ("ahci-xgene: fix the dma state machine lockup for the
                       IDENTIFY DEVICE PIO mode command")
      2. 09c32aaa ("ahci_xgene: Fix the dma state machine lockup for the
                       ATA_CMD_SMART PIO mode command")
      3. 1540035d ("ahci_xgene: Implement the xgene_ahci_poll_reg_val to
                       support PMP")
      4. a3a84bc7 ("ahci_xgene: Implement the workaround to support PMP
                       enumeration and discovery")
      5. 1102407b ("ahci_xgene: Fix the DMA state machine lockup for the
                       ATA_CMD_PACKET PIO mode command")
      6. 72f79f9e ("ahci_xgene: Removing NCQ support from the APM X-Gene
      		SoC AHCI SATA Host Controller driver")
      
      In addition, enable PMP support for APM X-Gene SoC and enable FBS
      support for second generation APM X-Gene SoC.
      Signed-off-by: NSuman Tripathi <stripathi@apm.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      c9802a4b
  12. 10 5月, 2015 2 次提交
  13. 05 5月, 2015 3 次提交
  14. 03 5月, 2015 1 次提交
  15. 21 4月, 2015 1 次提交
    • P
      ata: ahci_st: fixup layering violations / drvdata errors · e0e2674b
      Peter Griffin 提交于
      Brian noticed while working on another SATA driver that uses libahci_platform,
      an error in this driver; it tries to the the driver data for its
      device, while libata also thinks it can set the driver data. See:
      
        ahci_platform_init_host()
        -> ata_host_alloc_pinfo()
           -> ata_host_alloc()
              -> dev_set_drvdata()
      
      So instead of sticking the IP-specific platform data into drvdata, let's
      use the plat_data variable that is reserved for this use.
      
      Addtionally plat_data isn't set until ahci_platform_init_host() has been
      called further down in probe(). So re-work the st_ahci_probe_resets and
      st_ahci_deassert_resets functions to take ahci_host_priv *hpriv as a
      parameter.
      Signed-off-by: NPeter Griffin <peter.griffin@linaro.org>
      Suggested-by: NBrian Norris <computersforpeace@gmail.com>
      Cc: Srinivas Kandagatla <srinivas.kandagatla@gmail.com>
      Cc: Maxime Coquelin <maxime.coquelin@st.com>
      Cc: Patrice Chotard <patrice.chotard@st.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      e0e2674b
  16. 15 4月, 2015 2 次提交
  17. 13 4月, 2015 1 次提交
  18. 12 4月, 2015 1 次提交
  19. 11 4月, 2015 8 次提交
  20. 10 4月, 2015 6 次提交
    • H
      regulator: output current-limit for all regulators in summary · 23296099
      Heiko Stübner 提交于
      Voltage regulators can have (unregulated) current limits too, so we should
      probably output both voltage and current for all regulators.
      
      Holding the rdev->mutex actually conflicts with _regulator_get_current_limit
      but also is not really necessary, as the global regulator_list_mutex already
      protects us from the regulator vanishing while we go through the list.
      
      On the rk3288-firefly the summary now looks like:
      
       regulator                      use open bypass voltage current     min     max
      -------------------------------------------------------------------------------
       vcc_sys                          0   12      0  5000mV     0mA  5000mV  5000mV
          vcc_lan                       1    1      0  3300mV     0mA  3300mV  3300mV
             ff290000.ethernet                                            0mV     0mV
          vcca_33                       0    0      0  3300mV     0mA  3300mV  3300mV
          vcca_18                       0    0      0  1800mV     0mA  1800mV  1800mV
          vdd10_lcd                     0    0      0  1000mV     0mA  1000mV  1000mV
       [...]
      Suggested-by: NMark Brown <broonie@kernel.org>
      Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      23296099
    • H
      regulator: add a summary tree in debugfs · 7c225ec9
      Heiko Stübner 提交于
      On modern systems the regulator hierarchy can get quite long and nested
      with regulators supplying other regulators. In some cases when debugging
      it might be nice to get a tree of these regulators, their consumers
      and the regulation constraints in one go.
      
      To achieve this add a regulator_summary sysfs node, similar to
      clk_summary in the common clock framework, that walks the regulator
      list and creates a tree out of the regulators, their consumers and
      core per-regulator settings.
      
      On a rk3288-firefly the regulator_summary would for example look
      something like:
      
       regulator                      use open bypass   value     min     max
      -----------------------------------------------------------------------
       vcc_sys                          0   12      0  5000mV  5000mV  5000mV
          vcc_lan                       1    1      0  3300mV  3300mV  3300mV
             ff290000.ethernet                                    0mV     0mV
          vcca_33                       0    0      0  3300mV  3300mV  3300mV
          vcca_18                       0    0      0  1800mV  1800mV  1800mV
          vdd10_lcd                     0    0      0  1000mV  1000mV  1000mV
          vccio_sd                      0    0      0  3300mV  3300mV  3300mV
          vcc_20                        0    3      0  2000mV  2000mV  2000mV
             vcc18_lcd                  0    0      0  1800mV  1800mV  1800mV
             vcc_18                     0    2      0  1800mV  1800mV  1800mV
                ff100000.saradc                                   0mV     0mV
                ff0d0000.dwmmc                                 1650mV  1950mV
             vdd_10                     0    0      0  1000mV  1000mV  1000mV
          vdd_log                       0    0      0  1100mV  1100mV  1100mV
          vcc_io                        0    3      0  3300mV  3300mV  3300mV
             ff0f0000.dwmmc                                    3300mV  3400mV
             vcc_flash                  1    1      0  1800mV  1800mV  1800mV
                ff0f0000.dwmmc                                 1700mV  1950mV
             vcc_sd                     1    1      0  3300mV  3300mV  3300mV
                ff0c0000.dwmmc                                 3300mV  3400mV
          vcc_ddr                       0    0      0  1200mV  1200mV  1200mV
          vdd_gpu                       0    0      0  1000mV   850mV  1350mV
          vdd_cpu                       0    1      0   900mV   850mV  1350mV
             cpu0                                               900mV   900mV
          vcc_5v                        0    2      0  5000mV  5000mV  5000mV
             vcc_otg_5v                 0    0      0  5000mV  5000mV  5000mV
             vcc_host_5v                0    0      0  5000mV  5000mV  5000mV
       regulator-dummy                  0    0      0     0mV     0mV     0mV
      Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      7c225ec9
    • C
      drivers/usb/core: devio.c: Removed an uneeded space before tab · 00fe52de
      Chase Metzger 提交于
      Ran checkpatch.pl on file and removed a warning about an unwanted space before
      a tab.
      Signed-off-by: NChase Metzger <chasemetzger15@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      00fe52de
    • G
      usb: dwc2: host: sleep USB_RESUME_TIMEOUT during resume · 42a6630a
      Gregory Herrero 提交于
      msleep(USB_RESUME_TIMEOUT) must be done when the controller drives
      the resume. This is true after HPRT0_RES is written.
      Moreover, restore the delay after controller power is up.
      Signed-off-by: NGregory Herrero <gregory.herrero@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      42a6630a
    • P
      mmc: sdhci-st: Update the quirks for this controller. · 4e187d31
      Peter Griffin 提交于
      Some additional quirks need to be enabled now we support UHS
      modes. This avoids some spurious warnings like
      
      "Got data interrupt 0x00000002 even though no data operation was in progress"
      
      Testing on stih410-b2120 board achieves the following speeds
      with HS200 eMMC card.
      
      max-frequency = 200Mhz
      /dev/mmcblk0p1:
       Timing buffered disk reads: 270 MB in  3.02 seconds =  89.54 MB/sec
      
      max-frequency = 100Mhz
      root@debian-armhf:~# hdparm -t /dev/mmcblk0p1
      /dev/mmcblk0p1:
       Timing buffered disk reads: 210 MB in  3.00 seconds =  70.00 MB/sec
      
      max-frequency = 50Mhz
      root@debian-armhf:~# hdparm -t /dev/mmcblk0p1
      /dev/mmcblk0p1:
       Timing buffered disk reads: 118 MB in  3.00 seconds =  39.28 MB/sec
      
      This is better than the 3.10 kernel which achieves 77.59 MB/sec
      at 200Mhz clock (same board/soc/eMMC).
      Signed-off-by: NPeter Griffin <peter.griffin@linaro.org>
      Signed-off-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Acked-by: NMaxime Coquelin <maxime.coquelin@st.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      4e187d31
    • P
      mmc: sdhci-st: Add sdhci_st_set_uhs_signaling function. · cf48d32e
      Peter Griffin 提交于
      To allow UHS modes to work properly we need to provide the st specific
      set_uhs_signaling callback function. This function differs from the
      generic sdhci_set_uhs_signaling callback in that we need to configure
      the correct delay depending on the UHS mode, and also set the V18_EN
      bit.
      Signed-off-by: NPeter Griffin <peter.griffin@linaro.org>
      Signed-off-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Acked-by: NMaxime Coquelin <maxime.coquelin@st.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      cf48d32e