Skip to contentSkip to conversation

ahci: qoriq: add lx2160 platforms support

PATCH Superseded Peng Ma 3 participants 7 messages Jan 10, 2019 – Jan 14, 2019

Subsystems (3)
lore
Share & tools
lore

Peng Ma

author
#0 lore raw

PATCH 1/2 ahci: qoriq: add lx2160 platforms support

Lx2160a is a new introduced soc which supports ATA3.0 and Clean up some code

---
 drivers/ata/ahci_qoriq.c |   44 ++++++++++++--------------------------------
 1 files changed, 12 insertions(+), 32 deletions(-)
drivers/ata/ahci_qoriq.c +12 -32
index ce59253..1994bf2 100644
@@ -57,7 +57,7 @@ enum ahci_qoriq_type {
 	AHCI_LS2080A,
 	AHCI_LS1046A,
 	AHCI_LS1088A,
-	AHCI_LS2088A,
+	AHCI_LX2160A,
 };
 
 struct ahci_qoriq_priv {
@@ -73,7 +73,7 @@ struct ahci_qoriq_priv {
 	{ .compatible = "fsl,ls2080a-ahci", .data = (void *)AHCI_LS2080A},
 	{ .compatible = "fsl,ls1046a-ahci", .data = (void *)AHCI_LS1046A},
 	{ .compatible = "fsl,ls1088a-ahci", .data = (void *)AHCI_LS1088A},
-	{ .compatible = "fsl,ls2088a-ahci", .data = (void *)AHCI_LS2088A},
+	{ .compatible = "fsl,lx2160a-ahci", .data = (void *)AHCI_LX2160A},
 	{},
 };
 MODULE_DEVICE_TABLE(of, ahci_qoriq_of_match);
@@ -174,12 +174,10 @@ static int ahci_qoriq_phy_init(struct ahci_host_priv *hpriv)
 		writel(LS1021A_PORT_PHY4, reg_base + PORT_PHY4);
 		writel(LS1021A_PORT_PHY5, reg_base + PORT_PHY5);
 		writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS);
-		if (qpriv->is_dmacoherent)
-			writel(AHCI_PORT_AXICC_CFG,
-					reg_base + LS1021A_AXICC_ADDR);
 		break;
 
 	case AHCI_LS1043A:
+	case AHCI_LS1046A:
 		if (!qpriv->ecc_addr)
 			return -EINVAL;
 		writel(readl(qpriv->ecc_addr) | ECC_DIS_ARMV8_CH2,
@@ -188,8 +186,6 @@ static int ahci_qoriq_phy_init(struct ahci_host_priv *hpriv)
 		writel(AHCI_PORT_PHY2_CFG, reg_base + PORT_PHY2);
 		writel(AHCI_PORT_PHY3_CFG, reg_base + PORT_PHY3);
 		writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS);
-		if (qpriv->is_dmacoherent)
-			writel(AHCI_PORT_AXICC_CFG, reg_base + PORT_AXICC);
 		break;
 
 	case AHCI_LS2080A:
@@ -197,24 +193,10 @@ static int ahci_qoriq_phy_init(struct ahci_host_priv *hpriv)
 		writel(AHCI_PORT_PHY2_CFG, reg_base + PORT_PHY2);
 		writel(AHCI_PORT_PHY3_CFG, reg_base + PORT_PHY3);
 		writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS);
-		if (qpriv->is_dmacoherent)
-			writel(AHCI_PORT_AXICC_CFG, reg_base + PORT_AXICC);
-		break;
-
-	case AHCI_LS1046A:
-		if (!qpriv->ecc_addr)
-			return -EINVAL;
-		writel(readl(qpriv->ecc_addr) | ECC_DIS_ARMV8_CH2,
-				qpriv->ecc_addr);
-		writel(AHCI_PORT_PHY_1_CFG, reg_base + PORT_PHY1);
-		writel(AHCI_PORT_PHY2_CFG, reg_base + PORT_PHY2);
-		writel(AHCI_PORT_PHY3_CFG, reg_base + PORT_PHY3);
-		writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS);
-		if (qpriv->is_dmacoherent)
-			writel(AHCI_PORT_AXICC_CFG, reg_base + PORT_AXICC);
 		break;
 
 	case AHCI_LS1088A:
