PCIE平台驱动
msm_pcie_probe
-1->msm_pcie_get_resources
-1-2->devm_regulator_get // regulator gdsc-vdd gdsc-smmu vreg-3.3
-1-2->of_get_named_gpio // gpio
-1-2->devm_clk_get // clk
-1-2->devm_clk_get // pipeclk
-1-2->devm_reset_control_get // reset
-1-2->devm_reset_control_get // pipe_reset
-1-2->devm_ioremap // 映射寄存器
-1-2->IORESOURCE_IRQ // IRQ
-1->devm_pinctrl_get //
-1->msm_pcie_gpio_init
-1->msm_pcie_irq_init //handle_linkdown_irq //handle_aer_irq //handle_global_irq //handle_wake_irq
PCIE总线枚举:
-1->msm_pcie_enumerate
-1-2->msm_pcie_enable
-1-2-3->MSM_PCIE_GPIO_PERST /* assert PCIe reset link to keep EP in reset */
-1-2-3->msm_pcie_vreg_init /* enable power */ //主机端上电
-1-2-3->msm_pcie_clk_init /* enable clocks */ //主机开启时钟
-1-2-3->PCIE20_PARF_DEVICE_TYPE /* configure PCIe to RC mode */
-1-2-3->pcie_phy_init
-1-2-3->msm_pcie_pipe_clk_init
-1-2-3->MSM_PCIE_GPIO_PERST /* de-assert PCIe reset link to bring EP out of reset */
-1-2-3->PCIE20_PARF_LTSSM /* enable link training */
-1-2->devm_pci_alloc_host_bridge //分配桥设备
-1-2->pci_scan_root_bus_bridge
cnss_probe:
-1->cnss_get_resources
-1-2->cnss_get_vreg // regulator
-1-2->cnss_get_pinctrl // gpio
-1->cnss_power_on_device
-1-2->cnss_vreg_on // 上电
-1-2->cnss_select_pinctrl_state // gpio工作状态
-1->cnss_bus_init/cnss_pci_init
-1-2->msm_pcie_enumerate
cnss_pci_probe:
-1->cnss_register_subsys
-1->cnss_pci_enable_bus
-1-2->pci_read_config_word
-1-2->pci_assign_resource
-1-2->pci_enable_device
-1-2->pci_request_region
-1-2->pci_set_dma_mask
-1-2->pci_set_consistent_dma_mask
-1-2->pci_set_master
-1-2->pci_iomap //BAR
-1->cnss_reg_pci_event/msm_pcie_register_event //cnss_pci_event_cb
-1->cnss_pci_enable_msi / pci_alloc_irq_vectors
-1->irq_get_msi_desc
-1->cnss_pci_register_mhi
-1-2->mhi_alloc_controller
-1-2->of_register_mhi_controller //
cnss_register_subsys
cnss_pci_remove:
-1->cnss_pci_unregister_mhi
cnss_bus_dev_powerup / cnss_pci_dev_powerup / cnss_qca6290_powerup
-1->cnss_power_on_device
-1->cnss_resume_pci_link
-1->cnss_pci_start_mhi
-1-2->cnss_pci_set_mhi_state(pci_priv, CNSS_MHI_INIT);
-1-2->cnss_pci_set_mhi_state(pci_priv, CNSS_MHI_POWER_ON);
-1->cnss_set_pin_connect_status
pci_set_power_state
pci_set_master
pci_register_driver
pci_read_config_word
pci_scan_root_bus_bridge
pci_store_saved_state
pci_load_and_free_saved_state
msm_pcie_wr_conf
msm_pcie_rd_conf