Skip to contentSkip to conversation

ARM: imx: apalis_imx6: Drop ad-hoc SATA binding

PATCH New Marek Vasut 3 participants 3 messages May 12, 2019 – Jun 10, 2019 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: imx: apalis_imx6: Drop ad-hoc SATA binding

Drop the ad-hoc AHCI binding code, this is superseded by CONFIG_DWC_AHSATA_AHCI=y resp. drivers/ata/dwc_ahsata.c

Cc Fabio Estevam <[email protected]>
Cc Marcel Ziswiler <[email protected]>
Cc Max Krummenacher <[email protected]>
Cc Stefan Agner <[email protected]>
Cc Stefano Babic <[email protected]>
---
 board/toradex/apalis_imx6/apalis_imx6.c | 49 -------------------------
 1 file changed, 49 deletions(-)
board/toradex/apalis_imx6/apalis_imx6.c +0 -49
index 3e59185438..b502d4ef13 100644
@@ -1131,52 +1131,3 @@ U_BOOT_DEVICE(mxc_serial) = {
 	.name = "serial_mxc",
 	.platdata = &mxc_serial_plat,
 };
-
-#if CONFIG_IS_ENABLED(AHCI)
-static int sata_imx_probe(struct udevice *dev)
-{
-	int i, err;
-
-	for (i = 0; i < APALIS_IMX6_SATA_INIT_RETRIES; i++) {
-		err = setup_sata();
-		if (err) {
-			printf("SATA setup failed: %d\n", err);
-			return err;
-		}
-
-		udelay(100);
-
-		err = dwc_ahsata_probe(dev);
-		if (!err)
-			break;
-
-		/* There is no device on the SATA port */
-		if (sata_dm_port_status(0, 0) == 0)
-			break;
-
-		/* There's a device, but link not established. Retry */
-		device_remove(dev, DM_REMOVE_NORMAL);
-	}
-
-	return 0;
-}
-
-struct ahci_ops sata_imx_ops = {
-	.port_status = dwc_ahsata_port_status,
-	.reset	= dwc_ahsata_bus_reset,
-	.scan	= dwc_ahsata_scan,
-};
-
-static const struct udevice_id sata_imx_ids[] = {
-	{ .compatible = "fsl,imx6q-ahci" },
-	{ }
-};
-
-U_BOOT_DRIVER(sata_imx) = {
-	.name		= "dwc_ahci",
-	.id		= UCLASS_AHCI,
-	.of_match	= sata_imx_ids,
-	.ops		= &sata_imx_ops,
-	.probe		= sata_imx_probe,
-};
-#endif /* AHCI */
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 ARM: imx: apalis_imx6: Drop ad-hoc SATA binding

Quoted 4 lines · Marek Vasut

Drop the ad-hoc AHCI binding code, this is superseded by CONFIG_DWC_AHSATA_AHCI=y resp. drivers/ata/dwc_ahsata.c

Works fine, thanks!

Quoted 68 lines
Cc Fabio Estevam <[email protected]>
Cc Marcel Ziswiler <[email protected]>
Cc Max Krummenacher <[email protected]>
Cc Stefan Agner <[email protected]>
Cc Stefano Babic <[email protected]>
---
 board/toradex/apalis_imx6/apalis_imx6.c | 49 ---------------------
----
 1 file changed, 49 deletions(-)
board/toradex/apalis_imx6/apalis_imx6.c +0 -49
index 3e59185438..b502d4ef13 100644
@@ -1131,52 +1131,3 @@ U_BOOT_DEVICE(mxc_serial) = {
 	.name = "serial_mxc",
 	.platdata = &mxc_serial_plat,
 };
-
-#if CONFIG_IS_ENABLED(AHCI)
-static int sata_imx_probe(struct udevice *dev)
-{
-	int i, err;
-
-	for (i = 0; i < APALIS_IMX6_SATA_INIT_RETRIES; i++) {
-		err = setup_sata();
-		if (err) {
-			printf("SATA setup failed: %d\n", err);
-			return err;
-		}
-
-		udelay(100);
-
-		err = dwc_ahsata_probe(dev);
-		if (!err)
-			break;
-
-		/* There is no device on the SATA port */
-		if (sata_dm_port_status(0, 0) == 0)
-			break;
-
-		/* There's a device, but link not established. Retry */
-		device_remove(dev, DM_REMOVE_NORMAL);
-	}
-
-	return 0;
-}
-
-struct ahci_ops sata_imx_ops = {
-	.port_status = dwc_ahsata_port_status,
-	.reset	= dwc_ahsata_bus_reset,
-	.scan	= dwc_ahsata_scan,
-};
-
-static const struct udevice_id sata_imx_ids[] = {
-	{ .compatible = "fsl,imx6q-ahci" },
-	{ }
-};
-
-U_BOOT_DRIVER(sata_imx) = {
-	.name		= "dwc_ahci",
-	.id		= UCLASS_AHCI,
-	.of_match	= sata_imx_ids,
-	.ops		= &sata_imx_ops,
-	.probe		= sata_imx_probe,
-};
-#endif /* AHCI */
#2 lore raw

PATCH 1/1 ARM: imx: apalis_imx6: Drop ad-hoc SATA binding <mailto:[email protected]?subject=unsubscribe> <mailto:[email protected]?subject=subscribe>

In reply to Marek Vasut
Quoted 9 lines

Drop the ad-hoc AHCI binding code, this is superseded by CONFIG_DWC_AHSATA_AHCI=y resp. drivers/ata/dwc_ahsata.c

Cc Fabio Estevam <[email protected]>
Cc Marcel Ziswiler <[email protected]>
Cc Max Krummenacher <[email protected]>
Cc Stefan Agner <[email protected]>
Cc Stefano Babic <[email protected]>

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================