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

Commit 725c7b57 authored by Antoine Ténart's avatar Antoine Ténart Committed by Tejun Heo
Browse files

ata: libahci_platform: move port_map parameters into the AHCI structure



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: default avatarAntoine Ténart <antoine.tenart@free-electrons.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent e8f78183
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -441,7 +441,7 @@ static int acard_ahci_init_one(struct pci_dev *pdev, const struct pci_device_id
	hpriv->mmio = pcim_iomap_table(pdev)[AHCI_PCI_BAR];

	/* save initial config */
	ahci_save_initial_config(&pdev->dev, hpriv, 0, 0);
	ahci_save_initial_config(&pdev->dev, hpriv);

	/* prepare host */
	if (hpriv->cap & HOST_CAP_NCQ)
+1 −2
Original line number Diff line number Diff line
@@ -526,8 +526,7 @@ static void ahci_pci_save_initial_config(struct pci_dev *pdev,
			  "Disabling your PATA port. Use the boot option 'ahci.marvell_enable=0' to avoid this.\n");
	}

	ahci_save_initial_config(&pdev->dev, hpriv, force_port_map,
				 mask_port_map);
	ahci_save_initial_config(&pdev->dev, hpriv);
}

static int ahci_pci_reset_controller(struct ata_host *host)
+6 −4
Original line number Diff line number Diff line
@@ -316,8 +316,12 @@ struct ahci_port_priv {
};

struct ahci_host_priv {
	void __iomem *		mmio;		/* bus-independent mem map */
	/* Input fields */
	unsigned int		flags;		/* AHCI_HFLAG_* */
	u32			force_port_map;	/* force port map */
	u32			mask_port_map;	/* mask out particular bits */

	void __iomem *		mmio;		/* bus-independent mem map */
	u32			cap;		/* cap to use */
	u32			cap2;		/* cap2 to use */
	u32			port_map;	/* port map to use */
@@ -361,9 +365,7 @@ unsigned int ahci_dev_classify(struct ata_port *ap);
void ahci_fill_cmd_slot(struct ahci_port_priv *pp, unsigned int tag,
			u32 opts);
void ahci_save_initial_config(struct device *dev,
			      struct ahci_host_priv *hpriv,
			      unsigned int force_port_map,
			      unsigned int mask_port_map);
			      struct ahci_host_priv *hpriv);
void ahci_init_controller(struct ata_host *host);
int ahci_reset_controller(struct ata_host *host);

+1 −2
Original line number Diff line number Diff line
@@ -85,8 +85,7 @@ static int ahci_da850_probe(struct platform_device *pdev)

	da850_sata_init(dev, pwrdn_reg, hpriv->mmio);

	rc = ahci_platform_init_host(pdev, hpriv, &ahci_da850_port_info,
				     0, 0, 0);
	rc = ahci_platform_init_host(pdev, hpriv, &ahci_da850_port_info);
	if (rc)
		goto disable_resources;

+1 −2
Original line number Diff line number Diff line
@@ -620,8 +620,7 @@ static int imx_ahci_probe(struct platform_device *pdev)
	reg_val = clk_get_rate(imxpriv->ahb_clk) / 1000;
	writel(reg_val, hpriv->mmio + IMX_TIMER1MS);

	ret = ahci_platform_init_host(pdev, hpriv, &ahci_imx_port_info,
				      0, 0, 0);
	ret = ahci_platform_init_host(pdev, hpriv, &ahci_imx_port_info);
	if (ret)
		goto disable_sata;

Loading