[U-Boot] [PATCH 0/2] 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(-)

ARCH_OMAP2 has been renamed ARCH_OMAP2PLUS in commit a93fbf4a7892 ("ARM: omap2+: rename config to ARCH_OMAP2PLUS and consolidate Kconfig")
Signed-off-by: Jean-Jacques Hiblot jjhiblot@ti.com --- drivers/phy/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig index a91a694..7841554 100644 --- a/drivers/phy/Kconfig +++ b/drivers/phy/Kconfig @@ -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

On Fri, Jul 07, 2017 at 12:13:34PM +0200, Jean-Jacques Hiblot wrote:
ARCH_OMAP2 has been renamed ARCH_OMAP2PLUS in commit a93fbf4a7892 ("ARM: omap2+: rename config to ARCH_OMAP2PLUS and consolidate Kconfig")
Signed-off-by: Jean-Jacques Hiblot jjhiblot@ti.com
Reviewed-by: Tom Rini trini@konsulko.com

On Fri, Jul 07, 2017 at 12:13:34PM +0200, Jean-Jacques Hiblot wrote:
ARCH_OMAP2 has been renamed ARCH_OMAP2PLUS in commit a93fbf4a7892 ("ARM: omap2+: rename config to ARCH_OMAP2PLUS and consolidate Kconfig")
Signed-off-by: Jean-Jacques Hiblot jjhiblot@ti.com Reviewed-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!

Allocate 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.
Signed-off-by: Jean-Jacques Hiblot jjhiblot@ti.com --- drivers/ata/ahci.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 6da412d..1d88472 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -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); }
participants (2)
-
Jean-Jacques Hiblot
-
Tom Rini