+	case AHCI_LX2160A:
 		if (!qpriv->ecc_addr)
 			return -EINVAL;
 		writel(readl(qpriv->ecc_addr) | ECC_DIS_LS1088A,
@@ -223,18 +205,16 @@ static int ahci_qoriq_phy_init(struct ahci_host_priv *hpriv)
 		writel(AHCI_PORT_PHY2_CFG, reg_base + PORT_PHY2);
 		writel(AHCI_PORT_PHY3_CFG, reg_base + PORT_PHY3);
 		writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS);
-		if (qpriv->is_dmacoherent)
-			writel(AHCI_PORT_AXICC_CFG, reg_base + PORT_AXICC);
 		break;
+	}
 
-	case AHCI_LS2088A:
-		writel(AHCI_PORT_PHY_1_CFG, reg_base + PORT_PHY1);
-		writel(AHCI_PORT_PHY2_CFG, reg_base + PORT_PHY2);
-		writel(AHCI_PORT_PHY3_CFG, reg_base + PORT_PHY3);
-		writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS);
-		if (qpriv->is_dmacoherent)
-			writel(AHCI_PORT_AXICC_CFG, reg_base + PORT_AXICC);
-		break;
+	if (qpriv->is_dmacoherent) {
+		if (qpriv->type == AHCI_LS1021A)
+			writel(AHCI_PORT_AXICC_CFG,
+			       reg_base + LS1021A_AXICC_ADDR);
+		else
+			writel(AHCI_PORT_AXICC_CFG,
+			       reg_base + PORT_AXICC);
 	}
 
 	return 0;
Signature · 1 line
1.7.1
author
#1 lore raw

PATCH 2/2 arm64: dts: lx2160a: add sata node support

Add sata node support and Enable sata support

---
 arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts |   16 +++++++
 arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi    |   44 +++++++++++++++++++++
 2 files changed, 60 insertions(+), 0 deletions(-)
arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts +16 -0
index 6481e5f..aacca27 100644
@@ -117,3 +117,19 @@
 &usb1 {
 	status = "okay";
 };
+
+&sata0 {
+	status = "okay";
+};
+
+&sata1 {
+	status = "okay";
+};
+
+&sata2 {
+	status = "okay";
+};
+
+&sata3 {
+	status = "okay";
+};
arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi +44 -0

49 lines not on this page · raw message

Signature · 1 line
1.7.1
author
#4 lore raw
In reply to Peng Ma

Hi Jens,

I send the sata patchs to the upstream patchwork with ./scripts/get_maintainer.pl, but I find my patch on http://patchwork.ozlabs.org/project/linux-ide/list/ , I saw the MAINTAINERS, the driver/ata/* should be on https://patchwork.kernel.org/project/linux-block/list/ . could you please help me what the patchwork is right. Thanks a lot.

Best Regards,
Peng

Quoted 119 lines

-----Original Message-----
From: Peng Ma <[email protected]>
Sent: 2019年1月10日 18:06
To: [email protected]; [email protected]
Cc: Leo Li <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Peng Ma <[email protected]>
Subject: [PATCH 1/2] ahci: qoriq: add lx2160 platforms support

Lx2160a is a new introduced soc which supports ATA3.0 and Clean up some code

---
drivers/ata/ahci_qoriq.c | 44 ++++++++++++--------------------------------

1 files changed, 12 insertions(+), 32 deletions(-)
drivers/ata/ahci_qoriq.c index renamed from drivers/ata/ahci_qoriq.c +0 -0

ce59253..1994bf2 100644

drivers/ata/ahci_qoriq.c +2 -2
@@ -57,7 +57,7 @@ enum ahci_qoriq_type {
 	AHCI_LS2080A,
 	AHCI_LS1046A,
 	AHCI_LS1088A,
-	AHCI_LS2088A,
+	AHCI_LX2160A,
 };
 
 struct ahci_qoriq_priv {
@@ -73,7 +73,7 @@ struct ahci_qoriq_priv {
 	{ .compatible = "fsl,ls2080a-ahci", .data = (void *)AHCI_LS2080A},
 	{ .compatible = "fsl,ls1046a-ahci", .data = (void *)AHCI_LS1046A},
 	{ .compatible = "fsl,ls1088a-ahci", .data = (void *)AHCI_LS1088A},
-	{ .compatible = "fsl,ls2088a-ahci", .data = (void *)AHCI_LS2088A},
+	{ .compatible = "fsl,lx2160a-ahci", .data = (void *)AHCI_LX2160A},
 	{},
 };

MODULE_DEVICE_TABLE(of, ahci_qoriq_of_match); @@ -174,12 +174,10 @@ static int ahci_qoriq_phy_init(struct ahci_host_priv *hpriv)

		writel(LS1021A_PORT_PHY4, reg_base + PORT_PHY4);
		writel(LS1021A_PORT_PHY5, reg_base + PORT_PHY5);
		writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS);
