01 Apr, 2016

1 commit

  • On some SOCs PORTS_IMPL register value is never programmed by the
    firmware and left at zero value. Which means that no sata ports are
    available for software. AHCI driver used to cope up with this by
    fabricating the port_map if the PORTS_IMPL register is read zero,
    but recent patch broke this workaround as zero value was valid for
    NVMe disks.

    This patch adds ports-implemented DT bindings as workaround for this issue
    in a way that DT can can override the PORTS_IMPL register in cases where
    the firmware did not program it already.

    Fixes: 566d1827df2e ("libata: disable forced PORTS_IMPL for >= AHCI 1.3")
    Cc: stable@vger.kernel.org # v4.5+
    Signed-off-by: Srinivas Kandagatla
    Acked-by: Tejun Heo
    Reviewed-by: Andy Gross
    Signed-off-by: Tejun Heo

    Srinivas Kandagatla
     

11 Feb, 2016

1 commit

  • The OCTEON SATA controller is currently found on cn71XX devices.

    Acked-by: Arnd Bergmann
    Acked-by: Hans de Goede
    Acked-by: Rob Herring
    Signed-off-by: David Daney
    Signed-off-by: Vinita Gupta
    Signed-off-by: Aleksey Makarov
    Signed-off-by: Zubair Lutfullah Kakakhel
    Signed-off-by: Tejun Heo

    Aleksey Makarov
     

09 Sep, 2015

1 commit

  • This reverts commit 5163fb62541e
    ("ahci: added support for Freescale AHCI sata")

    The reverted patch added Freescale QorIQ AHCI sata support to
    ahci_platform driver though, but it left SoC specific settings to uboot.
    It leads to QorIQ sata heavily depending on uboot. In order to removing
    the dependency we first revert the old patch and then will add a new driver
    for QorIQ SATA.
    Since there are no LS* platforms that have been upstreamed, So
    the revert would not break anything exists.

    Signed-off-by: Tang Yuantian
    Reviewed-by: Hans de Goede
    Signed-off-by: Tejun Heo

    Tang Yuantian
     

07 Jul, 2015

1 commit

  • This patch adds ACPI supports for AHCI platform driver, which uses _CLS
    method to match the device.

    The following is an example of ASL structure in DSDT for a SATA controller,
    which contains _CLS package to be matched by the ahci_platform driver:

    Device (AHC0) // AHCI Controller
    {
    Name(_HID, "AMDI0600")
    Name (_CCA, 1)
    Name (_CLS, Package (3)
    {
    0x01, // Base Class: Mass Storage
    0x06, // Sub-Class: serial ATA
    0x01, // Interface: AHCI
    })
    Name (_CRS, ResourceTemplate ()
    {
    Memory32Fixed (ReadWrite, 0xE0300000, 0x00010000)
    Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive,,,) { 387 }
    })
    }

    Also, since ATA driver should not require PCI support for ATA_ACPI,
    this patch removes dependency in the driver/ata/Kconfig.

    Acked-by: Tejun Heo
    Acked-by: Mika Westerberg
    Reviewed-by: Hanjun Guo
    Signed-off-by: Suravee Suthikulpanit
    Signed-off-by: Rafael J. Wysocki

    Suthikulpanit, Suravee
     

09 Jun, 2015

1 commit


29 Jan, 2015

1 commit

  • The owner module reference of the ahci platform's scsi_host is
    initialized to libahci_platform's one, because these drivers use a
    scsi_host_template defined in libahci_platform. So these drivers can
    be unloaded even if the scsi device is being accessed.

    This fixes it by pushing the scsi_host_template from libahci_platform
    to all leaf drivers. The scsi_host_template is passed through a new
    argument of ahci_platform_init_host().

    Signed-off-by: Akinobu Mita
    Signed-off-by: Tejun Heo
    Cc: Hans de Goede
    Cc: Christoph Hellwig
    Cc: "James E.J. Bottomley"
    Cc: linux-ide@vger.kernel.org
    Cc: linux-scsi@vger.kernel.org

    Akinobu Mita
     

20 Oct, 2014

1 commit


16 Aug, 2014

1 commit


31 Jul, 2014

2 commits

  • The ahci_platform driver is a generic driver using the libahci_platform
    functions. Add a generic compatible to avoid having an endless list of
    compatibles with no differences for the same driver.

    Signed-off-by: Antoine Ténart

    Antoine Ténart
     
  • This patch moves force_port_map and mask_port_map into the
    ahci_host_priv structure. This allows to modify them into the AHCI
    framework. This is needed by the new dt bindings representing ports as
    the port_map mask is computed automatically.

    Parameters modifying force_port_map, mask_port_map and flags have been
    removed from the ahci_platform_init_host() function, and inputs in the
    ahci_host_priv structure are now directly filed.

    Signed-off-by: Antoine Ténart
    Signed-off-by: Tejun Heo

    Antoine Ténart
     

25 Jun, 2014

1 commit


15 May, 2014

