Skip to contentSkip to conversation

cmd_scsi: Enable SoC AHCI device on platforms with PCI

PATCH In review Tang Yuantian 3 participants 5 messages Mar 20, 2015 – Apr 23, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cmd_scsi: Enable SoC AHCI device on platforms with PCI

Current driver assumes the AHCI is connected to PCI, this is not true on some SoCs, e.g. LS1021A, which has PCI but the AHCI is in SoC. This patch will enable embedded AHCI devices on platforms with PCI.
PCI AHCI devices still can be used by commenting CONFIG_SCSI_AHCI_PLAT option in head file.

---
 common/cmd_scsi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
common/cmd_scsi.c +2 -2
index a0a62eb..f80f549 100644
@@ -37,7 +37,7 @@
 #define SCSI_DEV_LIST {SCSI_VEND_ID, SCSI_DEV_ID}
 #endif
 
-#ifdef CONFIG_PCI
+#if defined(CONFIG_PCI) && !defined(CONFIG_SCSI_AHCI_PLAT)
 const struct pci_device_id scsi_device_list[] = { SCSI_DEV_LIST };
 #endif
 static ccb tempccb;	/* temporary scsi command buffer */
@@ -179,7 +179,7 @@ int scsi_get_disk_count(void)
 	return scsi_max_devs;
 }
 
-#ifdef CONFIG_PCI
+#if defined(CONFIG_PCI) && !defined(CONFIG_SCSI_AHCI_PLAT)
 void scsi_init(void)
 {
 	int busdevfunc;
Signature · 1 line
2.1.0.27.g96db324
#1 lore raw

PATCH 1/1 cmd_scsi: Enable SoC AHCI device on platforms with PCI

Quoted 27 lines · Tang Yuantian

Current driver assumes the AHCI is connected to PCI, this is not true on some SoCs, e.g. LS1021A, which has PCI but the AHCI is in SoC. This patch will enable embedded AHCI devices on platforms with PCI.
PCI AHCI devices still can be used by commenting CONFIG_SCSI_AHCI_PLAT option in head file.

---
 common/cmd_scsi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
common/cmd_scsi.c +1 -1
index a0a62eb..f80f549 100644
@@ -37,7 +37,7 @@
 #define SCSI_DEV_LIST {SCSI_VEND_ID, SCSI_DEV_ID}
 #endif
 
-#ifdef CONFIG_PCI
+#if defined(CONFIG_PCI) && !defined(CONFIG_SCSI_AHCI_PLAT)
 const struct pci_device_id scsi_device_list[] = { SCSI_DEV_LIST };
 #endif
 static ccb tempccb;    /* temporary scsi command buffer */

common/cmd_scsi.c int scsi_get_disk_count(void)

Quoted 9 lines
common/cmd_scsi.c +1 -2
@@ -179,7 +179,7 @@ int scsi_get_disk_count(void)
        return scsi_max_devs;
 }
 
-#ifdef CONFIG_PCI
+#if defined(CONFIG_PCI) && !defined(CONFIG_SCSI_AHCI_PLAT)
 void scsi_init(void)
 {
        int busdevfunc;
--
#2 lore raw

PATCH 1/1 cmd_scsi: Enable SoC AHCI device on platforms with PCI

PING.

Thanks,
Yuantian

Quoted 47 lines

-----Original Message-----
From: Bin Meng [mailto:bmeng.cn at gmail.com]
Sent: Friday, March 20, 2015 11:44 AM
To: Tang Yuantian-B29983
Cc: Tom Rini; Simon Glass; U-Boot Mailing List; Sun York-R58495; Xie Shaohui-B21989
Subject: Re: [PATCH] cmd_scsi: Enable SoC AHCI device on platforms with PCI

Quoted 25 lines · Tang Yuantian

Current driver assumes the AHCI is connected to PCI, this is not true on some SoCs, e.g. LS1021A, which has PCI but the AHCI is in SoC. This patch will enable embedded AHCI devices on platforms with PCI. PCI AHCI devices still can be used by commenting CONFIG_SCSI_AHCI_PLAT option in head file.

---
 common/cmd_scsi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
common/cmd_scsi.c index renamed from common/cmd_scsi.c +0 -0

a0a62eb..f80f549 100644

common/cmd_scsi.c +1 -1
@@ -37,7 +37,7 @@
 #define SCSI_DEV_LIST {SCSI_VEND_ID, SCSI_DEV_ID}  #endif
 
-#ifdef CONFIG_PCI
+#if defined(CONFIG_PCI) && !defined(CONFIG_SCSI_AHCI_PLAT)
 const struct pci_device_id scsi_device_list[] = { SCSI_DEV_LIST };
 #endif
 static ccb tempccb;    /* temporary scsi command buffer */

common/cmd_scsi.c int scsi_get_disk_count(void)

Quoted 9 lines
common/cmd_scsi.c +1 -2
@@ -179,7 +179,7 @@ int scsi_get_disk_count(void)
        return scsi_max_devs;
 }
 
-#ifdef CONFIG_PCI
+#if defined(CONFIG_PCI) && !defined(CONFIG_SCSI_AHCI_PLAT)
 void scsi_init(void)
 {
        int busdevfunc;
--
#3 lore raw

PATCH 1/1 cmd_scsi: Enable SoC AHCI device on platforms with PCI

In reply to Tang Yuantian
Quoted 9 lines · Tang Yuantian

Current driver assumes the AHCI is connected to PCI, this is not true on some SoCs, e.g. LS1021A, which has PCI but the AHCI is in SoC. This patch will enable embedded AHCI devices on platforms with PCI.
PCI AHCI devices still can be used by commenting CONFIG_SCSI_AHCI_PLAT option in head file.

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/20150320/c99ec9c8/attachment.sig>
#4 lore raw
In reply to Tang Yuantian
Quoted 11 lines · tang yuantian

Current driver assumes the AHCI is connected to PCI, this is not true on some SoCs, e.g. LS1021A, which has PCI but the AHCI is in SoC. This patch will enable embedded AHCI devices on platforms with PCI.
PCI AHCI devices still can be used by commenting CONFIG_SCSI_AHCI_PLAT option in head file.

Applied to u-boot/master, thanks!

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/20150423/9e990b71/attachment.sig>