drivers/ata/ahci_qoriq.c +0 -3
-		if (qpriv->is_dmacoherent)
-			writel(AHCI_PORT_AXICC_CFG,
-					reg_base + LS1021A_AXICC_ADDR);
		break;

	case AHCI_LS1043A:
drivers/ata/ahci_qoriq.c +1 -0
+	case AHCI_LS1046A:
		if (!qpriv->ecc_addr)
			return -EINVAL;
		writel(readl(qpriv->ecc_addr) | ECC_DIS_ARMV8_CH2, @@ -188,8
+186,6 @@ static int ahci_qoriq_phy_init(struct ahci_host_priv *hpriv)
		writel(AHCI_PORT_PHY2_CFG, reg_base + PORT_PHY2);
		writel(AHCI_PORT_PHY3_CFG, reg_base + PORT_PHY3);
		writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS);
drivers/ata/ahci_qoriq.c +0 -2
-		if (qpriv->is_dmacoherent)
-			writel(AHCI_PORT_AXICC_CFG, reg_base + PORT_AXICC);
		break;

	case AHCI_LS2080A:
drivers/ata/ahci_qoriq.c +1 -15
@@ -197,24 +193,10 @@ static int ahci_qoriq_phy_init(struct ahci_host_priv
 *hpriv)
 		writel(AHCI_PORT_PHY2_CFG, reg_base + PORT_PHY2);
 		writel(AHCI_PORT_PHY3_CFG, reg_base + PORT_PHY3);
 		writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS);
-		if (qpriv->is_dmacoherent)
-			writel(AHCI_PORT_AXICC_CFG, reg_base + PORT_AXICC);
-		break;
-
-	case AHCI_LS1046A:
-		if (!qpriv->ecc_addr)
-			return -EINVAL;
-		writel(readl(qpriv->ecc_addr) | ECC_DIS_ARMV8_CH2,
-				qpriv->ecc_addr);
-		writel(AHCI_PORT_PHY_1_CFG, reg_base + PORT_PHY1);
-		writel(AHCI_PORT_PHY2_CFG, reg_base + PORT_PHY2);
-		writel(AHCI_PORT_PHY3_CFG, reg_base + PORT_PHY3);
-		writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS);
-		if (qpriv->is_dmacoherent)
-			writel(AHCI_PORT_AXICC_CFG, reg_base + PORT_AXICC);
 		break;
 
 	case AHCI_LS1088A:
+	case AHCI_LX2160A:
 		if (!qpriv->ecc_addr)
 			return -EINVAL;
		writel(readl(qpriv->ecc_addr) | ECC_DIS_LS1088A, @@ -223,18
+205,16 @@ static int ahci_qoriq_phy_init(struct ahci_host_priv *hpriv)
		writel(AHCI_PORT_PHY2_CFG, reg_base + PORT_PHY2);
		writel(AHCI_PORT_PHY3_CFG, reg_base + PORT_PHY3);
		writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS);
drivers/ata/ahci_qoriq.c +0 -2
-		if (qpriv->is_dmacoherent)
-			writel(AHCI_PORT_AXICC_CFG, reg_base + PORT_AXICC);
		break;
drivers/ata/ahci_qoriq.c +8 -8
+	}
 
-	case AHCI_LS2088A:
-		writel(AHCI_PORT_PHY_1_CFG, reg_base + PORT_PHY1);
-		writel(AHCI_PORT_PHY2_CFG, reg_base + PORT_PHY2);
-		writel(AHCI_PORT_PHY3_CFG, reg_base + PORT_PHY3);
-		writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS);
-		if (qpriv->is_dmacoherent)
-			writel(AHCI_PORT_AXICC_CFG, reg_base + PORT_AXICC);
-		break;
+	if (qpriv->is_dmacoherent) {
+		if (qpriv->type == AHCI_LS1021A)
+			writel(AHCI_PORT_AXICC_CFG,
+			       reg_base + LS1021A_AXICC_ADDR);
+		else
+			writel(AHCI_PORT_AXICC_CFG,
+			       reg_base + PORT_AXICC);
	}

	return 0;

--
1.7.1

#5 lore raw
Quoted 13 lines

