Subject: Re: espressobin device tree with kernel 5.1 RC

From: Miquel Raynal <[email-masked]>
Date: Tue, 18 Jun 2019 16:24:28 +0200

Hi Timothy,

> > You should add traces where theses prints come from and find what is
> > missing.
> >   
> > > Is what I get with a kernel configured with your .config.
> > >
> > > I suspect there is some magic in
> > >
> > > CONFIG_INITRAMFS_SOURCE="/home/mraynal/buildroot/output-  
> > arm/images/rootfs.cpio"  
> > >
> > > Which I do not have that may be making a difference? (that is the only  
> > difference in what I compiled and you sent to me).
> > 
> > Not at all, this is just my rootfs as an initramfs, not related to the content of
> > the kernel at all.
> > 
> > 
> > Good luck!
> > Miquèl  
> 
> I put in this (simplistic and ugly) tracing:
> static int ahci_mvebu_probe(struct platform_device *pdev)
> {
>         const struct ahci_mvebu_plat_data *pdata;
>         struct ahci_host_priv *hpriv;
>         int rc;
> 
> printk(KERN_INFO "in mvebu probe\n");
>         pdata = of_device_get_match_data(&pdev->dev);
> printk(KERN_INFO "check device match\n");
>         if (!pdata)
>                 return -EINVAL;
> printk(KERN_INFO "device did match\n");
> 
>         hpriv = ahci_platform_get_resources(pdev, 0);
> printk(KERN_INFO "check resources\n");
>         if (IS_ERR(hpriv))
>                 return PTR_ERR(hpriv);
> 
> printk(KERN_INFO "resources ok\n");
>         hpriv->flags |= pdata->flags;
>         hpriv->plat_data = (void *)pdata;
> 
>         rc = ahci_platform_enable_resources(hpriv);
> printk(KERN_INFO "enable resources\n");
>         if (rc)
>                 return rc;
> 
> printk(KERN_INFO "past enable resources\n");
>         hpriv->stop_engine = ahci_mvebu_stop_engine;
> 
>         rc = pdata->plat_config(hpriv);
> printk(KERN_INFO "disenable resources\n");
>         if (rc)
>                 goto disable_resources;
> printk(KERN_INFO "past disable resources\n");
> 
> printk(KERN_INFO "init host\n");
>         rc = ahci_platform_init_host(pdev, hpriv, &ahci_mvebu_port_info,
>                                      &ahci_platform_sht);
> printk(KERN_INFO "past init host\n");
>         if (rc)
>                 goto disable_resources;
> printk(KERN_INFO "past rc check\n");
> 
>         return 0;
> 
> disable_resources:
> printk(KERN_INFO "in disable resources\n");
>         ahci_platform_disable_resources(hpriv);
>         return rc;
> }
> 
> 
> With the 5.2-rc5 device tree I get :
> 
> [snip]
> [    4.204366] cacheinfo: Unable to detect cache hierarchy for CPU 0
> [    4.210876] in mvebu probe
> [    4.213608] check device match
> [    4.216710] device did match
> [    4.219762] check resources
> [    4.222555] resources ok
> [    4.225174] phy phy-d0018300.phy.2: phy poweron failed --> -1
> [    4.231069] enable resources
> [    4.234054] ahci-mvebu: probe of d00e0000.sata failed with error -1
> [    4.240800] Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
> [    4.248736] MACsec IEEE 802.1AE
> [    4.252344] libphy: Fixed MDIO Bus: probed
> [snip]
> 
> With exactly the same kernel but the 5.0 device tree I get :
> 
> [snip]
> [    4.203692] cacheinfo: Unable to detect cache hierarchy for CPU 0
> [    4.210192] in mvebu probe
> [    4.212924] check device match
> [    4.216026] device did match
> [    4.219058] check resources
> [    4.221858] resources ok
> [    4.224458] enable resources
> [    4.227405] past enable resources
> [    4.230817] disenable resources
> [    4.234042] past disable resources
> [    4.237536] init host
> [    4.239931] ahci-mvebu d00e0000.sata: AHCI 0001.0300 32 slots 1 ports 6 Gbps 0x1 impl platform mode
> [    4.249196] ahci-mvebu d00e0000.sata: flags: ncq sntf led only pmp fbs pio slum part sxs
> [    4.258647] scsi host0: ahci-mvebu
> [    4.262491] ata1: SATA max UDMA/133 mmio [mem 0xd00e0000-0xd00e1fff] port 0x100 irq 21
> [    4.270609] past init host
> [    4.273353] past rc check
> [    4.276455] Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
> [    4.284408] MACsec IEEE 802.1AE
> [    4.287965] libphy: Fixed MDIO Bus: probed
> [snip]
> 
> Unfortunately that does not tell me much.  Does it say anything to you?
> I mean I guess        rc = ahci_platform_enable_resources(hpriv); Is failing, should I put some traces in that?

Yes, in particular around the PHY initialization, until you found where
it fails exactly.

Thanks,
Miquèl

_______________________________________________
linux-arm-kernel mailing list
[email-masked]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel