From f908c1019ebf0d5cc2ad279bae362e4ecfcaeb55 Mon Sep 17 00:00:00 2001 From: Raghavendra Rao Ananta Date: Mon, 21 Sep 2020 16:09:31 -0700 Subject: [PATCH 1/3] soc: qcom: of_proxy_consumer: Add "qcom,jtagv8-mm" Add "qcom,jtagv8-mm" to the list of proxy consumers, such that the sync-state logic need not wait for the probe from the actual driver if it's disabled. Change-Id: I580a865ba3c4c298d76e29552eec854b33faea24 Signed-off-by: Raghavendra Rao Ananta --- drivers/soc/qcom/qcom_proxy_of_consumer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/soc/qcom/qcom_proxy_of_consumer.c b/drivers/soc/qcom/qcom_proxy_of_consumer.c index a0473fb34cc5..6eda788cf862 100644 --- a/drivers/soc/qcom/qcom_proxy_of_consumer.c +++ b/drivers/soc/qcom/qcom_proxy_of_consumer.c @@ -15,6 +15,9 @@ static const struct of_device_id qcom_proxy_of_consumer_match[] = { #if !IS_ENABLED(CONFIG_SERIAL_MSM_GENI_CONSOLE) { .compatible = "qcom,msm-geni-console"}, +#endif +#if !IS_ENABLED(CONFIG_MSM_JTAGV8) + { .compatible = "qcom,jtagv8-mm"}, #endif {} }; From 873068025a5845b85fea7b28f3435fae56f37288 Mon Sep 17 00:00:00 2001 From: Raghavendra Rao Ananta Date: Wed, 21 Oct 2020 15:13:16 -0700 Subject: [PATCH 2/3] ANDROID: ABI: Update allowed list for QCOM Add the following symbols to QCOM allowed-list: -- amba_driver_register -- amba_driver_unregister Bug: 171409550 Change-Id: Iab997df4f8ebb2c39b993b60ee4eb0fa3100fbcd Signed-off-by: Raghavendra Rao Ananta Git-commit: 95bd9e26f2fdd575bda7aa3b25f802f525d06fce Git-repo: https://android.googlesource.com/kernel/common/+/refs/heads/android11-5.4 [rananta@codeaurora.org: Generate and add an internal ABI snapshot] Signed-off-by: Raghavendra Rao Ananta --- android/abi_gki_aarch64_d6430e6763.xml | 664 ++++++++++++++----------- android/abi_gki_aarch64_qcom | 2 + 2 files changed, 386 insertions(+), 280 deletions(-) diff --git a/android/abi_gki_aarch64_d6430e6763.xml b/android/abi_gki_aarch64_d6430e6763.xml index af2debd6ec51..55d7c759adc0 100644 --- a/android/abi_gki_aarch64_d6430e6763.xml +++ b/android/abi_gki_aarch64_d6430e6763.xml @@ -213,6 +213,8 @@ + + @@ -7362,6 +7364,10 @@ + + + + @@ -12550,6 +12556,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -14189,7 +14292,7 @@ - + @@ -29523,246 +29626,246 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -30559,20 +30662,20 @@ - + - + - + - + - + - + @@ -30610,12 +30713,12 @@ - + - + - + @@ -33036,7 +33139,7 @@ - + @@ -40819,22 +40922,6 @@ - - - - - - - - - - - - - - - - @@ -40859,6 +40946,22 @@ + + + + + + + + + + + + + + + + @@ -49836,9 +49939,9 @@ - - - + + + @@ -49884,27 +49987,27 @@ - - - + + + - - - + + + - - + + - - - + + + - - + + @@ -52929,75 +53032,75 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -89095,62 +89198,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -89436,6 +89483,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -91556,6 +91659,22 @@ + + + + + + + + + + + + + + + + @@ -91601,7 +91720,7 @@ - + @@ -91613,7 +91732,7 @@ - + @@ -91729,44 +91848,44 @@ - + - + - + - + - + - + - + - + @@ -96663,23 +96782,7 @@ - - - - - - - - - - - - - - - - - + @@ -96687,7 +96790,7 @@ - + @@ -96695,7 +96798,7 @@ - + @@ -96703,7 +96806,7 @@ - + @@ -96711,15 +96814,7 @@ - - - - - - - - - + @@ -96733,7 +96828,7 @@ - + @@ -96741,7 +96836,7 @@ - + @@ -96752,7 +96847,7 @@ - + @@ -96763,7 +96858,23 @@ - + + + + + + + + + + + + + + + + + @@ -96771,7 +96882,7 @@ - + @@ -96779,7 +96890,7 @@ - + @@ -96787,7 +96898,7 @@ - + @@ -96795,7 +96906,7 @@ - + @@ -96803,7 +96914,7 @@ - + @@ -96811,7 +96922,7 @@ - + @@ -96819,7 +96930,7 @@ - + @@ -97288,10 +97399,11 @@ + - + @@ -97323,7 +97435,7 @@ - + @@ -97331,7 +97443,7 @@ - + @@ -97352,7 +97464,7 @@ - + @@ -98023,20 +98135,6 @@ - - - - - - - - - - - - - - @@ -98172,6 +98270,20 @@ + + + + + + + + + + + + + + @@ -101392,14 +101504,6 @@ - - - - - - - - diff --git a/android/abi_gki_aarch64_qcom b/android/abi_gki_aarch64_qcom index b2882971281f..7f2f930d0be7 100644 --- a/android/abi_gki_aarch64_qcom +++ b/android/abi_gki_aarch64_qcom @@ -21,6 +21,8 @@ alloc_skb_with_frags alloc_workqueue amba_bustype + amba_driver_register + amba_driver_unregister anon_inode_getfile arch_bpf_jit_check_func __arch_clear_user From 74672e6b27d56d601e5ec920f0d6a28e8cd9a93a Mon Sep 17 00:00:00 2001 From: Raghavendra Rao Ananta Date: Mon, 21 Sep 2020 17:52:28 -0700 Subject: [PATCH 3/3] soc: qcom: proxy_consumer: Add support for amba_driver The proxy consumer driver currently only supports proxy probing for platform bus. However, there's a need to proxy-probe coresight devices, which falls under ABMA bus. Hence, extend the driver to support proxy probing for "struct amba_driver" and add coresight-etm ids to the list. Change-Id: I48da20ea18f61b5cc82ae0616a75c23af32481a2 Signed-off-by: Raghavendra Rao Ananta --- drivers/soc/qcom/qcom_proxy_of_consumer.c | 74 ++++++++++++++++++++++- 1 file changed, 73 insertions(+), 1 deletion(-) diff --git a/drivers/soc/qcom/qcom_proxy_of_consumer.c b/drivers/soc/qcom/qcom_proxy_of_consumer.c index 6eda788cf862..d99bcde07118 100644 --- a/drivers/soc/qcom/qcom_proxy_of_consumer.c +++ b/drivers/soc/qcom/qcom_proxy_of_consumer.c @@ -6,6 +6,14 @@ #include #include #include +#include +#include + +#define QCOM_PROXY_CONSUMER_AMBA_ID(pid) \ + { \ + .id = pid, \ + .mask = 0x000fffff, \ + } /* * of_match table that contains a list of compatible strings for the @@ -22,12 +30,42 @@ static const struct of_device_id qcom_proxy_of_consumer_match[] = { {} }; +static const struct amba_id qcom_proxy_amba_of_consumer_match[] = { +#if !IS_ENABLED(CONFIG_CORESIGHT_SOURCE_ETM4X) + QCOM_PROXY_CONSUMER_AMBA_ID(0x000bb95d), /* Cortex-A53 */ + QCOM_PROXY_CONSUMER_AMBA_ID(0x000bb95e), /* Cortex-A57 */ + QCOM_PROXY_CONSUMER_AMBA_ID(0x000bb95a), /* Cortex-A72 */ + QCOM_PROXY_CONSUMER_AMBA_ID(0x000bb959), /* Cortex-A73 */ + QCOM_PROXY_CONSUMER_AMBA_ID(0x000bb9da), /* Cortex-A35 */ + QCOM_PROXY_CONSUMER_AMBA_ID(0x000f0205), /* QCOM Kryo */ + QCOM_PROXY_CONSUMER_AMBA_ID(0x000f0211), /* QCOM Kryo */ + QCOM_PROXY_CONSUMER_AMBA_ID(0x000bb802), /* QCOM Kryo 385 Cortex-A55 */ + QCOM_PROXY_CONSUMER_AMBA_ID(0x000bb803), /* QCOM Kryo 385 Cortex-A75 */ +#endif + {} +}; + static int qcom_proxy_of_consumer_probe(struct platform_device *pdev) { dev_dbg(&pdev->dev, "Proxy probing\n"); return 0; } +static int qcom_proxy_amba_of_consumer_probe(struct amba_device *adev, + const struct amba_id *id) +{ + dev_dbg(&adev->dev, "Proxy probing\n"); + + /* Before calling this probe, the amba framework votes for the clk + * by default. It removes the vote only during the runtime suspend + * of the device. Hence, explicilty decrement the usage count of + * the device for the suspend to happen. + */ + pm_runtime_put(&adev->dev); + + return 0; +} + static struct platform_driver qcom_proxy_of_consumer_driver = { .probe = qcom_proxy_of_consumer_probe, .driver = { @@ -36,7 +74,41 @@ static struct platform_driver qcom_proxy_of_consumer_driver = { }, }; -module_platform_driver(qcom_proxy_of_consumer_driver); +static struct amba_driver qcom_proxy_amba_of_consumer_driver = { + .probe = qcom_proxy_amba_of_consumer_probe, + .id_table = qcom_proxy_amba_of_consumer_match, + .drv = { + .name = "qcom_proxy_amba_of_consumer", + }, +}; + +static int __init qcom_proxy_of_init(void) +{ + int ret; + + ret = platform_driver_register(&qcom_proxy_of_consumer_driver); + if (ret < 0) + return ret; + + ret = amba_driver_register(&qcom_proxy_amba_of_consumer_driver); + if (ret < 0) + goto amba_fail; + + return 0; + +amba_fail: + platform_driver_unregister(&qcom_proxy_of_consumer_driver); + return ret; +} + +static void __exit qcom_proxy_of_exit(void) +{ + amba_driver_unregister(&qcom_proxy_amba_of_consumer_driver); + platform_driver_unregister(&qcom_proxy_of_consumer_driver); +} + +module_init(qcom_proxy_of_init); +module_exit(qcom_proxy_of_exit); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("Qualcomm Technologies, of proxy consumer driver");