-----Original Message-----
From: Peng Ma
Sent: Thursday, January 10, 2019 4:32 AM
To: Peng Ma <[email protected]>; [email protected]; [email protected]
Cc: Leo Li <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux- [email protected]; Andy Tang <[email protected]>
Subject: RE: [PATCH 1/2] ahci: qoriq: add lx2160 platforms support

Quoted 7 lines

Hi Jens,

I send the sata patchs to the upstream patchwork
with ./scripts/get_maintainer.pl, but I find my patch on
http://patchwork.ozlabs.org/project/linux-ide/list/ , I saw the MAINTAINERS, the driver/ata/* should be on https://patchwork.kernel.org/project/linux-
block/list/ . could you please help me what the patchwork is right.

Peng,

The patchwork used is related to the mailing list which you send the patch to not the maintainer's git tree used. Since the MAINTAINERS file says drivers/ata should use linux-ide mailing list, patches will appear in linux-ide patchwork.

Regards,
Leo

Quoted 133 lines

Thanks a lot.

Best Regards,
Peng

Quoted 39 lines

-----Original Message-----
From: Peng Ma <[email protected]>
Sent: 2019年1月10日 18:06
To: [email protected]; [email protected]
Cc: Leo Li <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Peng Ma <[email protected]>
Subject: [PATCH 1/2] ahci: qoriq: add lx2160 platforms support

Lx2160a is a new introduced soc which supports ATA3.0 and Clean up some code

---
drivers/ata/ahci_qoriq.c | 44 ++++++++++++--------------------------------

1 files changed, 12 insertions(+), 32 deletions(-)
drivers/ata/ahci_qoriq.c index renamed from drivers/ata/ahci_qoriq.c +0 -0

ce59253..1994bf2 100644

drivers/ata/ahci_qoriq.c +2 -2
@@ -57,7 +57,7 @@ enum ahci_qoriq_type {
 	AHCI_LS2080A,
 	AHCI_LS1046A,
 	AHCI_LS1088A,
-	AHCI_LS2088A,
+	AHCI_LX2160A,
 };
 
 struct ahci_qoriq_priv {
@@ -73,7 +73,7 @@ struct ahci_qoriq_priv {
 	{ .compatible = "fsl,ls2080a-ahci", .data = (void *)AHCI_LS2080A},
 	{ .compatible = "fsl,ls1046a-ahci", .data = (void *)AHCI_LS1046A},
 	{ .compatible = "fsl,ls1088a-ahci", .data = (void *)AHCI_LS1088A},
-	{ .compatible = "fsl,ls2088a-ahci", .data = (void *)AHCI_LS2088A},
+	{ .compatible = "fsl,lx2160a-ahci", .data = (void *)AHCI_LX2160A},
 	{},
 };
Quoted 1 line

MODULE_DEVICE_TABLE(of, ahci_qoriq_of_match); @@ -174,12 +174,10

@@

Quoted 11 lines

static int ahci_qoriq_phy_init(struct ahci_host_priv *hpriv)

		writel(LS1021A_PORT_PHY4, reg_base + PORT_PHY4);
		writel(LS1021A_PORT_PHY5, reg_base + PORT_PHY5);
		writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS);
drivers/ata/ahci_qoriq.c +0 -3
-		if (qpriv->is_dmacoherent)
-			writel(AHCI_PORT_AXICC_CFG,
-					reg_base + LS1021A_AXICC_ADDR);
		break;

	case AHCI_LS1043A:
drivers/ata/ahci_qoriq.c +1 -0
+	case AHCI_LS1046A:
Quoted 3 lines
		if (!qpriv->ecc_addr)
			return -EINVAL;
		writel(readl(qpriv->ecc_addr) | ECC_DIS_ARMV8_CH2, @@ -

188,8

drivers/ata/ahci_qoriq.c

Quoted 6 lines

+186,6 @@ static int ahci_qoriq_phy_init(struct ahci_host_priv *hpriv)

		writel(AHCI_PORT_PHY2_CFG, reg_base + PORT_PHY2);
		writel(AHCI_PORT_PHY3_CFG, reg_base + PORT_PHY3);
		writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS);
drivers/ata/ahci_qoriq.c +0 -2
-		if (qpriv->is_dmacoherent)
-			writel(AHCI_PORT_AXICC_CFG, reg_base +

PORT_AXICC);

drivers/ata/ahci_qoriq.c

Quoted 11 lines
		break;

	case AHCI_LS2080A:
drivers/ata/ahci_qoriq.c +0 -0
@@ -197,24 +193,10 @@ static int ahci_qoriq_phy_init(struct

ahci_host_priv
*hpriv)

		writel(AHCI_PORT_PHY2_CFG, reg_base + PORT_PHY2);
		writel(AHCI_PORT_PHY3_CFG, reg_base + PORT_PHY3);
		writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS);
drivers/ata/ahci_qoriq.c +0 -2
-		if (qpriv->is_dmacoherent)
-			writel(AHCI_PORT_AXICC_CFG, reg_base +

PORT_AXICC);

drivers/ata/ahci_qoriq.c static int ahci_qoriq_phy_init(struct ahci_host_priv *hpriv)

Quoted 13 lines
drivers/ata/ahci_qoriq.c +0 -13
-		break;
-
-	case AHCI_LS1046A:
-		if (!qpriv->ecc_addr)
-			return -EINVAL;
-		writel(readl(qpriv->ecc_addr) | ECC_DIS_ARMV8_CH2,
-				qpriv->ecc_addr);
-		writel(AHCI_PORT_PHY_1_CFG, reg_base + PORT_PHY1);
-		writel(AHCI_PORT_PHY2_CFG, reg_base + PORT_PHY2);
-		writel(AHCI_PORT_PHY3_CFG, reg_base + PORT_PHY3);
-		writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS);
-		if (qpriv->is_dmacoherent)
-			writel(AHCI_PORT_AXICC_CFG, reg_base +

PORT_AXICC);

Quoted 7 lines
		break;

	case AHCI_LS1088A:
drivers/ata/ahci_qoriq.c +1 -0
+	case AHCI_LX2160A:
		if (!qpriv->ecc_addr)
			return -EINVAL;
		writel(readl(qpriv->ecc_addr) | ECC_DIS_LS1088A, @@ -

223,18

drivers/ata/ahci_qoriq.c

Quoted 6 lines

+205,16 @@ static int ahci_qoriq_phy_init(struct ahci_host_priv *hpriv)

		writel(AHCI_PORT_PHY2_CFG, reg_base + PORT_PHY2);
		writel(AHCI_PORT_PHY3_CFG, reg_base + PORT_PHY3);
		writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS);
drivers/ata/ahci_qoriq.c +0 -2
-		if (qpriv->is_dmacoherent)
-			writel(AHCI_PORT_AXICC_CFG, reg_base +

PORT_AXICC);

drivers/ata/ahci_qoriq.c static int ahci_qoriq_phy_init(struct ahci_host_priv *hpriv)

Quoted 10 lines
		break;
drivers/ata/ahci_qoriq.c +1 -7
+	}
 
-	case AHCI_LS2088A:
-		writel(AHCI_PORT_PHY_1_CFG, reg_base + PORT_PHY1);
-		writel(AHCI_PORT_PHY2_CFG, reg_base + PORT_PHY2);
-		writel(AHCI_PORT_PHY3_CFG, reg_base + PORT_PHY3);
-		writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS);
-		if (qpriv->is_dmacoherent)
-			writel(AHCI_PORT_AXICC_CFG, reg_base +

PORT_AXICC);

Quoted 13 lines
drivers/ata/ahci_qoriq.c +7 -1
-		break;
+	if (qpriv->is_dmacoherent) {
+		if (qpriv->type == AHCI_LS1021A)
+			writel(AHCI_PORT_AXICC_CFG,
+			       reg_base + LS1021A_AXICC_ADDR);
+		else
+			writel(AHCI_PORT_AXICC_CFG,
+			       reg_base + PORT_AXICC);
	}

	return 0;

--
1.7.1

author
#6 lore raw
Quoted 35 lines

-----Original Message-----
From: Leo Li
Sent: 2019年1月11日 4:30
To: Peng Ma <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Andy Tang <[email protected]>
Subject: RE: [PATCH 1/2] ahci: qoriq: add lx2160 platforms support

Quoted 10 lines

-----Original Message-----
From: Peng Ma
Sent: Thursday, January 10, 2019 4:32 AM
To: Peng Ma <[email protected]>; [email protected]; [email protected]
Cc: Leo Li <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux- [email protected]; Andy Tang <[email protected]>
Subject: RE: [PATCH 1/2] ahci: qoriq: add lx2160 platforms support

Quoted 8 lines

Hi Jens,