2 commits

  • The hip04 SoC of hisilicon has an AHCI compliant SATA controller,
    and it is compliant with the ahci 1.3 and sata 3.0 specification.

    There is a wrong bit in HOST_CAP of hip04 sata controller, which
    enable unsupported feature of FBS, use AHCI_HFLAG_NO_FBS hflag to
    disable it.

    Reviewed-by: Hans de Goede
    Signed-off-by: Kefeng Wang
    Signed-off-by: Tejun Heo

    Kefeng Wang
     
  • Add a dynamic host_flags argument to make ahci_platform_init_host more flexible,
    then remove the AHCI_HFLAGS(...) argument from some driver's ata_port_info,
    and pass that in as the new argument.

    Cc: Hans de Geode
    Reviewed-by: Hans de Goede
    Signed-off-by: Kefeng Wang
    Signed-off-by: Tejun Heo

    Kefeng Wang
     

26 Mar, 2014

2 commits


15 Mar, 2014

1 commit


23 Feb, 2014

11 commits


14 Feb, 2014

1 commit


23 Nov, 2013

1 commit


13 Nov, 2013

1 commit

  • Pull libata changes from Tejun Heo:
    "Nothing too interesting. Only two minor fixes in libata core. Most
    changes are specific to hardware which isn't too common"

    * 'for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
    ahci: Add Device IDs for Intel Wildcat Point-LP
    sata_rcar: Convert to clk_prepare/unprepare
    drivers/libata: Set max sector to 65535 for Slimtype DVD A DS8A9SH drive
    libata: Add some missing command descriptions
    sata_highbank: clear whole array in highbank_initialize_phys()
    ahci: disabled FBS prior to issuing software reset
    libata: Fix display of sata speed
    ahci: imx: setup power saving methods
    ata_piix: minor typo and a printk fix
    ahci: Changing two module params with static and __read_mostly

    Linus Torvalds
     

15 Oct, 2013

1 commit

  • In order to save power consumption as much as possible.

    * Disable sata phy internal pll reference clock when sysetem enter
    into suspend mode, enable it after resume.

    * Setup module parameter used to enable imx ahci test power down
    mode(PDDQ) or not, when there is no device detected on the port

    * minor modifications:
    - The format of the copyright is changed, because that the original
    one can't pass fsl internal patch reivew without the character
    '(c)'.
    - Exports ahci_platform_ops and ahci_error_handler().

    NOTE:
    * The hot-plug can't be supported when PDDQ mode is ever enabled.

    * module parameter usage how-to:
    - default: enable PDDQ mode when no device detected.
    - add "ahci-imx.hotplug=1" into kernel command line if your don't
    want to enable PDDQ mode when no device detected on the port.

    tj: Slightly updated description and comments.

    Signed-off-by: Richard Zhu
    Signed-off-by: Tejun Heo

    Richard Zhu
     

08 Oct, 2013

1 commit


18 Jun, 2013

1 commit

  • This patch adds the compatible string of the exynos5440 sata controller
    compliant with the ahci 1.3 and sata 3.0 specification.

    changes in v2:
    changed the compatible string by adding the actual IP
    owners name instead of the SoC vendor name.

    Signed-off-by: Girish K S
    Signed-off-by: Tejun Heo

    Girish K S
     

04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the use of __devinit, __devexit_p, __devinitdata,
    and __devexit from these drivers.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Cc: Jeff Garzik
    Cc: Viresh Kumar
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

14 Dec, 2012

1 commit


03 Dec, 2012

4 commits

  • Signed-off-by: Brian Norris
    Signed-off-by: Jeff Garzik

    Brian Norris
     
  • AHCI platform devices may provide an exit() routine, via
    ahci_platform_data, that powers off the SATA core. Such a routine should
    be executed from the ata_port_operations host_stop() hook. That way, the
    ATA subsystem can perform any last-minute hardware cleanup (via devres,
    for example), then trigger the power-off at the appropriate time.

    This patch fixes bus errors triggered during module removal or device
    unbinding, seen on an SoC SATA core.

    Signed-off-by: Brian Norris
    Signed-off-by: Jeff Garzik

    Brian Norris
     
  • The ahci_platform driver can now use the module_platform_driver() macro.

    Signed-off-by: Brian Norris
    Signed-off-by: Jeff Garzik

    Brian Norris
     
  • platform_driver_probe() should be used for registering this driver only
    if we want to

    "...remove its run-once probe() infrastructure from memory after the
    driver has bound to the device."

    However, we may want to leave the probe infrastructure in place in order
    to support binding/unbinding a device dynamically. This is useful, for
    instance, as a power management mechanism, where a device can be totally
    powered down when unbound (whereas with runtime power management,
    powering down the SATA core would incur unacceptable loss of
    functionality).

    Thus, convert this driver to use platform_driver_register().

    Signed-off-by: Brian Norris
    Signed-off-by: Jeff Garzik

    Brian Norris
     

16 Nov, 2012

1 commit

  • This will fix warnings like following when CONFIG_PM_SLEEP is not set:

    warning: 'xxx_suspend' defined but not used [-Wunused-function]
    warning: 'xxx_resume' defined but not used [-Wunused-function]

    Because
    SET_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn)

    Only references the callbacks on CONFIG_PM_SLEEP (instead of CONFIG_PM).

    Cc: Viresh Kumar
    Cc: linux-ide@vger.kernel.org
    Signed-off-by: Yuanhan Liu
    Signed-off-by: Fengguang Wu
    Signed-off-by: Jeff Garzik

    Yuanhan Liu