Commit Graph

20 Commits

Author SHA1 Message Date
spakkkk
eeb6fe835a drivers: soc: fix wmisleading-indentation warnings 2022-11-12 11:19:18 +00:00
Tao Zhang
e561510190 dcc_v2: Control the cti trigger of each link list individually
To be able to control the cti trigger of each list individually,
instead of using a cti_trig variable to control all link lists.

Change-Id: If81ba94bd02849ec63be16204859f7031bda60bf
Signed-off-by: Tao Zhang <taozha@codeaurora.org>
2021-07-08 15:11:05 +08:00
Yuanfang Zhang
7f71bed467 dcc_v2: fix 1 write 1 read register configuration fail issue
Re-use base address from last entry only when the decs_type of
last entry equal to "DCC_ADDR_TYPE" in dcc_config_add().

Change-Id: I6c678ddaac6c689d73b14c63d03abdbd6289dc0c
Signed-off-by: Yuanfang Zhang <zhangyuanfang@codeaurora.org>
2020-09-25 19:31:42 +08:00
Tao,Zhang
4a633c41a4 dcc_v2: Add dcc region to minidump table
Add dcc region to minidump talbe for new feature. HLOS owned part
of DCC SRAM needs to be added to mini dump.

Change-Id: Ia72720d000e58a811d245c4f330aa6d565ed7203
Signed-off-by: Tao,Zhang <taozha@codeaurora.org>
2020-09-01 15:48:11 +08:00
Tao,Zhang
1004c2d05a soc: qcom: dcc: Remove transaction timeout setting for linklist
Disable transaction timeout for now since it causes unexpected
timeout issue. Remove transaction timeout feature for dcc linklist
first.

Change-Id: If22ccbc6b0db228614ee287386ec0ca83dddfdfc
Signed-off-by: Tao,Zhang <taozha@codeaurora.org>
2020-06-29 20:47:04 +08:00
Yuanfang Zhang
a9403f4cfa soc: qcom: dcc: avoid memory access violation
When *ppos + len is overflow, shrink len to max readable size
of SRAM.

Change-Id: I7c35433d384eb596a3f84b7ce13652f58166b40a
Signed-off-by: Yuanfang Zhang <zhangyuanfang@codeaurora.org>
2020-05-29 14:29:21 +08:00
Tao,Zhang
8adebf80f8 soc: qcom: dcc: Set transaction timeout for dcc linklist
Set transaction timeout to 0x3F for dcc linklist while enabling
dcc hw.

Change-Id: Icb5bc63840d2bb34fc97c87abdc622e81d5c033f
Signed-off-by: Tao,Zhang <taozha@codeaurora.org>
2020-04-22 21:54:42 +08:00
Tao,Zhang
04ba9b9a52 soc: qcom: dcc: Support new DCC HW feature
Add support to new register memory map, fix loop offset and
dynamic number of link list.

Change-Id: Ibadfa723842dae80cdd50bf08018d86c2ef30b94
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
Signed-off-by: Tao,Zhang <taozha@codeaurora.org>
2020-03-10 11:56:14 +08:00
Mao Jinlong
8d21d37aab dcc_v2: Disable the links when fail to config any link
When it fails to configure any link list, disable all the links and
reset the list config.

Change-Id: Ib315ed47fd9f19cea8b65eeed22ca6e011dd6bab
Signed-off-by: Mao Jinlong <jinlmao@codeaurora.org>
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
2020-01-22 16:30:56 +08:00
Yuanfang Zhang
0e04c9c615 soc: qcom: dcc_v2: Add support for 32bit devices
Add dcc_sram_memcpy function in dcc driver to compatible with
32bit devices since memcpy_fromio function can't be supported.

Change-Id: I084f0599bbe603e822336e216d656d71ebc841ae
Signed-off-by: Yuanfang Zhang <zhangyuanfang@codeaurora.org>
2019-11-14 14:46:17 +08:00
Yuanfang Zhang
d61e260c99 soc: qcom: dcc_v2: Add virtualization support for 32bit devices
Add dcc_sram_memset function in dcc_driver since hyp cannot support
virtualize stmgeia instruction in previous inline function
memset_io.

Change-Id: I2f0fc281216d897d33b421fd016a030221cc5c4d
Signed-off-by: Shaoqing Liu <shaoqingliu@codeaurora.org>
Signed-off-by: Yuanfang Zhang <zhangyuanfang@codeaurora.org>
2019-11-07 14:07:19 +08:00
Mao Jinlong
949350b2fe dcc_v2: Don't set the default value to sram when dcc is enabled
If set the default value to sram when dcc is enabled, there will be
stuck issue for dcc dump.

Change-Id: I784993d6db41e1afed92ccc05bec0cf1987a3e04
Signed-off-by: Mao Jinlong <jinlmao@codeaurora.org>
2019-08-27 19:58:41 -07:00
Mao Jinlong
1e8f7b56ea dcc_v2: Reset the lock register if config dcc list fails
Reset the lock register if config dcc list fails. Otherwise the list
will be always locked before next dcc_disable.

Change-Id: I2bd209ba84fe4896cce5bf72cdb3d06d2377a383
Signed-off-by: Mao Jinlong <jinlmao@codeaurora.org>
2019-06-17 18:19:33 +08:00
Mao Jinlong
f369a540b7 soc: qcom: dcc_v2: Add read_write dt config support for dcc_v2
Add read_write dt config to support the configure that read an
address's value and then modify the address's value in device tree.

Change-Id: I85c37ed739af8739b87e4dd817dd2e2faf74555f
Signed-off-by: Mao Jinlong <jinlmao@codeaurora.org>
2019-05-23 22:33:05 +08:00
Mao Jinlong
53dae75642 dcc_v2: Check enable status of dcc when changing curr_list
Avoid changing curr_list when dcc is enabled. Dcc needs to be disabled
before changing the curr_list. If any link list is enabled,the enable
status of dcc will be true.

Change-Id: I571b172a85b97e3a5e4d55531fad90641283b61e
Signed-off-by: Mao Jinlong <jinlmao@codeaurora.org>
2019-04-23 22:47:35 -07:00
Yuanfang Zhang
c5615aa1ce soc: qcom: dcc_v2: Avoid dcc_sram_writel overstep
If the config_list is too long,they may beyond the capacity of Dcc sram,
so add verification before dcc_sram_writel.

Change-Id: Id9d4f12830cd52cf84a2cba1a913f0f3b28b4fe5
Signed-off-by: Yuanfang Zhang <zhangyuanfang@codeaurora.org>
2019-03-25 14:13:31 +08:00
Tingwei Zhang
7e35436a37 soc: qcom: dcc_v2: Add dynamic loop offset support
Loop offset of DCC is dynamic according to DCC SRAM size.
Add support to change loop offset according to SRAM size.

Change-Id: I1b0a992fc421ae05f091afe37919edb2ce32a1e1
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
2019-03-21 13:33:10 +08:00
Bryan Huntsman
9a702c565e Use 'GPL-2.0-only' as the SPDX-License-Identifier tag
s/SPDX-License-Identifier: GPL-2.0/SPDX-License-Identifier: GPL-2.0-only/

Change-Id: I0558c468c25d8229af2c8caade25c458875913f4
Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2019-01-11 16:55:33 -08:00
Shaoqing Liu
e208a816fb soc: qcom: dcc_v2: support multiple link lists
DCC can program multiple link lists. Add driver support to
parse multiple link lists in device tree.  Support upto
8 link lists.

Change-Id: Ib8a53253d44f4f8568a7dec079c8713e831c2c4d
Signed-off-by: Shaoqing Liu <shaoqingliu@codeaurora.org>
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
2019-01-11 00:10:53 -08:00
Tingwei Zhang
89b66262f3 soc: qcom: dcc_v2: Add snapshot of the DCC v2 driver
This is a snapshot of the DCC_v2 driver as of msm-4.14
commit 'f7e2b74'("coresight: stm: Fix master control issue").
The second offset present as part of offset descriptor needs
to take into account the length of the first offset. This patch
fixes the current offset calculation to account for it. This
patch removes the clock support since it's not needed.

Fix sscanf issue to prevent buffer overflow.

Change-Id: Iac7463b759efd56b98aa92c594a46a76c3c8d208
Signed-off-by: Rama Aparna Mallavarapu <aparnam@codeaurora.org>
Signed-off-by: Mulu He <muluhe@codeaurora.org>
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
2018-12-03 18:29:44 -08:00