Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8f78183 authored by Tejun Heo's avatar Tejun Heo
Browse files

Merge branch 'for-3.16-fixes' of...

Merge branch 'for-3.16-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata

 into for-3.17

The scheduled ahci platform patches depend on change in
for-3.16-fixes.  Pull it into for-3.17.

Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parents 19f5be0f 1a112d10
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -7993,6 +7993,16 @@ F: drivers/ata/
F:	include/linux/ata.h
F:	include/linux/libata.h

SERIAL ATA AHCI PLATFORM devices support
M:	Hans de Goede <hdegoede@redhat.com>
M:	Tejun Heo <tj@kernel.org>
L:	linux-ide@vger.kernel.org
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git
S:	Supported
F:	drivers/ata/ahci_platform.c
F:	drivers/ata/libahci_platform.c
F:	include/linux/ahci_platform.h

SERVER ENGINES 10Gbps iSCSI - BladeEngine 2 DRIVER
M:	Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
L:	linux-scsi@vger.kernel.org
+1 −0
Original line number Diff line number Diff line
@@ -456,6 +456,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {

	/* Promise */
	{ PCI_VDEVICE(PROMISE, 0x3f20), board_ahci },	/* PDC42819 */
	{ PCI_VDEVICE(PROMISE, 0x3781), board_ahci },   /* FastTrak TX8660 ahci-mode */

	/* Asmedia */
	{ PCI_VDEVICE(ASMEDIA, 0x0601), board_ahci },	/* ASM1060 */
+2 −0
Original line number Diff line number Diff line
@@ -371,7 +371,9 @@ int ahci_do_softreset(struct ata_link *link, unsigned int *class,
		      int pmp, unsigned long deadline,
		      int (*check_ready)(struct ata_link *link));

unsigned int ahci_qc_issue(struct ata_queued_cmd *qc);
int ahci_stop_engine(struct ata_port *ap);
void ahci_start_fis_rx(struct ata_port *ap);
void ahci_start_engine(struct ata_port *ap);
int ahci_check_ready(struct ata_link *link);
int ahci_kick_engine(struct ata_port *ap);
+34 −4
Original line number Diff line number Diff line
@@ -58,6 +58,8 @@ enum ahci_imx_type {
struct imx_ahci_priv {
	struct platform_device *ahci_pdev;
	enum ahci_imx_type type;
	struct clk *sata_clk;
	struct clk *sata_ref_clk;
	struct clk *ahb_clk;
	struct regmap *gpr;
	bool no_device;
@@ -225,7 +227,7 @@ static int imx_sata_enable(struct ahci_host_priv *hpriv)
			return ret;
	}

	ret = ahci_platform_enable_clks(hpriv);
	ret = clk_prepare_enable(imxpriv->sata_ref_clk);
	if (ret < 0)
		goto disable_regulator;

@@ -287,7 +289,7 @@ static void imx_sata_disable(struct ahci_host_priv *hpriv)
				   !IMX6Q_GPR13_SATA_MPLL_CLK_EN);
	}

	ahci_platform_disable_clks(hpriv);
	clk_disable_unprepare(imxpriv->sata_ref_clk);

	if (hpriv->target_pwr)
		regulator_disable(hpriv->target_pwr);
@@ -320,6 +322,9 @@ static void ahci_imx_error_handler(struct ata_port *ap)
	writel(reg_val | IMX_P0PHYCR_TEST_PDDQ, mmio + IMX_P0PHYCR);
	imx_sata_disable(hpriv);
	imxpriv->no_device = true;

	dev_info(ap->dev, "no device found, disabling link.\n");
	dev_info(ap->dev, "pass " MODULE_PARAM_PREFIX ".hotplug=1 to enable hotplug\n");
}

static int ahci_imx_softreset(struct ata_link *link, unsigned int *class,
@@ -540,6 +545,19 @@ static int imx_ahci_probe(struct platform_device *pdev)
	imxpriv->no_device = false;
	imxpriv->first_time = true;
	imxpriv->type = (enum ahci_imx_type)of_id->data;

	imxpriv->sata_clk = devm_clk_get(dev, "sata");
	if (IS_ERR(imxpriv->sata_clk)) {
		dev_err(dev, "can't get sata clock.\n");
		return PTR_ERR(imxpriv->sata_clk);
	}

	imxpriv->sata_ref_clk = devm_clk_get(dev, "sata_ref");
	if (IS_ERR(imxpriv->sata_ref_clk)) {
		dev_err(dev, "can't get sata_ref clock.\n");
		return PTR_ERR(imxpriv->sata_ref_clk);
	}

	imxpriv->ahb_clk = devm_clk_get(dev, "ahb");
	if (IS_ERR(imxpriv->ahb_clk)) {
		dev_err(dev, "can't get ahb clock.\n");
@@ -573,10 +591,14 @@ static int imx_ahci_probe(struct platform_device *pdev)

	hpriv->plat_data = imxpriv;

	ret = imx_sata_enable(hpriv);
	ret = clk_prepare_enable(imxpriv->sata_clk);
	if (ret)
		return ret;

	ret = imx_sata_enable(hpriv);
	if (ret)
		goto disable_clk;

	/*
	 * Configure the HWINIT bits of the HOST_CAP and HOST_PORTS_IMPL,
	 * and IP vendor specific register IMX_TIMER1MS.
@@ -601,16 +623,24 @@ static int imx_ahci_probe(struct platform_device *pdev)
	ret = ahci_platform_init_host(pdev, hpriv, &ahci_imx_port_info,
				      0, 0, 0);
	if (ret)
		imx_sata_disable(hpriv);
		goto disable_sata;

	return 0;

disable_sata:
	imx_sata_disable(hpriv);
disable_clk:
	clk_disable_unprepare(imxpriv->sata_clk);
	return ret;
}

static void ahci_imx_host_stop(struct ata_host *host)
{
	struct ahci_host_priv *hpriv = host->private_data;
	struct imx_ahci_priv *imxpriv = hpriv->plat_data;

	imx_sata_disable(hpriv);
	clk_disable_unprepare(imxpriv->sata_clk);
}

#ifdef CONFIG_PM_SLEEP
+1 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ static int ahci_probe(struct platform_device *pdev)
	}

	if (of_device_is_compatible(dev->of_node, "hisilicon,hisi-ahci"))
		hflags |= AHCI_HFLAG_NO_FBS;
		hflags |= AHCI_HFLAG_NO_FBS | AHCI_HFLAG_NO_NCQ;

	rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info,
				     hflags, 0, 0);
Loading