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
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
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
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
09 Jun, 2015
1 commit
-
Freescale introduced QorIQ series SOCs, like ls1021 ls2085, with AHCI
sata support. It complies with the serial ATA 3.0 specification
and the AHCI 1.3 specification.Signed-off-by: Shaohui Xie
Signed-off-by: Yuantian Tang
Signed-off-by: Tejun Heo
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
20 Oct, 2014
1 commit
-
A platform_driver does not need to set an owner, it will be populated by the
driver core.Signed-off-by: Wolfram Sang
16 Aug, 2014
1 commit
-
The last user of the deprecated struct ahci_platform_data has been
cleaned up recently (SPEAr1340 got a proper PHY driver).Signed-off-by: Bartlomiej Zolnierkiewicz
Acked-by: Hans de Goede
Signed-off-by: Tejun Heo
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
-
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
25 Jun, 2014
1 commit
-
NCQ feature is unsupported on hisilicon sata controller, so disable
it. This version of IP is used by hip04 and hix5hd2 soc.tj: "|=" was replaced with "=" for no reason. Restored "|=".
Signed-off-by: Kefeng Wang
Sigend-off-by: Tejun Heo
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 -
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
26 Mar, 2014
2 commits
-
Move AHCI platform library code from ahci_platform.c to
libahci_platform.c and fix dependencies for ahci_st,
ahci_imx and ahci_sunxi drivers.Acked-by: Hans de Goede
Signed-off-by: Bartlomiej Zolnierkiewicz
Signed-off-by: Tejun Heo -
Looking at ST SPEAr1340 AHCI code (the only user of the deprecated
pdata->suspend and pdata->resume) it is obvious the we should return
after calling pdata->suspend() only if the function have returned
non-zero return value. The code has been broken since commit 1e70c2
("ata/ahci_platform: Add clock framework support"). Fix it.Cc: Viresh Kumar
Cc: Shiraz Hashim
Acked-by: Hans de Goede
Signed-off-by: Bartlomiej Zolnierkiewicz
Signed-off-by: Tejun Heo
15 Mar, 2014
1 commit
-
devm_ioremap_resource() returns a pointer to the remapped memory or
an ERR_PTR() encoded error code on failure. Fix the check inside
ahci_platform_get_resources() accordingly.Also while at it remove a needless line break.
Signed-off-by: Bartlomiej Zolnierkiewicz
Signed-off-by: Tejun Heo
23 Feb, 2014
11 commits
-
These members are not used anywhere, and in the future we want
ahci_platform_data to go away entirely so there is no reason to keep these
around.Signed-off-by: Hans de Goede
Signed-off-by: Tejun Heo -
Since the 3.13 release the ahci_imx driver has proper devicetree enabled
support for ahci on imx53 and that is used instead of the old board file
created imx53-ahci platform device.Note this patch also complete drops the id-table, an id-table is not needed
for a single id platform driver, the name field in the driver struct suffices.And the code already has an explicit "MODULE_ALIAS("platform:ahci");" so the
id-table is not needed for that either.Cc: Marek Vasut
Signed-off-by: Hans de Goede
Signed-off-by: Tejun Heo -
I've done a grep over the entire kernel tree and nothing is using this
(anymore?).Signed-off-by: Hans de Goede
Signed-off-by: Tejun Heo -
On OMAP platforms the device needs to be runtime resumed before it can
be accessed. The OMAP HWMOD framework takes care of enabling the
module and its resources based on the device's runtime PM state.In this patch we runtime resume during .probe() and runtime suspend
after .remove().We also update the runtime PM state during .resume().
CC: Balaji T K
Signed-off-by: Roger Quadros
Signed-off-by: Hans de Goede
Signed-off-by: Tejun Heo -
Some platforms have a PHY hooked up to the SATA controller. The PHY
needs to be initialized and powered up for SATA to work. We do that
using the PHY framework.tj: Minor comment formatting updates.
CC: Balaji T K
Signed-off-by: Roger Quadros
Signed-off-by: Hans de Goede
Signed-off-by: Tejun Heo -
Add compatible string "snps,dwc-ahci", which should be used
for Synopsis Designware SATA cores. e.g. on TI OMAP5 and DRA7 platforms.Signed-off-by: Roger Quadros
Reviewed-by: Bartlomiej Zolnierkiewicz
Signed-off-by: Hans de Goede
Signed-off-by: Tejun Heo -
Split suspend / resume code into host suspend / resume functionality and
resource enable / disabling phases, and export the new suspend_ / resume_host
functions.tj: Minor comment formatting updates.
Signed-off-by: Hans de Goede
Signed-off-by: Tejun Heo -
ahci_probe consists of 3 steps:
1) Get resources (get mmio, clks, regulator)
2) Enable resources, handled by ahci_platform_enable_resouces
3) The more or less standard ahci-host controller init sequenceThis commit refactors step 1 and 3 into separate functions, so the platform
drivers for AHCI implementations which need a specific order in step 2,
and / or need to do some custom register poking at some time, can re-use
ahci-platform.c code without needing to copy and paste it.Note that ahci_platform_init_host's prototype takes the 3 non function
members of ahci_platform_data as arguments, the idea is that drivers using
the new exported utility functions will not use ahci_platform_data at all,
and hopefully in the future ahci_platform_data can go away entirely.tj: Minor comment formatting updates.
Signed-off-by: Hans de Goede
Signed-off-by: Tejun Heo -
tj: Minor comment formatting updates.
Signed-off-by: Hans de Goede
Signed-off-by: Tejun Heo -
Signed-off-by: Hans de Goede
Signed-off-by: Tejun Heo -
The allwinner-sun4i AHCI controller needs 2 clocks to be enabled and the
imx AHCI controller needs 3 clocks to be enabled.tj: Minor comment formatting updates.
Signed-off-by: Hans de Goede
Signed-off-by: Tejun Heo
14 Feb, 2014
1 commit
-
None of these files are actually using any __init type directives
and hence don't need to include . Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.Cc: linux-ide@vger.kernel.org
Signed-off-by: Paul Gortmaker
Signed-off-by: Tejun Heo
23 Nov, 2013
1 commit
-
The new IBM Akebono board has a PPC476GTR SoC with an AHCI compliant
SATA controller. This patch adds a compatible property for the new SoC
to the AHCI platform driver.Signed-off-by: Alistair Popple
Signed-off-by: Tejun Heo
Cc: stable@vger.kernel.org
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
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
08 Oct, 2013
1 commit
-
Change "raw" printk() call to dev_info() to provide a better
message to userspace so it can properly identify the device
and not just have to guess.Signed-off-by: Jingoo Han
Signed-off-by: Tejun Heo
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
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
14 Dec, 2012
1 commit
-
These structs are used only for ahci_platform.c, so they should be
static. Thanks to Fengguang for the (automated) suggestion.Signed-off-by: Brian Norris
Cc: Fengguang Wu
Signed-off-by: Jeff Garzik
03 Dec, 2012
4 commits
-
Signed-off-by: Brian Norris
Signed-off-by: Jeff Garzik -
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 -
The ahci_platform driver can now use the module_platform_driver() macro.
Signed-off-by: Brian Norris
Signed-off-by: Jeff Garzik -
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
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