Fix DM_SCSI on DRA7 platforms
cover Fix DM_SCSI on DRA7 platforms
Enhancements to SCSI support for driver model have broken the support for DM_SCSI on DRA7 platforms. This series fixes it.
Tested on:
- dra76 evm
Jean-Jacques Hiblot (2):
dwc_ahci: Fix breakage
configs: dra7xx_evm/dra7xx_hs_evm: Enable AHCI and PIPE3
configs/dra7xx_evm_defconfig | 2 ++ configs/dra7xx_hs_evm_defconfig | 2 ++ drivers/ata/dwc_ahci.c | 23 ++++++++++------------- 3 files changed, 14 insertions(+), 13 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/2 dwc_ahci: Fix breakage
The dwc_ahci has been broken for quite some time now. The breakage has been introduced by the series "dm: scsi: Enhance SCSI support for driver model"
Use ahci_bind_scsi() and ahci_probe_scsi() to properly bind and probe the driver.
---
drivers/ata/dwc_ahci.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-)
drivers/ata/dwc_ahci.c +10 -13
@@ -25,17 +25,18 @@ struct dwc_ahci_priv {void *wrapper_base; }; +static int dwc_ahci_bind (struct udevice *dev) +{ +struct udevice *scsi_dev; + +return ahci_bind_scsi (dev, &scsi_dev); +} +static int dwc_ahci_ofdata_to_platdata (struct udevice *dev) {struct dwc_ahci_priv *priv =dev_get_priv (dev); -struct scsi_platdata *plat =dev_get_uclass_platdata (dev);fdt_addr_t addr; - plat->max_id =fdtdec_get_uint (gd->fdt_blob,dev_of_offset (dev), -"max-id" ,CONFIG_SYS_SCSI_MAX_SCSI_ID ); - plat->max_lun =fdtdec_get_uint (gd->fdt_blob,dev_of_offset (dev), -"max-lun" ,CONFIG_SYS_SCSI_MAX_LUN ); - priv->base =map_physmem (devfdt_get_addr (dev),sizeof (void *),MAP_NOCACHE );
@@ -81,11 +82,7 @@ static int dwc_ahci_probe(struct udevice *dev)writel (val, priv->wrapper_base +TI_SATA_SYSCONFIG ); } - ret =ahci_init_dm (dev, priv->base); -if (ret) -return ret; - -return ahci_start_ports_dm (dev); +return ahci_probe_scsi (dev, (ulong )priv->base); }static const struct udevice_id dwc_ahci_ids[] = {
@@ -95,11 +92,11 @@ static const struct udevice_id dwc_ahci_ids[] = {U_BOOT_DRIVER (dwc_ahci) = { .name ="dwc_ahci" , - .id =UCLASS_SCSI , + .id =UCLASS_AHCI , .of_match = dwc_ahci_ids, + .bind = dwc_ahci_bind, .ofdata_to_platdata = dwc_ahci_ofdata_to_platdata, .ops = &scsi_ops, .probe = dwc_ahci_probe, .priv_auto_alloc_size =sizeof (struct dwc_ahci_priv ), - .flags =DM_FLAG_ALLOC_PRIV_DMA , };
Signature · 1 line
2.7.4
PATCH 1/2 dwc_ahci: Fix breakage
Quoted 7 lines · Jean-Jacques Hiblot
The
dwc_ahcihas been broken for quite some time now. The breakage has been introduced by the series "dm: scsi: Enhance SCSI support for driver model"Use
ahci_bind_scsi()andahci_probe_scsi()to properly bind and probe the driver.Signed-off-by Jean-Jacques Hiblot <[email protected]>
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: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180413/840ec78e/attachment.sig>
PATCH 2/2 configs: dra7xx_evm/dra7xx_hs_evm: Enable AHCI and PIPE3
In reply to Jean-Jacques HiblotThose options are required to enable support for SATA on DRA7 platforms.
---
configs/dra7xx_evm_defconfig | 2 ++ configs/dra7xx_hs_evm_defconfig | 2 ++ 2 files changed, 4 insertions(+)
configs/dra7xx_evm_defconfig +2 -0
@@ -9,6 +9,7 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI_SUPPORT=y CONFIG_ARMV7_LPAE=y CONFIG_DEFAULT_DEVICE_TREE="dra7-evm" +CONFIG_AHCI=y CONFIG_DISTRO_DEFAULTS=y CONFIG_SPL_LOAD_FIT=y CONFIG_OF_BOARD_SETUP=y
@@ -64,6 +65,7 @@ CONFIG_PHYLIB=y CONFIG_DM_ETH=y CONFIG_PHY_GIGE=y CONFIG_SPL_PHY=y +CONFIG_PIPE3_PHY=y CONFIG_PMIC_PALMAS=y CONFIG_PMIC_LP873X=y CONFIG_DM_REGULATOR_FIXED=y
configs/dra7xx_hs_evm_defconfig +2 -0
@@ -13,6 +13,7 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI_SUPPORT=y CONFIG_ARMV7_LPAE=y CONFIG_DEFAULT_DEVICE_TREE="dra7-evm" +CONFIG_AHCI=y CONFIG_DISTRO_DEFAULTS=y CONFIG_FIT_IMAGE_POST_PROCESS=y CONFIG_SPL_LOAD_FIT=y
@@ -63,6 +64,7 @@ CONFIG_PHYLIB=y CONFIG_DM_ETH=y CONFIG_PHY_GIGE=y CONFIG_SPL_PHY=y +CONFIG_PIPE3_PHY=y CONFIG_PMIC_PALMAS=y CONFIG_PMIC_LP873X=y CONFIG_DM_REGULATOR_FIXED=y
Signature · 1 line
2.7.4
PATCH 2/2 configs: dra7xx_evm/dra7xx_hs_evm: Enable AHCI and PIPE3
Quoted 3 lines · Jean-Jacques Hiblot
Those options are required to enable support for SATA on DRA7 platforms.
Signed-off-by Jean-Jacques Hiblot <[email protected]>
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: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180413/79ebaa8b/attachment.sig>
cover Fix DM_SCSI on DRA7 platforms
In reply to Jean-Jacques HiblotHi,
Quoted 7 lines · Jean-Jacques Hiblot
Enhancements to SCSI support for driver model have broken the support for
DM_SCSIon DRA7 platforms. This series fixes it.Tested on:
- dra76 evm
Quoted 9 lines
Jean-Jacques Hiblot (2):
dwc_ahci: Fix breakage
configs: dra7xx_evm/dra7xx_hs_evm: Enable AHCI and PIPE3configs/dra7xx_evm_defconfig | 2 ++ configs/dra7xx_hs_evm_defconfig | 2 ++ drivers/ata/dwc_ahci.c | 23 ++++++++++------------- 3 files changed, 14 insertions(+), 13 deletions(-)
I have seen similar issue with 2018.01 release but I have just tested it with sata_ceva.c on latest on zcu102 and I can't see any issue.
Here was my quick hack.
https://github.com/Xilinx/u-boot-xlnx/commit/df365a0d76352c4b675444c660cc4eb53b36d51e
Anyway I have used your patch as source of changes for ceva sata and I have tested it on the top of latest and also on xilinx v2018.1(+ revert of my hack) and it is working properly.
Anyway I think that will be good if you can retest driver on the HEAD and see if there is still an issue. If there is no issue the patch which fixes this should be identified.
Thanks,
Michal
cover Fix DM_SCSI on DRA7 platforms
Quoted 22 lines · Michal Simek
Hi,
Quoted 7 lines · Jean-Jacques Hiblot
Enhancements to SCSI support for driver model have broken the support for
DM_SCSIon DRA7 platforms. This series fixes it.Tested on:
- dra76 evmQuoted 9 lines
Jean-Jacques Hiblot (2):
dwc_ahci: Fix breakage
configs: dra7xx_evm/dra7xx_hs_evm: Enable AHCI and PIPE3configs/dra7xx_evm_defconfig | 2 ++ configs/dra7xx_hs_evm_defconfig | 2 ++ drivers/ata/dwc_ahci.c | 23 ++++++++++------------- 3 files changed, 14 insertions(+), 13 deletions(-)I have seen similar issue with 2018.01 release but I have just tested it with
sata_ceva.con latest on zcu102 and I can't see any issue.
Quoted 8 lines
Here was my quick hack.
https://github.com/Xilinx/u-boot-xlnx/commit/df365a0d76352c4b675444c660cc4eb53b36d51eAnyway I have used your patch as source of changes for ceva sata and I have tested it on the top of latest and also on xilinx v2018.1(+ revert of my hack) and it is working properly.
Anyway I think that will be good if you can retest driver on the HEAD
I'm not sure I understand what you mean by HEAD.
I had tested the disk with commit e294ba0678359bc32085c1714329af37e33e8f16 (4th april, so pretty recent), it didn't work.
Honestly I haven't tried to understand the reason why it broke, I just modified the driver to match was is done in the straightforward PCI driver.
JJ
Quoted 6 lines
and see if there is still an issue. If there is no issue the patch which fixes this should be identified.
Thanks,
Michal
cover Fix DM_SCSI on DRA7 platforms
Quoted 34 lines · Jean-Jacques Hiblot
Quoted 31 lines · Michal Simek
Hi,
Quoted 8 lines · Jean-Jacques Hiblot
Enhancements to SCSI support for driver model have broken the support for
DM_SCSIon DRA7 platforms. This series fixes it.Tested on:
- dra76 evmQuoted 9 lines
Jean-Jacques Hiblot (2):
dwc_ahci: Fix breakage
configs: dra7xx_evm/dra7xx_hs_evm: Enable AHCI and PIPE3configs/dra7xx_evm_defconfig | 2 ++ configs/dra7xx_hs_evm_defconfig | 2 ++ drivers/ata/dwc_ahci.c | 23 ++++++++++-------------
3 files changed, 14 insertions(+), 13 deletions(-)I have seen similar issue with 2018.01 release but I have just tested it with
sata_ceva.con latest on zcu102 and I can't see any issue.Here was my quick hack.
https://github.com/Xilinx/u-boot-xlnx/commit/df365a0d76352c4b675444c660cc4eb53b36d51eAnyway I have used your patch as source of changes for ceva sata and I have tested it on the top of latest and also on xilinx v2018.1(+ revert of my hack) and it is working properly.
Quoted 5 lines
Quoted 1 line
Anyway I think that will be good if you can retest driver on the HEAD
I'm not sure I understand what you mean by HEAD.
I had tested the disk with commite294ba0678359bc32085c1714329af37e33e8f16(4th april, so pretty recent), it didn't work.
HEAD - latest u-boot commit in master branch.
Quoted 2 lines
Honestly I haven't tried to understand the reason why it broke, I just modified the driver to match was is done in the straightforward PCI driver.
Ok. I get it.
Thanks,
Michal