Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1710759 > unrolled thread

Re: [linux-sunxi] [PATCH 3/4] drivers: soc: sunxi: add support for remapping func value to reg value

Started byChen-Yu Tsai <wens@csie.org>
First post2017-08-14 11:50 +0200
Last post2017-08-14 11:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [linux-sunxi] [PATCH 3/4] drivers: soc: sunxi: add support for  remapping func value to reg value Chen-Yu Tsai <wens@csie.org> - 2017-08-14 11:50 +0200

#1710759 — Re: [linux-sunxi] [PATCH 3/4] drivers: soc: sunxi: add support for remapping func value to reg value

FromChen-Yu Tsai <wens@csie.org>
Date2017-08-14 11:50 +0200
SubjectRe: [linux-sunxi] [PATCH 3/4] drivers: soc: sunxi: add support for remapping func value to reg value
Message-ID<uekau-2tS-5@gated-at.bofh.it>
On Wed, Aug 9, 2017 at 4:56 PM, Icenowy Zheng <icenowy@aosc.io> wrote:
> 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.
>
> We now defines 0 as "CPU" and 1 as "Device", however, for VE SRAM, the
> register needs to be written 0x7FFFFFFF to claim it to VE, and for
> Allwinner A64's SRAM C the needed register value to claim it to DE2 is
> 0, and the value that enables CPU's access to the SRAM is 1.

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.

Add:

This allows us to keep the convention currently used in the device tree
binding.

> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>

Some amendments to the commit message above. Code looks good.

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web