I send the sata patchs to the upstream patchwork with
./scripts/get_maintainer.pl, but I find my patch on
http://patchwork.ozlabs.org/project/linux-ide/list/ , I saw the MAINTAINERS, the driver/ata/* should be on
https://patchwork.kernel.org/project/linux-
block/list/ . could you please help me what the patchwork is right.

Peng,

Quoted 8 lines

The patchwork used is related to the mailing list which you send the patch to not the maintainer's git tree used. Since the MAINTAINERS file says drivers/ata should use linux-ide mailing list, patches will appear in linux-ide patchwork.

Regards,
Leo

[Peng Ma] got it, thanks.
Best Regards,
Peng

Quoted 133 lines
Quoted 133 lines

Thanks a lot.

Best Regards,
Peng

Quoted 40 lines

-----Original Message-----
From: Peng Ma <[email protected]>
Sent: 2019年1月10日 18:06
To: [email protected]; [email protected]
Cc: Leo Li <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Peng Ma <[email protected]>
Subject: [PATCH 1/2] ahci: qoriq: add lx2160 platforms support

Lx2160a is a new introduced soc which supports ATA3.0 and Clean up some code

---
drivers/ata/ahci_qoriq.c | 44 ++++++++++++--------------------------------

1 files changed, 12 insertions(+), 32 deletions(-)
drivers/ata/ahci_qoriq.c +0 -0

index
ce59253..1994bf2 100644

drivers/ata/ahci_qoriq.c +2 -2
@@ -57,7 +57,7 @@ enum ahci_qoriq_type {
 	AHCI_LS2080A,
 	AHCI_LS1046A,
 	AHCI_LS1088A,
-	AHCI_LS2088A,
+	AHCI_LX2160A,
 };
 
 struct ahci_qoriq_priv {
@@ -73,7 +73,7 @@ struct ahci_qoriq_priv {
 	{ .compatible = "fsl,ls2080a-ahci", .data = (void *)AHCI_LS2080A},
 	{ .compatible = "fsl,ls1046a-ahci", .data = (void *)AHCI_LS1046A},
 	{ .compatible = "fsl,ls1088a-ahci", .data = (void *)AHCI_LS1088A},
-	{ .compatible = "fsl,ls2088a-ahci", .data = (void *)AHCI_LS2088A},
+	{ .compatible = "fsl,lx2160a-ahci", .data = (void *)AHCI_LX2160A},
 	{},
 };
Quoted 1 line

MODULE_DEVICE_TABLE(of, ahci_qoriq_of_match); @@ -174,12 +174,10

@@

Quoted 11 lines

static int ahci_qoriq_phy_init(struct ahci_host_priv *hpriv)

		writel(LS1021A_PORT_PHY4, reg_base + PORT_PHY4);
		writel(LS1021A_PORT_PHY5, reg_base + PORT_PHY5);
		writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS);
drivers/ata/ahci_qoriq.c +0 -3
-		if (qpriv->is_dmacoherent)
-			writel(AHCI_PORT_AXICC_CFG,
-					reg_base + LS1021A_AXICC_ADDR);
		break;

	case AHCI_LS1043A:
drivers/ata/ahci_qoriq.c +1 -0
+	case AHCI_LS1046A:
Quoted 3 lines
		if (!qpriv->ecc_addr)
			return -EINVAL;
		writel(readl(qpriv->ecc_addr) | ECC_DIS_ARMV8_CH2, @@ -

188,8

drivers/ata/ahci_qoriq.c

Quoted 7 lines

+186,6 @@ static int ahci_qoriq_phy_init(struct ahci_host_priv +*hpriv)

		writel(AHCI_PORT_PHY2_CFG, reg_base + PORT_PHY2);
		writel(AHCI_PORT_PHY3_CFG, reg_base + PORT_PHY3);
		writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS);
drivers/ata/ahci_qoriq.c +0 -2
-		if (qpriv->is_dmacoherent)
-			writel(AHCI_PORT_AXICC_CFG, reg_base +

PORT_AXICC);

drivers/ata/ahci_qoriq.c

Quoted 11 lines
		break;

	case AHCI_LS2080A:
drivers/ata/ahci_qoriq.c +0 -0
@@ -197,24 +193,10 @@ static int ahci_qoriq_phy_init(struct

ahci_host_priv
*hpriv)

		writel(AHCI_PORT_PHY2_CFG, reg_base + PORT_PHY2);
		writel(AHCI_PORT_PHY3_CFG, reg_base + PORT_PHY3);
		writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS);
drivers/ata/ahci_qoriq.c +0 -2
-		if (qpriv->is_dmacoherent)
-			writel(AHCI_PORT_AXICC_CFG, reg_base +

PORT_AXICC);

drivers/ata/ahci_qoriq.c static int ahci_qoriq_phy_init(struct ahci_host_priv *hpriv)

Quoted 13 lines
drivers/ata/ahci_qoriq.c +0 -13
-		break;
-
-	case AHCI_LS1046A:
-		if (!qpriv->ecc_addr)
-			return -EINVAL;
-		writel(readl(qpriv->ecc_addr) | ECC_DIS_ARMV8_CH2,
-				qpriv->ecc_addr);
-		writel(AHCI_PORT_PHY_1_CFG, reg_base + PORT_PHY1);
-		writel(AHCI_PORT_PHY2_CFG, reg_base + PORT_PHY2);
-		writel(AHCI_PORT_PHY3_CFG, reg_base + PORT_PHY3);
-		writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS);
-		if (qpriv->is_dmacoherent)
-			writel(AHCI_PORT_AXICC_CFG, reg_base +

PORT_AXICC);

Quoted 7 lines
		break;

	case AHCI_LS1088A:
drivers/ata/ahci_qoriq.c +1 -0
+	case AHCI_LX2160A:
		if (!qpriv->ecc_addr)
			return -EINVAL;
		writel(readl(qpriv->ecc_addr) | ECC_DIS_LS1088A, @@ -

223,18

drivers/ata/ahci_qoriq.c

Quoted 7 lines

+205,16 @@ static int ahci_qoriq_phy_init(struct ahci_host_priv +*hpriv)

		writel(AHCI_PORT_PHY2_CFG, reg_base + PORT_PHY2);
		writel(AHCI_PORT_PHY3_CFG, reg_base + PORT_PHY3);
		writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS);
drivers/ata/ahci_qoriq.c +0 -2
-		if (qpriv->is_dmacoherent)
-			writel(AHCI_PORT_AXICC_CFG, reg_base +

PORT_AXICC);

drivers/ata/ahci_qoriq.c static int ahci_qoriq_phy_init(struct ahci_host_priv *hpriv)

Quoted 10 lines
		break;
drivers/ata/ahci_qoriq.c +1 -7
+	}
 
-	case AHCI_LS2088A:
-		writel(AHCI_PORT_PHY_1_CFG, reg_base + PORT_PHY1);
-		writel(AHCI_PORT_PHY2_CFG, reg_base + PORT_PHY2);
-		writel(AHCI_PORT_PHY3_CFG, reg_base + PORT_PHY3);
-		writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS);
-		if (qpriv->is_dmacoherent)
-			writel(AHCI_PORT_AXICC_CFG, reg_base +

PORT_AXICC);

Quoted 10 lines
drivers/ata/ahci_qoriq.c +7 -1
-		break;
+	if (qpriv->is_dmacoherent) {
+		if (qpriv->type == AHCI_LS1021A)
+			writel(AHCI_PORT_AXICC_CFG,
+			       reg_base + LS1021A_AXICC_ADDR);
+		else
+			writel(AHCI_PORT_AXICC_CFG,
+			       reg_base + PORT_AXICC);
	}
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
	return 0;

--
1.7.1

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#2 lore raw

Re: [PATCH 2/2] arm64: dts: lx2160a: add sata node support

In reply to Peng Ma
Quoted 37 lines · Peng Ma

Add sata node support and Enable sata support

---
 arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts |   16 +++++++
 arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi    |   44 +++++++++++++++++++++
 2 files changed, 60 insertions(+), 0 deletions(-)
arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts +16 -0
index 6481e5f..aacca27 100644
@@ -117,3 +117,19 @@
 &usb1 {
 	status = "okay";
 };
+
+&sata0 {
+	status = "okay";
+};
+
+&sata1 {
+	status = "okay";
+};
+
+&sata2 {
+	status = "okay";
+};
+
+&sata3 {
+	status = "okay";
+};
arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi +0 -0
index a79f5c1..e857a14 100644

arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi line 767

Quoted 6 lines
arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi +3 -0
@@ -762,5 +762,49 @@
 				     <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>;
 			dma-coherent;
 		};
