Skip to contentSkip to conversation

driver model bring-up of sata device on dra72 and dra74 evm

PATCH Superseded Mugunthan V N 4 participants 15 messages Jan 18, 2016 – Jan 20, 2016

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover driver model bring-up of sata device on dra72 and dra74 evm

This patch series enables sata driver to adopt driver model. This has been tested on the following evms (logs [1]) by loading kernel and dtb from sata hard-disk.
* dra72 evm
* dra74 evm

Also pushed a branch for testing [2]

[1] - http://pastebin.ubuntu.com/14565924/
[2] - git://git.ti.com/~mugunthanvnm/ti-u-boot/mugunth-ti-u-boot.git dm-sata

Mugunthan V N (6):
arm: omap: sata: move enable sata clocks to enable_basic_clocks()
dm: implement a SATA uclass
arm: omap-common: sata: prepare driver for DM conversion
drivers: block: dwc_ahci: Implement a driver for Synopsys DWC sata
device
defconfig: dra74_evm: enable sata driver model
defconfig: dra72_evm: enable sata driver model

 arch/arm/cpu/armv7/omap-common/sata.c | 38 ++++++-------------
 arch/arm/cpu/armv7/omap5/hw_data.c    | 12 ++++++
 configs/dra72_evm_defconfig           |  2 +
 configs/dra74_evm_defconfig           |  2 +
 drivers/block/Kconfig                 | 17 +++++++++
 drivers/block/Makefile                |  3 ++
 drivers/block/dwc_ahci.c              | 71 +++++++++++++++++++++++++++++++++++
 drivers/block/sata-uclass.c           | 69 ++++++++++++++++++++++++++++++++++
 include/dm/uclass-id.h                |  1 +
 include/sata.h                        |  2 +
 10 files changed, 190 insertions(+), 27 deletions(-)
 create mode 100644 drivers/block/dwc_ahci.c
 create mode 100644 drivers/block/sata-uclass.c
Signature · 1 line
2.7.0.rc3
#1 lore raw

PATCH 1/6 arm: omap: sata: move enable sata clocks to enable_basic_clocks()

All the clocks which has to be enabled has to be done in enable_basic_clocks(), so moving enable sata clock to common clocks enable function.

---
 arch/arm/cpu/armv7/omap-common/sata.c | 23 -----------------------
 arch/arm/cpu/armv7/omap5/hw_data.c    | 12 ++++++++++++
 2 files changed, 12 insertions(+), 23 deletions(-)
arch/arm/cpu/armv7/omap-common/sata.c +0 -23
index 2c2d1bc..0c82689 100644
@@ -37,29 +37,6 @@ int init_sata(int dev)
 	int ret;
 	u32 val;
 
-	u32 const clk_domains_sata[] = {
-		0
-	};
-
-	u32 const clk_modules_hw_auto_sata[] = {
-		(*prcm)->cm_l3init_ocp2scp3_clkctrl,
-		0
-	};
-
-	u32 const clk_modules_explicit_en_sata[] = {
-		(*prcm)->cm_l3init_sata_clkctrl,
-		0
-	};
-
-	do_enable_clocks(clk_domains_sata,
-			 clk_modules_hw_auto_sata,
-			 clk_modules_explicit_en_sata,
-			 0);
-
-	/* Enable optional functional clock for SATA */
-	setbits_le32((*prcm)->cm_l3init_sata_clkctrl,
-		     SATA_CLKCTRL_OPTFCLKEN_MASK);
-
 	sata_phy.power_reg = (void __iomem *)(*ctrl)->control_phy_power_sata;
 
 	/* Power up the PHY */
arch/arm/cpu/armv7/omap5/hw_data.c +12 -0
index 7f8c0a4..2e554bd 100644
@@ -460,6 +460,9 @@ void enable_basic_clocks(void)
 		(*prcm)->cm_l4per_gpio6_clkctrl,
 		(*prcm)->cm_l4per_gpio7_clkctrl,
 		(*prcm)->cm_l4per_gpio8_clkctrl,
