diff options
author | Maxime Chevallier <maxime.chevallier@bootlin.com> | 2023-04-07 18:26:04 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-04-07 19:28:19 +0300 |
commit | 4a670ac3e75e517c96cbd01ef870dbd598c3ce71 (patch) | |
tree | 178ae97c2c5108439db90558848096d6179d3187 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 383b3232732dca5b084a8f90b529d53c18b03e74 (diff) | |
download | linux-4a670ac3e75e517c96cbd01ef870dbd598c3ce71.tar.xz |
regmap: allow upshifting register addresses before performing operations
Similar to the existing reg_downshift mechanism, that is used to
translate register addresses on busses that have a smaller address
stride, it's also possible to want to upshift register addresses.
Such a case was encountered when network PHYs and PCS that usually sit
on a MDIO bus (16-bits register with a stride of 1) are integrated
directly as memory-mapped devices. Here, the same register layout
defined in 802.3 is used, but the register now have a larger stride.
Introduce a mechanism to also allow upshifting register addresses.
Re-purpose reg_downshift into a more generic, signed reg_shift, whose
sign indicates the direction of the shift. To avoid confusion, also
introduce macros to explicitly indicate if we want to downshift or
upshift.
For bisectability, change any use of reg_downshift to use reg_shift.
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Tested-by: Colin Foster <colin.foster@in-advantage.com>
Link: https://lore.kernel.org/r/20230407152604.105467-1-maxime.chevallier@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions