igorpadykov
Thanks for your reply.
And I had try to set Power Management disabled and compile it.
But I got an error here.
host C++: libicuuc-host_32 <= external/icu/icu4c/source/common/ustrenum.cpp
drivers/pci/host/pci-imx6.c:1413:10: error: 'pci_imx_pm_ops' undeclared here (not in a function)
.pm = &pci_imx_pm_ops,
^
make[4]: *** [drivers/pci/host/pci-imx6.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [drivers/pci/host] Error 2
make[3]: *** Waiting for unfinished jobs....
After I traced the code I found that "pci_imx_pm_ops" is defined at pci-imx6.c
#ifdef CONFIG_PM_SLEEP
.
.
.
static const struct dev_pm_ops pci_imx_pm_ops = {
.suspend_noirq = pci_imx_suspend_noirq,
.resume_noirq = pci_imx_resume_noirq,
.freeze_noirq = pci_imx_suspend_noirq,
.thaw_noirq = pci_imx_resume_noirq,
.poweroff_noirq = pci_imx_suspend_noirq,
.restore_noirq = pci_imx_resume_noirq,
};
#endif
.
.
.
static struct platform_driver imx6_pcie_driver = {
.driver = {
.name = "imx6q-pcie",
.of_match_table = imx6_pcie_of_match,
.pm = &pci_imx_pm_ops,
},
.shutdown = imx6_pcie_shutdown,
};
As you can see pci_imx_pm_ops is defined in CONFIG_PM_SLEEP but since I disabled CONFIG_PM the CONFIG_PM_SLEEP will also be disabled.
That means code will not defined pci_imx_pm_ops.
But imx6_pcie_driver still defined ".pm = &pci_imx_pm_ops" at the end of the code even pci_imx_pm_ops do not be defined at all.
This is what I can not understand.
If pci_imx_pm_ops is defined in CONFIG_PM_SLEEP why did imx6_pcie_driver's ".pm = &pci_imx_pm_ops" do not defined in CONFIG_PM_SLEEP.
What if I mark out ".pm = &pci_imx_pm_ops", would kernel system appear with error that I didn't know?
Thanks in Advanced!