lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGb2v64ryu76PcKZtaeC0g7C=02hy9os80X3wTyRkyNEFZ0QZA@mail.gmail.com>
Date:   Mon, 14 Aug 2017 17:46:58 +0800
From:   Chen-Yu Tsai <wens@...e.org>
To:     Icenowy Zheng <icenowy@...c.io>
Cc:     Rob Herring <robh+dt@...nel.org>,
        Maxime Ripard <maxime.ripard@...e-electrons.com>,
        Chen-Yu Tsai <wens@...e.org>,
        devicetree <devicetree@...r.kernel.org>,
        linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        linux-sunxi <linux-sunxi@...glegroups.com>
Subject: Re: [linux-sunxi] [PATCH 3/4] drivers: soc: sunxi: add support for
 remapping func value to reg value

On Wed, Aug 9, 2017 at 4:56 PM, Icenowy Zheng <icenowy@...c.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@...c.io>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