+#ifdef CONFIG_SCSI_AHCI_PLAT
+		(*prcm)->cm_l3init_ocp2scp3_clkctrl,
+#endif
 		0
 	};
 
@@ -478,6 +481,9 @@ void enable_basic_clocks(void)
 #ifdef CONFIG_TI_QSPI
 		(*prcm)->cm_l4per_qspi_clkctrl,
 #endif
+#ifdef CONFIG_SCSI_AHCI_PLAT
+		(*prcm)->cm_l3init_sata_clkctrl,
+#endif
 		0
 	};
 
@@ -510,6 +516,12 @@ void enable_basic_clocks(void)
 	setbits_le32((*prcm)->cm_l4per_qspi_clkctrl, (1<<24));
 #endif
 
+#ifdef CONFIG_SCSI_AHCI_PLAT
+	/* Enable optional functional clock for SATA */
+	setbits_le32((*prcm)->cm_l3init_sata_clkctrl,
+		     SATA_CLKCTRL_OPTFCLKEN_MASK);
+#endif
+
 	/* Enable SCRM OPT clocks for PER and CORE dpll */
 	setbits_le32((*prcm)->cm_wkupaon_scrm_clkctrl,
 			OPTFCLKEN_SCRM_PER_MASK);
Signature · 1 line
2.7.0.rc3
#2 lore raw

PATCH 1/6 arm: omap: sata: move enable sata clocks to enable_basic_clocks()

Quoted 5 lines · Mugunthan V N

All the clocks which has to be enabled has to be done in enable_basic_clocks(), so moving enable sata clock to common clocks enable function.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160119/d70dc688/attachment.sig>
#3 lore raw

PATCH 2/6 dm: implement a SATA uclass

In reply to Mugunthan V N

Implement a SATA uclass that can represent a SATA controller.

---
 drivers/block/Kconfig       | 10 +++++++
 drivers/block/Makefile      |  2 ++
 drivers/block/sata-uclass.c | 69 +++++++++++++++++++++++++++++++++++++++++++++
 include/dm/uclass-id.h      |  1 +
 4 files changed, 82 insertions(+)
 create mode 100644 drivers/block/sata-uclass.c
drivers/block/Kconfig +10 -0
index e69de29..44d8a6b 100644
@@ -0,0 +1,10 @@
+menu "SATA Device Support"
+
+config SATA
+	bool "Enable driver model for SATA drivers"
+	depends on DM
+	help
+	  Enable driver model for block devices like SCSI. It uses the
+	  same API as block, but now implemented by the uclass.
+
+endmenu
drivers/block/Makefile +2 -0
index eb8bda9..c2dae17 100644
@@ -5,6 +5,8 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
+obj-$(CONFIG_SATA) += sata-uclass.o
+
 obj-$(CONFIG_SCSI_AHCI) += ahci.o
 obj-$(CONFIG_DWC_AHSATA) += dwc_ahsata.o
 obj-$(CONFIG_FSL_SATA) += fsl_sata.o
drivers/block/sata-uclass.c new file +69 -0

69 lines not on this page · raw message

