#include <linux/kernel.h>
#include <linux/bitops.h>
#include <linux/err.h>
#include <linux/platform_device.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/clk-provider.h>
#include <linux/regmap.h>
#include <linux/reset-controller.h>
#include <dt-bindings/clock/qcom,gcc-sdm845.h>
#include "common.h"
#include "clk-regmap.h"
#include "clk-pll.h"
#include "clk-rcg.h"
#include "clk-branch.h"
#include "clk-alpha-pll.h"
#include "gdsc.h"
#include "reset.h"
enum { … };
static struct clk_alpha_pll gpll0 = …;
static struct clk_alpha_pll gpll4 = …;
static struct clk_alpha_pll gpll6 = …;
static const struct clk_div_table post_div_table_fabia_even[] = …;
static struct clk_alpha_pll_postdiv gpll0_out_even = …;
static const struct parent_map gcc_parent_map_0[] = …;
static const struct clk_parent_data gcc_parent_data_0[] = …;
static const struct parent_map gcc_parent_map_1[] = …;
static const struct clk_parent_data gcc_parent_data_1[] = …;
static const struct parent_map gcc_parent_map_2[] = …;
static const struct clk_parent_data gcc_parent_data_2[] = …;
static const struct parent_map gcc_parent_map_3[] = …;
static const struct clk_parent_data gcc_parent_data_3[] = …;
static const struct parent_map gcc_parent_map_4[] = …;
static const struct clk_parent_data gcc_parent_data_4[] = …;
static const struct parent_map gcc_parent_map_6[] = …;
static const struct clk_parent_data gcc_parent_data_6[] = …;
static const struct clk_parent_data gcc_parent_data_7_ao[] = …;
static const struct clk_parent_data gcc_parent_data_8[] = …;
static const struct clk_parent_data gcc_parent_data_8_ao[] = …;
static const struct parent_map gcc_parent_map_10[] = …;
static const struct clk_parent_data gcc_parent_data_10[] = …;
static const struct parent_map gcc_parent_map_11[] = …;
static const struct clk_parent_data gcc_parent_data_11[] = …;
static const struct freq_tbl ftbl_gcc_cpuss_ahb_clk_src[] = …;
static struct clk_rcg2 gcc_cpuss_ahb_clk_src = …;
static const struct freq_tbl ftbl_gcc_cpuss_rbcpr_clk_src[] = …;
static struct clk_rcg2 gcc_cpuss_rbcpr_clk_src = …;
static const struct freq_tbl ftbl_gcc_sdm670_cpuss_rbcpr_clk_src[] = …;
static struct clk_rcg2 gcc_sdm670_cpuss_rbcpr_clk_src = …;
static const struct freq_tbl ftbl_gcc_gp1_clk_src[] = …;
static struct clk_rcg2 gcc_gp1_clk_src = …;
static struct clk_rcg2 gcc_gp2_clk_src = …;
static struct clk_rcg2 gcc_gp3_clk_src = …;
static const struct freq_tbl ftbl_gcc_pcie_0_aux_clk_src[] = …;
static struct clk_rcg2 gcc_pcie_0_aux_clk_src = …;
static struct clk_rcg2 gcc_pcie_1_aux_clk_src = …;
static const struct freq_tbl ftbl_gcc_pcie_phy_refgen_clk_src[] = …;
static struct clk_rcg2 gcc_pcie_phy_refgen_clk_src = …;
static const struct freq_tbl ftbl_gcc_qspi_core_clk_src[] = …;
static struct clk_rcg2 gcc_qspi_core_clk_src = …;
static const struct freq_tbl ftbl_gcc_pdm2_clk_src[] = …;
static struct clk_rcg2 gcc_pdm2_clk_src = …;
static const struct freq_tbl ftbl_gcc_qupv3_wrap0_s0_clk_src[] = …;
static struct clk_init_data gcc_qupv3_wrap0_s0_clk_src_init = …;
static struct clk_rcg2 gcc_qupv3_wrap0_s0_clk_src = …;
static struct clk_init_data gcc_qupv3_wrap0_s1_clk_src_init = …;
static struct clk_rcg2 gcc_qupv3_wrap0_s1_clk_src = …;
static struct clk_init_data gcc_qupv3_wrap0_s2_clk_src_init = …;
static struct clk_rcg2 gcc_qupv3_wrap0_s2_clk_src = …;
static struct clk_init_data gcc_qupv3_wrap0_s3_clk_src_init = …;
static struct clk_rcg2 gcc_qupv3_wrap0_s3_clk_src = …;
static struct clk_init_data gcc_qupv3_wrap0_s4_clk_src_init = …;
static struct clk_rcg2 gcc_qupv3_wrap0_s4_clk_src = …;
static struct clk_init_data gcc_qupv3_wrap0_s5_clk_src_init = …;
static struct clk_rcg2 gcc_qupv3_wrap0_s5_clk_src = …;
static struct clk_init_data gcc_qupv3_wrap0_s6_clk_src_init = …;
static struct clk_rcg2 gcc_qupv3_wrap0_s6_clk_src = …;
static struct clk_init_data gcc_qupv3_wrap0_s7_clk_src_init = …;
static struct clk_rcg2 gcc_qupv3_wrap0_s7_clk_src = …;
static struct clk_init_data gcc_qupv3_wrap1_s0_clk_src_init = …;
static struct clk_rcg2 gcc_qupv3_wrap1_s0_clk_src = …;
static struct clk_init_data gcc_qupv3_wrap1_s1_clk_src_init = …;
static struct clk_rcg2 gcc_qupv3_wrap1_s1_clk_src = …;
static struct clk_init_data gcc_qupv3_wrap1_s2_clk_src_init = …;
static struct clk_rcg2 gcc_qupv3_wrap1_s2_clk_src = …;
static struct clk_init_data gcc_qupv3_wrap1_s3_clk_src_init = …;
static struct clk_rcg2 gcc_qupv3_wrap1_s3_clk_src = …;
static struct clk_init_data gcc_qupv3_wrap1_s4_clk_src_init = …;
static struct clk_rcg2 gcc_qupv3_wrap1_s4_clk_src = …;
static struct clk_init_data gcc_qupv3_wrap1_s5_clk_src_init = …;
static struct clk_rcg2 gcc_qupv3_wrap1_s5_clk_src = …;
static struct clk_init_data gcc_qupv3_wrap1_s6_clk_src_init = …;
static struct clk_rcg2 gcc_qupv3_wrap1_s6_clk_src = …;
static struct clk_init_data gcc_qupv3_wrap1_s7_clk_src_init = …;
static struct clk_rcg2 gcc_qupv3_wrap1_s7_clk_src = …;
static const struct freq_tbl ftbl_gcc_sdcc1_apps_clk_src[] = …;
static struct clk_rcg2 gcc_sdcc1_apps_clk_src = …;
static const struct freq_tbl ftbl_gcc_sdcc1_ice_core_clk_src[] = …;
static struct clk_rcg2 gcc_sdcc1_ice_core_clk_src = …;
static const struct freq_tbl ftbl_gcc_sdcc2_apps_clk_src[] = …;
static struct clk_rcg2 gcc_sdcc2_apps_clk_src = …;
static const struct freq_tbl ftbl_gcc_sdcc4_apps_clk_src[] = …;
static struct clk_rcg2 gcc_sdcc4_apps_clk_src = …;
static const struct freq_tbl ftbl_gcc_sdm670_sdcc4_apps_clk_src[] = …;
static struct clk_rcg2 gcc_sdm670_sdcc4_apps_clk_src = …;
static const struct freq_tbl ftbl_gcc_tsif_ref_clk_src[] = …;
static struct clk_rcg2 gcc_tsif_ref_clk_src = …;
static const struct freq_tbl ftbl_gcc_ufs_card_axi_clk_src[] = …;
static struct clk_rcg2 gcc_ufs_card_axi_clk_src = …;
static const struct freq_tbl ftbl_gcc_ufs_card_ice_core_clk_src[] = …;
static struct clk_rcg2 gcc_ufs_card_ice_core_clk_src = …;
static struct clk_rcg2 gcc_ufs_card_phy_aux_clk_src = …;
static const struct freq_tbl ftbl_gcc_ufs_card_unipro_core_clk_src[] = …;
static struct clk_rcg2 gcc_ufs_card_unipro_core_clk_src = …;
static const struct freq_tbl ftbl_gcc_ufs_phy_axi_clk_src[] = …;
static struct clk_rcg2 gcc_ufs_phy_axi_clk_src = …;
static struct clk_rcg2 gcc_ufs_phy_ice_core_clk_src = …;
static struct clk_rcg2 gcc_ufs_phy_phy_aux_clk_src = …;
static struct clk_rcg2 gcc_ufs_phy_unipro_core_clk_src = …;
static const struct freq_tbl ftbl_gcc_usb30_prim_master_clk_src[] = …;
static struct clk_rcg2 gcc_usb30_prim_master_clk_src = …;
static const struct freq_tbl ftbl_gcc_usb30_prim_mock_utmi_clk_src[] = …;
static struct clk_rcg2 gcc_usb30_prim_mock_utmi_clk_src = …;
static struct clk_rcg2 gcc_usb30_sec_master_clk_src = …;
static struct clk_rcg2 gcc_usb30_sec_mock_utmi_clk_src = …;
static struct clk_rcg2 gcc_usb3_prim_phy_aux_clk_src = …;
static struct clk_rcg2 gcc_usb3_sec_phy_aux_clk_src = …;
static struct clk_rcg2 gcc_vs_ctrl_clk_src = …;
static const struct freq_tbl ftbl_gcc_vsensor_clk_src[] = …;
static struct clk_rcg2 gcc_vsensor_clk_src = …;
static struct clk_branch gcc_aggre_noc_pcie_tbu_clk = …;
static struct clk_branch gcc_aggre_ufs_card_axi_clk = …;
static struct clk_branch gcc_aggre_ufs_phy_axi_clk = …;
static struct clk_branch gcc_aggre_usb3_prim_axi_clk = …;
static struct clk_branch gcc_aggre_usb3_sec_axi_clk = …;
static struct clk_branch gcc_apc_vs_clk = …;
static struct clk_branch gcc_boot_rom_ahb_clk = …;
static struct clk_branch gcc_camera_ahb_clk = …;
static struct clk_branch gcc_camera_axi_clk = …;
static struct clk_branch gcc_camera_xo_clk = …;
static struct clk_branch gcc_ce1_ahb_clk = …;
static struct clk_branch gcc_ce1_axi_clk = …;
static struct clk_branch gcc_ce1_clk = …;
static struct clk_branch gcc_cfg_noc_usb3_prim_axi_clk = …;
static struct clk_branch gcc_cfg_noc_usb3_sec_axi_clk = …;
static struct clk_branch gcc_cpuss_ahb_clk = …;
static struct clk_branch gcc_cpuss_rbcpr_clk = …;
static struct clk_branch gcc_sdm670_cpuss_rbcpr_clk = …;
static struct clk_branch gcc_ddrss_gpu_axi_clk = …;
static struct clk_branch gcc_disp_ahb_clk = …;
static struct clk_branch gcc_disp_axi_clk = …;
static struct clk_branch gcc_disp_gpll0_clk_src = …;
static struct clk_branch gcc_disp_gpll0_div_clk_src = …;
static struct clk_branch gcc_disp_xo_clk = …;
static struct clk_branch gcc_gp1_clk = …;
static struct clk_branch gcc_gp2_clk = …;
static struct clk_branch gcc_gp3_clk = …;
static struct clk_branch gcc_gpu_cfg_ahb_clk = …;
static struct clk_branch gcc_gpu_gpll0_clk_src = …;
static struct clk_branch gcc_gpu_gpll0_div_clk_src = …;
static struct clk_branch gcc_gpu_iref_clk = …;
static struct clk_branch gcc_gpu_memnoc_gfx_clk = …;
static struct clk_branch gcc_gpu_snoc_dvm_gfx_clk = …;
static struct clk_branch gcc_gpu_vs_clk = …;
static struct clk_branch gcc_mss_axis2_clk = …;
static struct clk_branch gcc_mss_cfg_ahb_clk = …;
static struct clk_branch gcc_mss_gpll0_div_clk_src = …;
static struct clk_branch gcc_mss_mfab_axis_clk = …;
static struct clk_branch gcc_mss_q6_memnoc_axi_clk = …;
static struct clk_branch gcc_mss_snoc_axi_clk = …;
static struct clk_branch gcc_mss_vs_clk = …;
static struct clk_branch gcc_pcie_0_aux_clk = …;
static struct clk_branch gcc_pcie_0_cfg_ahb_clk = …;
static struct clk_branch gcc_pcie_0_clkref_clk = …;
static struct clk_branch gcc_pcie_0_mstr_axi_clk = …;
static struct clk_branch gcc_pcie_0_pipe_clk = …;
static struct clk_branch gcc_pcie_0_slv_axi_clk = …;
static struct clk_branch gcc_pcie_0_slv_q2a_axi_clk = …;
static struct clk_branch gcc_pcie_1_aux_clk = …;
static struct clk_branch gcc_pcie_1_cfg_ahb_clk = …;
static struct clk_branch gcc_pcie_1_clkref_clk = …;
static struct clk_branch gcc_pcie_1_mstr_axi_clk = …;
static struct clk_branch gcc_pcie_1_pipe_clk = …;
static struct clk_branch gcc_pcie_1_slv_axi_clk = …;
static struct clk_branch gcc_pcie_1_slv_q2a_axi_clk = …;
static struct clk_branch gcc_pcie_phy_aux_clk = …;
static struct clk_branch gcc_pcie_phy_refgen_clk = …;
static struct clk_branch gcc_pdm2_clk = …;
static struct clk_branch gcc_pdm_ahb_clk = …;
static struct clk_branch gcc_pdm_xo4_clk = …;
static struct clk_branch gcc_prng_ahb_clk = …;
static struct clk_branch gcc_qmip_camera_ahb_clk = …;
static struct clk_branch gcc_qmip_disp_ahb_clk = …;
static struct clk_branch gcc_qmip_video_ahb_clk = …;
static struct clk_branch gcc_qspi_cnoc_periph_ahb_clk = …;
static struct clk_branch gcc_qspi_core_clk = …;
static struct clk_branch gcc_qupv3_wrap0_s0_clk = …;
static struct clk_branch gcc_qupv3_wrap0_s1_clk = …;
static struct clk_branch gcc_qupv3_wrap0_s2_clk = …;
static struct clk_branch gcc_qupv3_wrap0_s3_clk = …;
static struct clk_branch gcc_qupv3_wrap0_s4_clk = …;
static struct clk_branch gcc_qupv3_wrap0_s5_clk = …;
static struct clk_branch gcc_qupv3_wrap0_s6_clk = …;
static struct clk_branch gcc_qupv3_wrap0_s7_clk = …;
static struct clk_branch gcc_qupv3_wrap1_s0_clk = …;
static struct clk_branch gcc_qupv3_wrap1_s1_clk = …;
static struct clk_branch gcc_qupv3_wrap1_s2_clk = …;
static struct clk_branch gcc_qupv3_wrap1_s3_clk = …;
static struct clk_branch gcc_qupv3_wrap1_s4_clk = …;
static struct clk_branch gcc_qupv3_wrap1_s5_clk = …;
static struct clk_branch gcc_qupv3_wrap1_s6_clk = …;
static struct clk_branch gcc_qupv3_wrap1_s7_clk = …;
static struct clk_branch gcc_qupv3_wrap_0_m_ahb_clk = …;
static struct clk_branch gcc_qupv3_wrap_0_s_ahb_clk = …;
static struct clk_branch gcc_qupv3_wrap_1_m_ahb_clk = …;
static struct clk_branch gcc_qupv3_wrap_1_s_ahb_clk = …;
static struct clk_branch gcc_sdcc1_ahb_clk = …;
static struct clk_branch gcc_sdcc1_apps_clk = …;
static struct clk_branch gcc_sdcc1_ice_core_clk = …;
static struct clk_branch gcc_sdcc2_ahb_clk = …;
static struct clk_branch gcc_sdcc2_apps_clk = …;
static struct clk_branch gcc_sdcc4_ahb_clk = …;
static struct clk_branch gcc_sdcc4_apps_clk = …;
static struct clk_branch gcc_sdm670_sdcc4_apps_clk = …;
static struct clk_branch gcc_sys_noc_cpuss_ahb_clk = …;
static struct clk_branch gcc_tsif_ahb_clk = …;
static struct clk_branch gcc_tsif_inactivity_timers_clk = …;
static struct clk_branch gcc_tsif_ref_clk = …;
static struct clk_branch gcc_ufs_card_ahb_clk = …;
static struct clk_branch gcc_ufs_card_axi_clk = …;
static struct clk_branch gcc_ufs_card_clkref_clk = …;
static struct clk_branch gcc_ufs_card_ice_core_clk = …;
static struct clk_branch gcc_ufs_card_phy_aux_clk = …;
static struct clk_branch gcc_ufs_card_rx_symbol_0_clk = …;
static struct clk_branch gcc_ufs_card_rx_symbol_1_clk = …;
static struct clk_branch gcc_ufs_card_tx_symbol_0_clk = …;
static struct clk_branch gcc_ufs_card_unipro_core_clk = …;
static struct clk_branch gcc_ufs_mem_clkref_clk = …;
static struct clk_branch gcc_ufs_phy_ahb_clk = …;
static struct clk_branch gcc_ufs_phy_axi_clk = …;
static struct clk_branch gcc_ufs_phy_ice_core_clk = …;
static struct clk_branch gcc_ufs_phy_phy_aux_clk = …;
static struct clk_branch gcc_ufs_phy_rx_symbol_0_clk = …;
static struct clk_branch gcc_ufs_phy_rx_symbol_1_clk = …;
static struct clk_branch gcc_ufs_phy_tx_symbol_0_clk = …;
static struct clk_branch gcc_ufs_phy_unipro_core_clk = …;
static struct clk_branch gcc_usb30_prim_master_clk = …;
static struct clk_branch gcc_usb30_prim_mock_utmi_clk = …;
static struct clk_branch gcc_usb30_prim_sleep_clk = …;
static struct clk_branch gcc_usb30_sec_master_clk = …;
static struct clk_branch gcc_usb30_sec_mock_utmi_clk = …;
static struct clk_branch gcc_usb30_sec_sleep_clk = …;
static struct clk_branch gcc_usb3_prim_clkref_clk = …;
static struct clk_branch gcc_usb3_prim_phy_aux_clk = …;
static struct clk_branch gcc_usb3_prim_phy_com_aux_clk = …;
static struct clk_branch gcc_usb3_prim_phy_pipe_clk = …;
static struct clk_branch gcc_usb3_sec_clkref_clk = …;
static struct clk_branch gcc_usb3_sec_phy_aux_clk = …;
static struct clk_branch gcc_usb3_sec_phy_com_aux_clk = …;
static struct clk_branch gcc_usb3_sec_phy_pipe_clk = …;
static struct clk_branch gcc_usb_phy_cfg_ahb2phy_clk = …;
static struct clk_branch gcc_vdda_vs_clk = …;
static struct clk_branch gcc_vddcx_vs_clk = …;
static struct clk_branch gcc_vddmx_vs_clk = …;
static struct clk_branch gcc_video_ahb_clk = …;
static struct clk_branch gcc_video_axi_clk = …;
static struct clk_branch gcc_video_xo_clk = …;
static struct clk_branch gcc_vs_ctrl_ahb_clk = …;
static struct clk_branch gcc_vs_ctrl_clk = …;
static struct clk_branch gcc_cpuss_dvm_bus_clk = …;
static struct clk_branch gcc_cpuss_gnoc_clk = …;
#ifdef CONFIG_SDM_LPASSCC_845
static struct clk_branch gcc_lpass_q6_axi_clk = …;
static struct clk_branch gcc_lpass_sway_clk = …;
#endif
static struct gdsc pcie_0_gdsc = …;
static struct gdsc pcie_1_gdsc = …;
static struct gdsc ufs_card_gdsc = …;
static struct gdsc ufs_phy_gdsc = …;
static struct gdsc usb30_prim_gdsc = …;
static struct gdsc usb30_sec_gdsc = …;
static struct gdsc hlos1_vote_aggre_noc_mmu_audio_tbu_gdsc = …;
static struct gdsc hlos1_vote_aggre_noc_mmu_pcie_tbu_gdsc = …;
static struct gdsc hlos1_vote_aggre_noc_mmu_tbu1_gdsc = …;
static struct gdsc hlos1_vote_aggre_noc_mmu_tbu2_gdsc = …;
static struct gdsc hlos1_vote_mmnoc_mmu_tbu_hf0_gdsc = …;
static struct gdsc hlos1_vote_mmnoc_mmu_tbu_hf1_gdsc = …;
static struct gdsc hlos1_vote_mmnoc_mmu_tbu_sf_gdsc = …;
static struct clk_regmap *gcc_sdm670_clocks[] = …;
static struct clk_regmap *gcc_sdm845_clocks[] = …;
static const struct qcom_reset_map gcc_sdm845_resets[] = …;
static struct gdsc *gcc_sdm670_gdscs[] = …;
static struct gdsc *gcc_sdm845_gdscs[] = …;
static const struct regmap_config gcc_sdm845_regmap_config = …;
static const struct qcom_cc_desc gcc_sdm670_desc = …;
static const struct qcom_cc_desc gcc_sdm845_desc = …;
static const struct of_device_id gcc_sdm845_match_table[] = …;
MODULE_DEVICE_TABLE(of, gcc_sdm845_match_table);
static const struct clk_rcg_dfs_data gcc_dfs_clocks[] = …;
static int gcc_sdm845_probe(struct platform_device *pdev)
{ … }
static struct platform_driver gcc_sdm845_driver = …;
static int __init gcc_sdm845_init(void)
{ … }
core_initcall(gcc_sdm845_init);
static void __exit gcc_sdm845_exit(void)
{ … }
module_exit(gcc_sdm845_exit);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;
MODULE_SOFTDEP(…) …;