+
+		sata0: sata@3200000 {
+			status = "disabled";

We usually have 'status' at the end of property list.

Shawn

Quoted 46 lines
arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi +41 -0
+			compatible = "fsl,lx2160a-ahci";
+			reg = <0x0 0x3200000 0x0 0x10000>,
+			      <0x7 0x100520 0x0 0x4>;
+			reg-names = "ahci", "sata-ecc";
+			interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clockgen 4 3>;
+			dma-coherent;
+		};
+
+		sata1: sata@3210000 {
+			status = "disabled";
+			compatible = "fsl,lx2160a-ahci";
+			reg = <0x0 0x3210000 0x0 0x10000>,
+			      <0x7 0x100520 0x0 0x4>;
+			reg-names = "ahci", "sata-ecc";
+			interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clockgen 4 3>;
+			dma-coherent;
+		};
+
+		sata2: sata@3220000 {
+			status = "disabled";
+			compatible = "fsl,lx2160a-ahci";
+			reg = <0x0 0x3220000 0x0 0x10000>,
+			      <0x7 0x100520 0x0 0x4>;
+			reg-names = "ahci", "sata-ecc";
+			interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clockgen 4 3>;
+			dma-coherent;
+		};
+
+		sata3: sata@3230000 {
+			status = "disabled";
+			compatible = "fsl,lx2160a-ahci";
+			reg = <0x0 0x3230000 0x0 0x10000>,
+			      <0x7 0x100520 0x0 0x4>;
+			reg-names = "ahci", "sata-ecc";
+			interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clockgen 4 3>;
+			dma-coherent;
+		};
 	};
 };
Signature · 1 line
1.7.1
author
#3 lore raw

RE: [PATCH 2/2] arm64: dts: lx2160a: add sata node support

Quoted 62 lines

-----Original Message-----
From: Shawn Guo <[email protected]>
Sent: 2019年1月13日 12:06
To: Peng Ma <[email protected]>
Cc: [email protected]; Leo Li <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 2/2] arm64: dts: lx2160a: add sata node support

Quoted 6 lines · Peng Ma

Add sata node support and Enable sata support

---
 arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts |   16 +++++++
 arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi    |   44

+++++++++++++++++++++

Review

Quoted 3 lines
 2 files changed, 60 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts

Review

Quoted 24 lines

index 6481e5f..aacca27 100644

arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts +16 -0
@@ -117,3 +117,19 @@
 &usb1 {
 	status = "okay";
 };
+
+&sata0 {
+	status = "okay";
+};
+
+&sata1 {
+	status = "okay";
+};
+
+&sata2 {
+	status = "okay";
+};
+
+&sata3 {
+	status = "okay";
+};
(quoted diff) +0 -0

b/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi

arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi line 767

Quoted 10 lines

index a79f5c1..e857a14 100644

arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi +3 -0
@@ -762,5 +762,49 @@
 				     <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>;
 			dma-coherent;
 		};
+
+		sata0: sata@3200000 {
+			status = "disabled";

We usually have 'status' at the end of property list.

Quoted 1 line

Shawn

[Peng Ma]
Ok, got it, thanks yure quick reply.
Regards,
Peng

Quoted 47 lines
Quoted 47 lines
arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi +41 -1
+			compatible = "fsl,lx2160a-ahci";
+			reg = <0x0 0x3200000 0x0 0x10000>,
+			      <0x7 0x100520 0x0 0x4>;
+			reg-names = "ahci", "sata-ecc";
+			interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clockgen 4 3>;
+			dma-coherent;
+		};
+
+		sata1: sata@3210000 {
+			status = "disabled";
+			compatible = "fsl,lx2160a-ahci";
+			reg = <0x0 0x3210000 0x0 0x10000>,
+			      <0x7 0x100520 0x0 0x4>;
+			reg-names = "ahci", "sata-ecc";
+			interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clockgen 4 3>;
+			dma-coherent;
+		};
+
+		sata2: sata@3220000 {
+			status = "disabled";
+			compatible = "fsl,lx2160a-ahci";
+			reg = <0x0 0x3220000 0x0 0x10000>,
+			      <0x7 0x100520 0x0 0x4>;
+			reg-names = "ahci", "sata-ecc";
+			interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clockgen 4 3>;
+			dma-coherent;
+		};
+
+		sata3: sata@3230000 {
+			status = "disabled";
+			compatible = "fsl,lx2160a-ahci";
+			reg = <0x0 0x3230000 0x0 0x10000>,
+			      <0x7 0x100520 0x0 0x4>;
+			reg-names = "ahci", "sata-ecc";
+			interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clockgen 4 3>;
+			dma-coherent;
+		};
 	};
 };
--

1.7.1