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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'tty-5.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull serial driver fix from Greg KH:
"Here is a single serial driver fix for 5.12-rc6. Is is a revert of a
change that showed up in 5.9 that has been reported to cause problems.

It has been in linux-next for a while with no reported issues"

* tag 'tty-5.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
soc: qcom-geni-se: Cleanup the code to remove proxy votes

-83
-74
drivers/soc/qcom/qcom-geni-se.c
··· 3 3 4 4 #include <linux/acpi.h> 5 5 #include <linux/clk.h> 6 - #include <linux/console.h> 7 6 #include <linux/slab.h> 8 7 #include <linux/dma-mapping.h> 9 8 #include <linux/io.h> ··· 91 92 struct device *dev; 92 93 void __iomem *base; 93 94 struct clk_bulk_data ahb_clks[NUM_AHB_CLKS]; 94 - struct geni_icc_path to_core; 95 95 }; 96 96 97 97 static const char * const icc_path_names[] = {"qup-core", "qup-config", 98 98 "qup-memory"}; 99 - 100 - static struct geni_wrapper *earlycon_wrapper; 101 99 102 100 #define QUP_HW_VER_REG 0x4 103 101 ··· 839 843 } 840 844 EXPORT_SYMBOL(geni_icc_disable); 841 845 842 - void geni_remove_earlycon_icc_vote(void) 843 - { 844 - struct platform_device *pdev; 845 - struct geni_wrapper *wrapper; 846 - struct device_node *parent; 847 - struct device_node *child; 848 - 849 - if (!earlycon_wrapper) 850 - return; 851 - 852 - wrapper = earlycon_wrapper; 853 - parent = of_get_next_parent(wrapper->dev->of_node); 854 - for_each_child_of_node(parent, child) { 855 - if (!of_device_is_compatible(child, "qcom,geni-se-qup")) 856 - continue; 857 - 858 - pdev = of_find_device_by_node(child); 859 - if (!pdev) 860 - continue; 861 - 862 - wrapper = platform_get_drvdata(pdev); 863 - icc_put(wrapper->to_core.path); 864 - wrapper->to_core.path = NULL; 865 - 866 - } 867 - of_node_put(parent); 868 - 869 - earlycon_wrapper = NULL; 870 - } 871 - EXPORT_SYMBOL(geni_remove_earlycon_icc_vote); 872 - 873 846 static int geni_se_probe(struct platform_device *pdev) 874 847 { 875 848 struct device *dev = &pdev->dev; 876 849 struct resource *res; 877 850 struct geni_wrapper *wrapper; 878 - struct console __maybe_unused *bcon; 879 - bool __maybe_unused has_earlycon = false; 880 851 int ret; 881 852 882 853 wrapper = devm_kzalloc(dev, sizeof(*wrapper), GFP_KERNEL); ··· 866 903 } 867 904 } 868 905 869 - #ifdef CONFIG_SERIAL_EARLYCON 870 - for_each_console(bcon) { 871 - if (!strcmp(bcon->name, "qcom_geni")) { 872 - has_earlycon = true; 873 - break; 874 - } 875 - } 876 - if (!has_earlycon) 877 - goto exit; 878 - 879 - wrapper->to_core.path = devm_of_icc_get(dev, "qup-core"); 880 - if (IS_ERR(wrapper->to_core.path)) 881 - return PTR_ERR(wrapper->to_core.path); 882 - /* 883 - * Put minmal BW request on core clocks on behalf of early console. 884 - * The vote will be removed earlycon exit function. 885 - * 886 - * Note: We are putting vote on each QUP wrapper instead only to which 887 - * earlycon is connected because QUP core clock of different wrapper 888 - * share same voltage domain. If core1 is put to 0, then core2 will 889 - * also run at 0, if not voted. Default ICC vote will be removed ASA 890 - * we touch any of the core clock. 891 - * core1 = core2 = max(core1, core2) 892 - */ 893 - ret = icc_set_bw(wrapper->to_core.path, GENI_DEFAULT_BW, 894 - GENI_DEFAULT_BW); 895 - if (ret) { 896 - dev_err(&pdev->dev, "%s: ICC BW voting failed for core: %d\n", 897 - __func__, ret); 898 - return ret; 899 - } 900 - 901 - if (of_get_compatible_child(pdev->dev.of_node, "qcom,geni-debug-uart")) 902 - earlycon_wrapper = wrapper; 903 - of_node_put(pdev->dev.of_node); 904 - exit: 905 - #endif 906 906 dev_set_drvdata(dev, wrapper); 907 907 dev_dbg(dev, "GENI SE Driver probed\n"); 908 908 return devm_of_platform_populate(dev);
-7
drivers/tty/serial/qcom_geni_serial.c
··· 1177 1177 struct console *con) { } 1178 1178 #endif 1179 1179 1180 - static int qcom_geni_serial_earlycon_exit(struct console *con) 1181 - { 1182 - geni_remove_earlycon_icc_vote(); 1183 - return 0; 1184 - } 1185 - 1186 1180 static struct qcom_geni_private_data earlycon_private_data; 1187 1181 1188 1182 static int __init qcom_geni_serial_earlycon_setup(struct earlycon_device *dev, ··· 1227 1233 writel(stop_bit_len, uport->membase + SE_UART_TX_STOP_BIT_LEN); 1228 1234 1229 1235 dev->con->write = qcom_geni_serial_earlycon_write; 1230 - dev->con->exit = qcom_geni_serial_earlycon_exit; 1231 1236 dev->con->setup = NULL; 1232 1237 qcom_geni_serial_enable_early_read(&se, dev->con); 1233 1238
-2
include/linux/qcom-geni-se.h
··· 460 460 int geni_icc_enable(struct geni_se *se); 461 461 462 462 int geni_icc_disable(struct geni_se *se); 463 - 464 - void geni_remove_earlycon_icc_vote(void); 465 463 #endif 466 464 #endif