Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: qcom: gcc-msm8994: Remove NoC clocks

Just like in commit 05cf3ec00d46 ("clk: qcom: gcc-msm8996: Drop (again)
gcc_aggre1_pnoc_ahb_clk") adding NoC clocks turned out to be a huge
mistake, as they cause a lot of issues at little benefit (basically
letting Linux know about their children's frequencies), especially when
mishandled or misconfigured.

Adding these ones broke SDCC approx 99 out of 100 times, but that somehow
went unnoticed. To prevent further issues like this one, remove them.

This commit is effectively a revert of 74a33fac3aab ("clk: qcom:
gcc-msm8994: Add missing NoC clocks") with ABI preservation.

Fixes: 74a33fac3aab ("clk: qcom: gcc-msm8994: Add missing NoC clocks")
Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Link: https://lore.kernel.org/r/20220217232408.78932-1-konrad.dybcio@somainline.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Konrad Dybcio and committed by
Stephen Boyd
3494894a e783362e

+9 -97
+9 -97
drivers/clk/qcom/gcc-msm8994.c
··· 108 108 { .hw = &gpll4.clkr.hw }, 109 109 }; 110 110 111 - static struct clk_rcg2 system_noc_clk_src = { 112 - .cmd_rcgr = 0x0120, 113 - .hid_width = 5, 114 - .parent_map = gcc_xo_gpll0_map, 115 - .clkr.hw.init = &(struct clk_init_data){ 116 - .name = "system_noc_clk_src", 117 - .parent_data = gcc_xo_gpll0, 118 - .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 119 - .ops = &clk_rcg2_ops, 120 - }, 121 - }; 122 - 123 - static struct clk_rcg2 config_noc_clk_src = { 124 - .cmd_rcgr = 0x0150, 125 - .hid_width = 5, 126 - .parent_map = gcc_xo_gpll0_map, 127 - .clkr.hw.init = &(struct clk_init_data){ 128 - .name = "config_noc_clk_src", 129 - .parent_data = gcc_xo_gpll0, 130 - .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 131 - .ops = &clk_rcg2_ops, 132 - }, 133 - }; 134 - 135 - static struct clk_rcg2 periph_noc_clk_src = { 136 - .cmd_rcgr = 0x0190, 137 - .hid_width = 5, 138 - .parent_map = gcc_xo_gpll0_map, 139 - .clkr.hw.init = &(struct clk_init_data){ 140 - .name = "periph_noc_clk_src", 141 - .parent_data = gcc_xo_gpll0, 142 - .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 143 - .ops = &clk_rcg2_ops, 144 - }, 145 - }; 146 - 147 111 static struct freq_tbl ftbl_ufs_axi_clk_src[] = { 148 112 F(50000000, P_GPLL0, 12, 0, 0), 149 113 F(100000000, P_GPLL0, 6, 0, 0), ··· 1114 1150 .enable_mask = BIT(17), 1115 1151 .hw.init = &(struct clk_init_data){ 1116 1152 .name = "gcc_blsp1_ahb_clk", 1117 - .parent_hws = (const struct clk_hw *[]){ &periph_noc_clk_src.clkr.hw }, 1118 - .num_parents = 1, 1119 1153 .ops = &clk_branch2_ops, 1120 1154 }, 1121 1155 }, ··· 1397 1435 .enable_mask = BIT(15), 1398 1436 .hw.init = &(struct clk_init_data){ 1399 1437 .name = "gcc_blsp2_ahb_clk", 1400 - .parent_hws = (const struct clk_hw *[]){ &periph_noc_clk_src.clkr.hw }, 1401 - .num_parents = 1, 1402 1438 .ops = &clk_branch2_ops, 1403 1439 }, 1404 1440 }, ··· 1724 1764 .enable_mask = BIT(0), 1725 1765 .hw.init = &(struct clk_init_data){ 1726 1766 .name = "gcc_lpass_q6_axi_clk", 1727 - .parent_hws = (const struct clk_hw *[]){ &system_noc_clk_src.clkr.hw }, 1728 - .num_parents = 1, 1729 1767 .ops = &clk_branch2_ops, 1730 1768 }, 1731 1769 }, ··· 1736 1778 .enable_mask = BIT(0), 1737 1779 .hw.init = &(struct clk_init_data){ 1738 1780 .name = "gcc_mss_q6_bimc_axi_clk", 1739 - .parent_hws = (const struct clk_hw *[]){ &system_noc_clk_src.clkr.hw }, 1740 - .num_parents = 1, 1741 1781 .ops = &clk_branch2_ops, 1742 1782 }, 1743 1783 }, ··· 1763 1807 .enable_mask = BIT(0), 1764 1808 .hw.init = &(struct clk_init_data){ 1765 1809 .name = "gcc_pcie_0_cfg_ahb_clk", 1766 - .parent_hws = (const struct clk_hw *[]){ &config_noc_clk_src.clkr.hw }, 1767 - .num_parents = 1, 1768 - .flags = CLK_SET_RATE_PARENT, 1769 1810 .ops = &clk_branch2_ops, 1770 1811 }, 1771 1812 }, ··· 1775 1822 .enable_mask = BIT(0), 1776 1823 .hw.init = &(struct clk_init_data){ 1777 1824 .name = "gcc_pcie_0_mstr_axi_clk", 1778 - .parent_hws = (const struct clk_hw *[]){ &system_noc_clk_src.clkr.hw }, 1779 - .num_parents = 1, 1780 - .flags = CLK_SET_RATE_PARENT, 1781 1825 .ops = &clk_branch2_ops, 1782 1826 }, 1783 1827 }, ··· 1804 1854 .enable_mask = BIT(0), 1805 1855 .hw.init = &(struct clk_init_data){ 1806 1856 .name = "gcc_pcie_0_slv_axi_clk", 1807 - .parent_hws = (const struct clk_hw *[]){ &system_noc_clk_src.clkr.hw }, 1808 - .num_parents = 1, 1809 - .flags = CLK_SET_RATE_PARENT, 1810 1857 .ops = &clk_branch2_ops, 1811 1858 }, 1812 1859 }, ··· 1831 1884 .enable_mask = BIT(0), 1832 1885 .hw.init = &(struct clk_init_data){ 1833 1886 .name = "gcc_pcie_1_cfg_ahb_clk", 1834 - .parent_hws = (const struct clk_hw *[]){ &config_noc_clk_src.clkr.hw }, 1835 - .num_parents = 1, 1836 - .flags = CLK_SET_RATE_PARENT, 1837 1887 .ops = &clk_branch2_ops, 1838 1888 }, 1839 1889 }, ··· 1843 1899 .enable_mask = BIT(0), 1844 1900 .hw.init = &(struct clk_init_data){ 1845 1901 .name = "gcc_pcie_1_mstr_axi_clk", 1846 - .parent_hws = (const struct clk_hw *[]){ &system_noc_clk_src.clkr.hw }, 1847 - .num_parents = 1, 1848 - .flags = CLK_SET_RATE_PARENT, 1849 1902 .ops = &clk_branch2_ops, 1850 1903 }, 1851 1904 }, ··· 1871 1930 .enable_mask = BIT(0), 1872 1931 .hw.init = &(struct clk_init_data){ 1873 1932 .name = "gcc_pcie_1_slv_axi_clk", 1874 - .parent_hws = (const struct clk_hw *[]){ &system_noc_clk_src.clkr.hw }, 1875 - .num_parents = 1, 1876 - .flags = CLK_SET_RATE_PARENT, 1877 1933 .ops = &clk_branch2_ops, 1878 1934 }, 1879 1935 }, ··· 1898 1960 .enable_mask = BIT(0), 1899 1961 .hw.init = &(struct clk_init_data){ 1900 1962 .name = "gcc_pdm_ahb_clk", 1901 - .parent_hws = (const struct clk_hw *[]){ &periph_noc_clk_src.clkr.hw }, 1902 - .num_parents = 1, 1903 1963 .ops = &clk_branch2_ops, 1904 1964 }, 1905 1965 }, ··· 1925 1989 .enable_mask = BIT(0), 1926 1990 .hw.init = &(struct clk_init_data){ 1927 1991 .name = "gcc_sdcc1_ahb_clk", 1928 - .parent_hws = (const struct clk_hw *[]){ &periph_noc_clk_src.clkr.hw }, 1929 - .num_parents = 1, 1930 - .flags = CLK_SET_RATE_PARENT, 1931 1992 .ops = &clk_branch2_ops, 1932 1993 }, 1933 1994 }, ··· 1937 2004 .enable_mask = BIT(0), 1938 2005 .hw.init = &(struct clk_init_data){ 1939 2006 .name = "gcc_sdcc2_ahb_clk", 1940 - .parent_hws = (const struct clk_hw *[]){ &periph_noc_clk_src.clkr.hw }, 1941 - .num_parents = 1, 1942 - .flags = CLK_SET_RATE_PARENT, 1943 2007 .ops = &clk_branch2_ops, 1944 2008 }, 1945 2009 }, ··· 1964 2034 .enable_mask = BIT(0), 1965 2035 .hw.init = &(struct clk_init_data){ 1966 2036 .name = "gcc_sdcc3_ahb_clk", 1967 - .parent_hws = (const struct clk_hw *[]){ &periph_noc_clk_src.clkr.hw }, 1968 - .num_parents = 1, 1969 - .flags = CLK_SET_RATE_PARENT, 1970 2037 .ops = &clk_branch2_ops, 1971 2038 }, 1972 2039 }, ··· 1991 2064 .enable_mask = BIT(0), 1992 2065 .hw.init = &(struct clk_init_data){ 1993 2066 .name = "gcc_sdcc4_ahb_clk", 1994 - .parent_hws = (const struct clk_hw *[]){ &periph_noc_clk_src.clkr.hw }, 1995 - .num_parents = 1, 1996 - .flags = CLK_SET_RATE_PARENT, 1997 2067 .ops = &clk_branch2_ops, 1998 2068 }, 1999 2069 }, ··· 2048 2124 .enable_mask = BIT(0), 2049 2125 .hw.init = &(struct clk_init_data){ 2050 2126 .name = "gcc_tsif_ahb_clk", 2051 - .parent_hws = (const struct clk_hw *[]){ &periph_noc_clk_src.clkr.hw }, 2052 - .num_parents = 1, 2053 2127 .ops = &clk_branch2_ops, 2054 2128 }, 2055 2129 }, ··· 2075 2153 .enable_mask = BIT(0), 2076 2154 .hw.init = &(struct clk_init_data){ 2077 2155 .name = "gcc_ufs_ahb_clk", 2078 - .parent_hws = (const struct clk_hw *[]){ &config_noc_clk_src.clkr.hw }, 2079 - .num_parents = 1, 2080 2156 .ops = &clk_branch2_ops, 2081 2157 }, 2082 2158 }, ··· 2118 2198 .enable_mask = BIT(0), 2119 2199 .hw.init = &(struct clk_init_data){ 2120 2200 .name = "gcc_ufs_rx_symbol_0_clk", 2121 - .parent_hws = (const struct clk_hw *[]){ &system_noc_clk_src.clkr.hw }, 2122 - .num_parents = 1, 2123 2201 .ops = &clk_branch2_ops, 2124 2202 }, 2125 2203 }, ··· 2131 2213 .enable_mask = BIT(0), 2132 2214 .hw.init = &(struct clk_init_data){ 2133 2215 .name = "gcc_ufs_rx_symbol_1_clk", 2134 - .parent_hws = (const struct clk_hw *[]){ &system_noc_clk_src.clkr.hw }, 2135 - .num_parents = 1, 2136 2216 .ops = &clk_branch2_ops, 2137 2217 }, 2138 2218 }, ··· 2159 2243 .enable_mask = BIT(0), 2160 2244 .hw.init = &(struct clk_init_data){ 2161 2245 .name = "gcc_ufs_tx_symbol_0_clk", 2162 - .parent_hws = (const struct clk_hw *[]){ &system_noc_clk_src.clkr.hw }, 2163 - .num_parents = 1, 2164 2246 .ops = &clk_branch2_ops, 2165 2247 }, 2166 2248 }, ··· 2172 2258 .enable_mask = BIT(0), 2173 2259 .hw.init = &(struct clk_init_data){ 2174 2260 .name = "gcc_ufs_tx_symbol_1_clk", 2175 - .parent_hws = (const struct clk_hw *[]){ &system_noc_clk_src.clkr.hw }, 2176 - .num_parents = 1, 2177 2261 .ops = &clk_branch2_ops, 2178 2262 }, 2179 2263 }, ··· 2276 2364 .enable_mask = BIT(0), 2277 2365 .hw.init = &(struct clk_init_data){ 2278 2366 .name = "gcc_usb_hs_ahb_clk", 2279 - .parent_hws = (const struct clk_hw *[]){ &periph_noc_clk_src.clkr.hw }, 2280 - .num_parents = 1, 2281 2367 .ops = &clk_branch2_ops, 2282 2368 }, 2283 2369 }, ··· 2398 2488 .enable_mask = BIT(10), 2399 2489 .hw.init = &(struct clk_init_data){ 2400 2490 .name = "gcc_boot_rom_ahb_clk", 2401 - .parent_hws = (const struct clk_hw *[]){ &config_noc_clk_src.clkr.hw }, 2402 - .num_parents = 1, 2403 2491 .ops = &clk_branch2_ops, 2404 2492 }, 2405 2493 }, ··· 2411 2503 .enable_mask = BIT(13), 2412 2504 .hw.init = &(struct clk_init_data){ 2413 2505 .name = "gcc_prng_ahb_clk", 2414 - .parent_hws = (const struct clk_hw *[]){ &periph_noc_clk_src.clkr.hw }, 2415 - .num_parents = 1, 2416 2506 .ops = &clk_branch2_ops, 2417 2507 }, 2418 2508 }, ··· 2453 2547 [GPLL0] = &gpll0.clkr, 2454 2548 [GPLL4_EARLY] = &gpll4_early.clkr, 2455 2549 [GPLL4] = &gpll4.clkr, 2456 - [CONFIG_NOC_CLK_SRC] = &config_noc_clk_src.clkr, 2457 - [PERIPH_NOC_CLK_SRC] = &periph_noc_clk_src.clkr, 2458 - [SYSTEM_NOC_CLK_SRC] = &system_noc_clk_src.clkr, 2459 2550 [UFS_AXI_CLK_SRC] = &ufs_axi_clk_src.clkr, 2460 2551 [USB30_MASTER_CLK_SRC] = &usb30_master_clk_src.clkr, 2461 2552 [BLSP1_QUP1_I2C_APPS_CLK_SRC] = &blsp1_qup1_i2c_apps_clk_src.clkr, ··· 2599 2696 [USB_SS_PHY_LDO] = &usb_ss_phy_ldo.clkr, 2600 2697 [GCC_BOOT_ROM_AHB_CLK] = &gcc_boot_rom_ahb_clk.clkr, 2601 2698 [GCC_PRNG_AHB_CLK] = &gcc_prng_ahb_clk.clkr, 2699 + 2700 + /* 2701 + * The following clocks should NOT be managed by this driver, but they once were 2702 + * mistakengly added. Now they are only here to indicate that they are not defined 2703 + * on purpose, even though the names will stay in the header file (for ABI sanity). 2704 + */ 2705 + [CONFIG_NOC_CLK_SRC] = NULL, 2706 + [PERIPH_NOC_CLK_SRC] = NULL, 2707 + [SYSTEM_NOC_CLK_SRC] = NULL, 2602 2708 }; 2603 2709 2604 2710 static struct gdsc *gcc_msm8994_gdscs[] = {