include/dm/uclass-id.h +1 -0
index 27fa0b6..80977ca 100644
@@ -55,6 +55,7 @@ enum uclass_id {
 	UCLASS_RESET,		/* Reset device */
 	UCLASS_REMOTEPROC,	/* Remote Processor device */
 	UCLASS_RTC,		/* Real time clock device */
+	UCLASS_SATA,		/* SATA devices */
 	UCLASS_SERIAL,		/* Serial UART */
 	UCLASS_SPI,		/* SPI bus */
 	UCLASS_SPI_FLASH,	/* SPI flash */
Signature · 1 line
2.7.0.rc3
#4 lore raw

PATCH 2/6 dm: implement a SATA uclass

+Simon

Quoted 58 lines · Mugunthan V N

Implement a SATA uclass that can represent a SATA controller.

---
 drivers/block/Kconfig       | 10 +++++++
 drivers/block/Makefile      |  2 ++
 drivers/block/sata-uclass.c | 69 +++++++++++++++++++++++++++++++++++++++++++++
 include/dm/uclass-id.h      |  1 +
 4 files changed, 82 insertions(+)
 create mode 100644 drivers/block/sata-uclass.c
drivers/block/Kconfig +10 -0
index e69de29..44d8a6b 100644
@@ -0,0 +1,10 @@
+menu "SATA Device Support"
+
+config SATA
+       bool "Enable driver model for SATA drivers"
+       depends on DM
+       help
+         Enable driver model for block devices like SCSI. It uses the
+         same API as block, but now implemented by the uclass.
+
+endmenu
drivers/block/Makefile +2 -0
index eb8bda9..c2dae17 100644
@@ -5,6 +5,8 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
+obj-$(CONFIG_SATA) += sata-uclass.o
+
 obj-$(CONFIG_SCSI_AHCI) += ahci.o
 obj-$(CONFIG_DWC_AHSATA) += dwc_ahsata.o
 obj-$(CONFIG_FSL_SATA) += fsl_sata.o
drivers/block/sata-uclass.c new file +13 -0
new file mode 100644
index 0000000..62773b6
@@ -0,0 +1,69 @@
+/*
+ * SATA device U-Class driver
+ *
+ * (C) Copyright 2016
+ *     Texas Instruments Incorporated, <www.ti.com>
+ *
+ * Author: Mugunthan V N <[email protected]>
+ *
+ * SPDX-License-Identifier:     GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>

drivers/block/sata-uclass.c line 23

Quoted 10 lines
drivers/block/sata-uclass.c new file +10 -0
+#include <dm/uclass-internal.h>
+#include <dm/device-internal.h>
+#include <errno.h>
+#include <scsi.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/*
+ * struct mmc_uclass_priv - Holds information about a device used by the uclass
+ */

Please use single-line comment when it fits just one line. Also it's not mmc.

Quoted 51 lines
drivers/block/sata-uclass.c new file +46 -0
+struct sata_uclass_priv {
+       struct block_dev_desc_t *block_dev;
+};
+
+int scsi_get_device(int index, struct udevice **devp)
+{
+       struct udevice *dev;
+       int ret;
+
+       ret = uclass_find_device(UCLASS_SATA, index, &dev);
+       if (ret || !dev) {
+               printf("%d device not found\n", index);
+               return ret;
+       }
+
+       ret = device_probe(dev);
+       if (ret) {
+               error("device probe error\n");
+               return ret;
+       }
+
+       *devp = dev;
+
+       return ret;
+}
+
+void scsi_init(void)
+{
+       struct udevice *dev;
+       int ret;
+
+       ret = scsi_get_device(0, &dev);
+       if (ret || !dev) {
+               error("scsi device not found\n");
+               return;
+       }
+
+       scsi_scan(1);
+}
+
+UCLASS_DRIVER(sata) = {
+       .id             = UCLASS_SATA,
+       .name           = "sata",
+       .flags          = DM_UC_FLAG_SEQ_ALIAS,
+       .per_device_auto_alloc_size = sizeof(struct sata_uclass_priv),
+};
include/dm/uclass-id.h +0 -0
index 27fa0b6..80977ca 100644

include/dm/uclass-id.h enum uclass_id {

Quoted 8 lines
include/dm/uclass-id.h +1 -1
@@ -55,6 +55,7 @@ enum uclass_id {
        UCLASS_RESET,           /* Reset device */
        UCLASS_REMOTEPROC,      /* Remote Processor device */
        UCLASS_RTC,             /* Real time clock device */
+       UCLASS_SATA,            /* SATA devices */
        UCLASS_SERIAL,          /* Serial UART */
        UCLASS_SPI,             /* SPI bus */
        UCLASS_SPI_FLASH,       /* SPI flash */
--

I would like to see a full DM conversion of the SCSI codes. But this patch looks to me it's just a place holder?

Regards,
Bin

#5 lore raw

PATCH 2/6 dm: implement a SATA uclass

Quoted 65 lines · Bin Meng

+Simon

Quoted 62 lines · Mugunthan V N

Implement a SATA uclass that can represent a SATA controller.

---
 drivers/block/Kconfig       | 10 +++++++
 drivers/block/Makefile      |  2 ++
 drivers/block/sata-uclass.c | 69 +++++++++++++++++++++++++++++++++++++++++++++
 include/dm/uclass-id.h      |  1 +
 4 files changed, 82 insertions(+)
 create mode 100644 drivers/block/sata-uclass.c
drivers/block/Kconfig +10 -0
index e69de29..44d8a6b 100644
@@ -0,0 +1,10 @@
+menu "SATA Device Support"
+
+config SATA
+       bool "Enable driver model for SATA drivers"
+       depends on DM
+       help
+         Enable driver model for block devices like SCSI. It uses the
+         same API as block, but now implemented by the uclass.
+
+endmenu
drivers/block/Makefile +2 -0
index eb8bda9..c2dae17 100644
@@ -5,6 +5,8 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
+obj-$(CONFIG_SATA) += sata-uclass.o
+
 obj-$(CONFIG_SCSI_AHCI) += ahci.o
 obj-$(CONFIG_DWC_AHSATA) += dwc_ahsata.o
 obj-$(CONFIG_FSL_SATA) += fsl_sata.o
drivers/block/sata-uclass.c new file +17 -0
new file mode 100644
index 0000000..62773b6
@@ -0,0 +1,69 @@
+/*
+ * SATA device U-Class driver
+ *
+ * (C) Copyright 2016
+ *     Texas Instruments Incorporated, <www.ti.com>
+ *
+ * Author: Mugunthan V N <[email protected]>
+ *
+ * SPDX-License-Identifier:     GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <dm/uclass-internal.h>
+#include <dm/device-internal.h>
+#include <errno.h>
+#include <scsi.h>
Quoted 8 lines

drivers/block/sata-uclass.c line 23

Quoted 6 lines
drivers/block/sata-uclass.c new file +6 -0
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/*
+ * struct mmc_uclass_priv - Holds information about a device used by the uclass
+ */

Please use single-line comment when it fits just one line. Also it's not mmc.

Will fix it in next version.

Quoted 55 lines
Quoted 55 lines
drivers/block/sata-uclass.c new file +46 -0
+struct sata_uclass_priv {
+       struct block_dev_desc_t *block_dev;
+};
+
+int scsi_get_device(int index, struct udevice **devp)
+{
+       struct udevice *dev;
+       int ret;
+
+       ret = uclass_find_device(UCLASS_SATA, index, &dev);
+       if (ret || !dev) {
+               printf("%d device not found\n", index);
+               return ret;
+       }
+
+       ret = device_probe(dev);
+       if (ret) {
+               error("device probe error\n");
+               return ret;
+       }
+
+       *devp = dev;
+
+       return ret;
+}
+
+void scsi_init(void)
+{
+       struct udevice *dev;
+       int ret;
+
+       ret = scsi_get_device(0, &dev);
+       if (ret || !dev) {
+               error("scsi device not found\n");
+               return;
+       }
+
+       scsi_scan(1);
+}
+
+UCLASS_DRIVER(sata) = {
+       .id             = UCLASS_SATA,
+       .name           = "sata",
+       .flags          = DM_UC_FLAG_SEQ_ALIAS,
+       .per_device_auto_alloc_size = sizeof(struct sata_uclass_priv),
+};
include/dm/uclass-id.h +0 -0
index 27fa0b6..80977ca 100644
@@ -55,6 +55,7 @@ enum uclass_id {
        UCLASS_RESET,           /* Reset device */
        UCLASS_REMOTEPROC,      /* Remote Processor device */
        UCLASS_RTC,             /* Real time clock device */
Quoted 8 lines

include/dm/uclass-id.h enum uclass_id {

Quoted 5 lines
include/dm/uclass-id.h +1 -1
+       UCLASS_SATA,            /* SATA devices */
        UCLASS_SERIAL,          /* Serial UART */
        UCLASS_SPI,             /* SPI bus */
        UCLASS_SPI_FLASH,       /* SPI flash */
--

I would like to see a full DM conversion of the SCSI codes. But this patch looks to me it's just a place holder?

Ultimately that will be the final goal, now this is just a place holder to move towards DM conversion.

Regards
Mugunthan V N

#6 lore raw

PATCH 2/6 dm: implement a SATA uclass

Hi,

Quoted 142 lines · Mugunthan V N
Quoted 65 lines · Bin Meng

+Simon

Quoted 62 lines · Mugunthan V N

Implement a SATA uclass that can represent a SATA controller.

---
 drivers/block/Kconfig       | 10 +++++++
 drivers/block/Makefile      |  2 ++
 drivers/block/sata-uclass.c | 69 +++++++++++++++++++++++++++++++++++++++++++++
 include/dm/uclass-id.h      |  1 +
 4 files changed, 82 insertions(+)
 create mode 100644 drivers/block/sata-uclass.c
drivers/block/Kconfig +10 -0
index e69de29..44d8a6b 100644
@@ -0,0 +1,10 @@
+menu "SATA Device Support"
+
+config SATA
+       bool "Enable driver model for SATA drivers"
+       depends on DM
+       help
+         Enable driver model for block devices like SCSI. It uses the
+         same API as block, but now implemented by the uclass.
+
+endmenu
drivers/block/Makefile +2 -0
index eb8bda9..c2dae17 100644
@@ -5,6 +5,8 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
+obj-$(CONFIG_SATA) += sata-uclass.o
+
 obj-$(CONFIG_SCSI_AHCI) += ahci.o
 obj-$(CONFIG_DWC_AHSATA) += dwc_ahsata.o
 obj-$(CONFIG_FSL_SATA) += fsl_sata.o
drivers/block/sata-uclass.c new file +17 -0
new file mode 100644
index 0000000..62773b6
@@ -0,0 +1,69 @@
+/*
+ * SATA device U-Class driver
+ *
+ * (C) Copyright 2016
+ *     Texas Instruments Incorporated, <www.ti.com>
+ *
+ * Author: Mugunthan V N <[email protected]>
+ *
+ * SPDX-License-Identifier:     GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <dm/uclass-internal.h>
+#include <dm/device-internal.h>
+#include <errno.h>
+#include <scsi.h>
Quoted 8 lines

drivers/block/sata-uclass.c line 23

Quoted 6 lines
drivers/block/sata-uclass.c new file +6 -0
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/*
+ * struct mmc_uclass_priv - Holds information about a device used by the uclass
+ */

Please use single-line comment when it fits just one line. Also it's not mmc.

Will fix it in next version.

Quoted 55 lines
Quoted 55 lines
drivers/block/sata-uclass.c new file +46 -0
+struct sata_uclass_priv {
+       struct block_dev_desc_t *block_dev;
+};
+
+int scsi_get_device(int index, struct udevice **devp)
+{
+       struct udevice *dev;
+       int ret;
+
+       ret = uclass_find_device(UCLASS_SATA, index, &dev);
+       if (ret || !dev) {
+               printf("%d device not found\n", index);
+               return ret;
+       }
+
+       ret = device_probe(dev);
+       if (ret) {
+               error("device probe error\n");
+               return ret;
+       }
+
+       *devp = dev;
+
+       return ret;
+}
+
+void scsi_init(void)
+{
+       struct udevice *dev;
+       int ret;
+
+       ret = scsi_get_device(0, &dev);
+       if (ret || !dev) {
+               error("scsi device not found\n");
+               return;
+       }
+
+       scsi_scan(1);
+}
+
+UCLASS_DRIVER(sata) = {
+       .id             = UCLASS_SATA,
+       .name           = "sata",
+       .flags          = DM_UC_FLAG_SEQ_ALIAS,
+       .per_device_auto_alloc_size = sizeof(struct sata_uclass_priv),
+};
include/dm/uclass-id.h +0 -0
index 27fa0b6..80977ca 100644
@@ -55,6 +55,7 @@ enum uclass_id {
        UCLASS_RESET,           /* Reset device */
        UCLASS_REMOTEPROC,      /* Remote Processor device */
        UCLASS_RTC,             /* Real time clock device */
Quoted 8 lines

include/dm/uclass-id.h enum uclass_id {

Quoted 5 lines
include/dm/uclass-id.h +1 -1
+       UCLASS_SATA,            /* SATA devices */
        UCLASS_SERIAL,          /* Serial UART */
        UCLASS_SPI,             /* SPI bus */
        UCLASS_SPI_FLASH,       /* SPI flash */
--

I would like to see a full DM conversion of the SCSI codes. But this patch looks to me it's just a place holder?

Quoted 2 lines

Ultimately that will be the final goal, now this is just a place holder to move towards DM conversion.

I have a series which adds a disk uclass. It was using AHCI (=SATA) but Bin pointed out that this might be too specific.

So perhaps you should use that?

http://patchwork.ozlabs.org/patch/569381/

Regards,
Simon

#7 lore raw

PATCH 3/6 arm: omap-common: sata: prepare driver for DM conversion

In reply to Mugunthan V N

Prepare sata driver for DM conversion by abstracting sata phy init to seperate function.

---
 arch/arm/cpu/armv7/omap-common/sata.c | 13 +++++++++----
 include/sata.h                        |  2 ++
 2 files changed, 11 insertions(+), 4 deletions(-)
arch/arm/cpu/armv7/omap-common/sata.c +9 -4
index 0c82689..5ebd799 100644
@@ -32,15 +32,20 @@ struct omap_pipe3 sata_phy = {
 	.dpll_map = dpll_map_sata,
 };
 
+int enable_sata_phy(void)
+{
+	sata_phy.power_reg = (void __iomem *)(*ctrl)->control_phy_power_sata;
+
+	/* Power up the PHY */
+	return phy_pipe3_power_on(&sata_phy);
+}
+
 int init_sata(int dev)
 {
 	int ret;
 	u32 val;
 
-	sata_phy.power_reg = (void __iomem *)(*ctrl)->control_phy_power_sata;
-
-	/* Power up the PHY */
-	phy_pipe3_power_on(&sata_phy);
+	enable_sata_phy();
 
 	/* Enable SATA module, No Idle, No Standby */
 	val = TI_SATA_IDLE_NO | TI_SATA_STANDBY_NO;
include/sata.h +2 -0
index fa61da8..c2b5360 100644
@@ -16,4 +16,6 @@ int sata_port_status(int dev, int port);
 
 extern block_dev_desc_t sata_dev_desc[];
 
+int enable_sata_phy(void);
+
 #endif
Signature · 1 line
2.7.0.rc3
#8 lore raw

PATCH 3/6 arm: omap-common: sata: prepare driver for DM conversion

Quoted 4 lines · Mugunthan V N

Prepare sata driver for DM conversion by abstracting sata phy init to seperate function.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160119/669201a2/attachment.sig>
#9 lore raw

PATCH 4/6 drivers: block: dwc_ahci: Implement a driver for Synopsys DWC sata device

In reply to Mugunthan V N

Implement a sata driver for Synopsys DWC sata device based on U-boot driver model.

---
 arch/arm/cpu/armv7/omap-common/sata.c |  2 +
 drivers/block/Kconfig                 |  7 ++++
 drivers/block/Makefile                |  1 +
 drivers/block/dwc_ahci.c              | 71 +++++++++++++++++++++++++++++++++++
 4 files changed, 81 insertions(+)
 create mode 100644 drivers/block/dwc_ahci.c
arch/arm/cpu/armv7/omap-common/sata.c +2 -0
index 5ebd799..e47e01b 100644
@@ -40,6 +40,7 @@ int enable_sata_phy(void)
 	return phy_pipe3_power_on(&sata_phy);
 }
 
+#ifndef CONFIG_SATA
 int init_sata(int dev)
 {
 	int ret;
@@ -73,3 +74,4 @@ void scsi_bus_reset(void)
 	ahci_reset((void __iomem *)DWC_AHSATA_BASE);
 	ahci_init((void __iomem *)DWC_AHSATA_BASE);
 }
+#endif
drivers/block/Kconfig +7 -0
index 44d8a6b..6b94c3f 100644
@@ -7,4 +7,11 @@ config SATA
 	  Enable driver model for block devices like SCSI. It uses the
 	  same API as block, but now implemented by the uclass.
 
+config DWC_AHCI
+	bool "Enable Synopsys DWC AHCI driver support"
+	depends on SATA
+	help
+	  Enable this driver to support Sata devices through
+	  Synopsys DWC AHCI module.
+
 endmenu
drivers/block/Makefile +1 -0
index c2dae17..189d17f 100644
@@ -6,6 +6,7 @@
 #
 
 obj-$(CONFIG_SATA) += sata-uclass.o
+obj-$(CONFIG_DWC_AHCI) += dwc_ahci.o
 
 obj-$(CONFIG_SCSI_AHCI) += ahci.o
 obj-$(CONFIG_DWC_AHSATA) += dwc_ahsata.o
drivers/block/dwc_ahci.c new file +71 -0

71 lines not on this page · raw message

Signature · 1 line
2.7.0.rc3
#10 lore raw

PATCH 4/6 drivers: block: dwc_ahci: Implement a driver for Synopsys DWC sata device

Quoted 4 lines · Mugunthan V N

Implement a sata driver for Synopsys DWC sata device based on U-boot driver model.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160119/50ea5135/attachment.sig>
#11 lore raw

PATCH 5/6 defconfig: dra74_evm: enable sata driver model

In reply to Mugunthan V N

Enable sata driver model for dra74_evm as dwc_ahci supports driver model

---
 configs/dra74_evm_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/dra74_evm_defconfig +2 -0
index 6e5a705..18bb950 100644
@@ -21,3 +21,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_DM_SPI=y
 CONFIG_DM_SPI_FLASH=y
+CONFIG_SATA=y
+CONFIG_DWC_AHCI=y
Signature · 1 line
2.7.0.rc3
#12 lore raw

PATCH 5/6 defconfig: dra74_evm: enable sata driver model

Quoted 4 lines · Mugunthan V N

Enable sata driver model for dra74_evm as dwc_ahci supports driver model

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160119/43d250aa/attachment.sig>
#13 lore raw

PATCH 6/6 defconfig: dra72_evm: enable sata driver model

In reply to Mugunthan V N

Enable sata driver model for dra72_evm as dwc_ahci supports driver model

---
 configs/dra72_evm_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/dra72_evm_defconfig +2 -0
index b57ecca..b22438e 100644
@@ -22,3 +22,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_DM_SPI=y
 CONFIG_DM_SPI_FLASH=y
+CONFIG_SATA=y
+CONFIG_DWC_AHCI=y
Signature · 1 line
2.7.0.rc3
#14 lore raw

PATCH 6/6 defconfig: dra72_evm: enable sata driver model

Quoted 4 lines · Mugunthan V N

Enable sata driver model for dra72_evm as dwc_ahci supports driver model

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160119/8c768b56/attachment.sig>