IMX8M and PCIe rescan

cancel
Showing results for 
Search instead for 
Did you mean: 

IMX8M and PCIe rescan

304 Views
fredericduchass
Contributor III

Hello,

I try to rescan my Pcie devices after booting but it doesn't work.

The command used for rescan is : "echo 1 > /sys/bus/pci/rescan"

This command is very very fast and gives no output. "Lspci" gives nothing. If i reboot my IMX8M card, i can see my pcie devices.

Have you got an idea about the problem ?

(I use yocto with BSP and kernel 4.14.78)

Best regards

Frederic

0 Kudos
3 Replies

120 Views
b36401
NXP TechSupport
NXP TechSupport

As a workaround you can powercycle PCI with /sys/devices/platform/*.pcie/power/control entry.
Here "*" depends on the board.

0 Kudos

120 Views
fredericduchass
Contributor III
Hello Victor,

I read that : 

The /sys/devices/.../power/control attribute allows the user   space to control the run-time power management of the device.    All devices have one of the following two values for the   power/control file:    + "auto\n" to allow the device to be power managed at run time;   + "on\n" to prevent the device from being power managed;    The default for all devices is "auto", which means that they may   be subject to automatic power management, depending on their   drivers.  Changing this attribute to "on" prevents the driver   from power managing the device at run time.  Doing that while   the device is suspended causes it to be woken up.

How i can reboot the pcie link with control and only "on" or "auto" ?

BR

Frederic

0 Kudos

120 Views
b36401
NXP TechSupport
NXP TechSupport

Please try to rescan with the commands like these:

echo 1 > /sys/bus/pci/devices/0000\:00\:00.0/rescan
echo 1 > /sys/bus/pci/rescan

0 Kudos