diff options
author | Rex-BC Chen <[email protected]> | 2022-05-23 17:33:35 +0800 |
---|---|---|
committer | Stephen Boyd <[email protected]> | 2022-06-15 17:24:12 -0700 |
commit | 322989ddf7c478a9cbbb51da0d4b51825a47735d (patch) | |
tree | 3a4b7764809914e19aa05632a140a0ab6f564a47 /tools/perf/util/scripting-engines | |
parent | 723e367114dec95abe8bba4118c4c7c3542a463f (diff) |
clk: mediatek: reset: Support inuput argument index mode
There is a large number of mediatek infra reset bits, but we do not use
all of them. In addition, the proper input argement of reset controller
soulde be index.
Therefore, to be compatible with previous drivers and usage, we add
description variables to store the ids which can mapping to index.
To use this mode, we need to put the id in rst_idx_map to map from
index to ids. For example, if we want to input index 1 (this index
is used to set bank 1 bit 14) for svs, we need to declare the reset
controller like this:
In drivers:
static u16 rst_ofs[] = {
0x120, 0x130, 0x140, 0x150, 0x730,
};
static u16 rst_idx_map[] = {
0 * 32 + 0,
1 * 32 + 14,
....
};
static const struct mtk_clk_rst_desc clk_rst_desc = {
.version = MTK_RST_SET_CLR,
.rst_bank_ofs = rst_ofs,
.rst_bank_nr = ARRAY_SIZE(rst_ofs),
.rst_idx_map = rst_idx_map,
.rst_idx_map_nr = ARRAY_SIZE(rst_idx_map),
};
In dts:
svs: {
...
resets = <&infra 1>;
...
};
Signed-off-by: Rex-BC Chen <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Reviewed-by: NĂcolas F. R. A. Prado <[email protected]>
Tested-by: NĂcolas F. R. A. Prado <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Stephen Boyd <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines')
0 files changed, 0 insertions, 0 deletions