dm: ahci: Fix dwc_ahci
Subsystems (2)
cover dm: ahci: Fix dwc_ahci
This series applies to u-boot-dm/master. It fixes 2 issues preventing usage of SATA on DRA7/AM57 platforms
The first patch is a simply fix to the Kconfig that allows building the driver again.
The second patch fixes an issue introduced by commit 7278fc4f7256628b ("dm: ahci: Drop use of probe_ent"). The root cause is that the uclass private data is not allocated.
Jean-Jacques Hiblot (2):
pipe3: Fix broken dependency
ahci: dm: Fix memory allocation for uclass private data
drivers/ata/ahci.c | 8 +++++++- drivers/phy/Kconfig | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/2 pipe3: Fix broken dependency
ARCH_OMAP2 has been renamed ARCH_OMAP2PLUS in commit a93fbf4a7892 ("ARM: omap2+: rename config to ARCH_OMAP2PLUS and consolidate Kconfig")
--- drivers/phy/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/phy/Kconfig +2 -2
@@ -43,7 +43,7 @@ config PHY_SANDBOX config PIPE3_PHY bool "Support omap's PIPE3 PHY" - depends on PHY && ARCH_OMAP2 + depends on PHY && ARCH_OMAP2PLUS help Support for the omap PIPE3 phy for sata
@@ -52,7 +52,7 @@ config PIPE3_PHY config SPL_PIPE3_PHY bool "Support omap's PIPE3 PHY in SPL" - depends on SPL_PHY && ARCH_OMAP2 + depends on SPL_PHY && ARCH_OMAP2PLUS help Support for the omap PIPE3 phy for sata in SPL
Signature · 1 line
1.9.1
PATCH 1/2 pipe3: Fix broken dependency
Quoted 4 lines · Jean-Jacques Hiblot
ARCH_OMAP2has been renamedARCH_OMAP2PLUSin commita93fbf4a7892("ARM: omap2+: rename config toARCH_OMAP2PLUSand consolidateKconfig")Signed-off-by Jean-Jacques Hiblot <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170707/29045d41/attachment.sig>
PATCH 1/2 pipe3: Fix broken dependency
In reply to Jean-Jacques HiblotQuoted 5 lines · Jean-Jacques Hiblot
ARCH_OMAP2has been renamedARCH_OMAP2PLUSin commita93fbf4a7892("ARM: omap2+: rename config toARCH_OMAP2PLUSand consolidateKconfig")Signed-off-by Jean-Jacques Hiblot <[email protected]>Reviewed-by Tom Rini <[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: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170711/2c6193e0/attachment.sig>
PATCH 2/2 ahci: dm: Fix memory allocation for uclass private data
In reply to Jean-Jacques HiblotAllocate manually the uclass private data in ahci_init_dm(). Don't do this in the declaration of the scsi uclass driver with .per_device_auto_alloc_size because it is AHCI specific.
--- drivers/ata/ahci.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/ata/ahci.c +7 -1
@@ -1090,7 +1090,13 @@ int ahci_init(void __iomem *base)int ahci_init_dm (struct udevice *dev,void __iomem *base) { -struct ahci_uc_priv *uc_priv =dev_get_uclass_priv (dev); +struct ahci_uc_priv *uc_priv; + + uc_priv =calloc (1 ,sizeof (struct ahci_uc_priv )); +if (!uc_priv) +return -ENOMEM ; + + dev->uclass_priv = uc_priv;return ahci_init_common (uc_priv, base); }
Signature · 1 line
1.9.1