diff options
author | Icenowy Zheng <icenowy@aosc.io> | 2017-08-09 11:56:26 +0300 |
---|---|---|
committer | Chen-Yu Tsai <wens@csie.org> | 2017-08-18 09:30:20 +0300 |
commit | 8fed2ce98eec31f33fd4df96c584525dcae4d9be (patch) | |
tree | 2d601761ca8a4973fe53c3a845b325c764297e90 /firmware/mts_edge.fw.ihex | |
parent | 2262a65f0bcdfe372b088d20c325c1987cec4332 (diff) | |
download | linux-8fed2ce98eec31f33fd4df96c584525dcae4d9be.tar.xz |
drivers: soc: sunxi: add support for remapping func value to reg value
On some Allwinner SoCs, sometimes the value needed to write into the
register to claim SRAM is not equal to the value specified in the
device tree.
The device tree binding defines 0 as "mapped to CPU" and 1 as "mapped
to X device". This matches the value written to the configuration
register for the SRAM blocks currently supported. However, the not yet
supported VE SRAM block is claimed for the device by writing 0x7fffffff,
which is vastly different from the other blocks. On the A64, SRAM C is
claimed by the device by writing a 0, which is the opposite of the
current design.
Add a value remapping in sunxi_sram_func structure, and let the
sunxi_sram_of_parse function set the remapped register value.
This allows us to keep the convention currently used in the device tree
binding.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
[wens@csie.org: Clarified commit message]
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Diffstat (limited to 'firmware/mts_edge.fw.ihex')
0 files changed, 0 insertions, 0 deletions