Problems with PCIe devices on LS1021A

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problems with PCIe devices on LS1021A

1,800 Views
hwei
Contributor III

Hi,

I get some problem while trying to enable a Marvell PCIe to SATA card.

It can be recognized in system,

# lspci

0000:00:00.0 PCI bridge: Freescale Semiconductor Inc Device 0e0c (rev 10)

0001:00:00.0 PCI bridge: Freescale Semiconductor Inc Device 0e0c (rev 10)

0001:01:00.0 SATA controller: Marvell Technology Group Ltd. 88SE9235 PCIe 2.0 x2 4-port SATA 6 Gb/s Controller (rev 11)

but I get some error to enable it.

ahci 0001:01:00.0: BAR 0: can't reserve [io  0x4810000020-0x4810000027]

ahci: probe of 0001:01:00.0 failed with error -16

This error code means resource busy, right? But there is only one PCIe device.

I have tried an Intel PCIe NIC and it can work normally.

Can anyone give me some ideas?

Thanks

Labels (1)
Tags (4)
0 Kudos
5 Replies

907 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello H Wei,

It seems that this is Kernel or  ahci SATA device driver problem.

Please check your dts file, whether the above IO memory is allocated in the reasonable range.

Would  you please provide your Kernel log(especially pci probe and resource allocation sections) and the log of "lspci -v".


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

907 Views
hwei
Contributor III

Hi Yiping,

From my kernel log, that IO memory is allocated to pci 0001:00:00.0: BAR 0.

pci 0001:01:00.0: BAR 0: assigned [io  0x4810000020-0x4810000027]

May it be some ahci driver problem?

We get a temporary SATA2 driver patch from Freescale to make our sata drive work.

By the way, I have to configure vmalloc in bootargs to get the pci driver loaded.

Thanks

0 Kudos

907 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello H Wei,

According to your Kernel log, IO memory resource has already been allocated successfully for BAR0 by layerscape-pcie driver. When ahci probes, it reports the resource is busy and cannot be reserved. We have tested other brand PCIe STAT could work with SDK 1.3 images.  Please verify whether your Marvell PCIe SATA could work on other host, for example x86 platform. And check the ahci driver where causes this error.


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

907 Views
hwei
Contributor III

Hi Yiping,

I have tried this Marvell PCIe SATA device on an imx6 board and it can be recognized.

The ahci driver fails to request the specific pci regions so I try to disable this pci resource check and it can temporarily work.

It fails in pci.c while getting the io region assigned to this PCI device.

Can it be a pci related problem?

Thanks

0 Kudos

907 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello H Wei,

The should be compatible problem, in the coming SDK 1.7 release, the PCIe driver framework is also redesigned, please update to the latest driver, and verify whether this problem is resolved.

Thanks,

Yiping