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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <72cd2af4-ed6b-8c1b-2488-b999976b894a@lechnology.com>
Date:   Mon, 19 Feb 2018 18:21:27 -0600
From:   David Lechner <david@...hnology.com>
To:     Bartosz Golaszewski <brgl@...ev.pl>,
        Philipp Zabel <p.zabel@...gutronix.de>
Cc:     linux-kernel@...r.kernel.org,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        Sekhar Nori <nsekhar@...com>,
        Kevin Hilman <khilman@...libre.com>
Subject: Re: [PATCH v4] reset: add support for non-DT systems

On 02/19/2018 10:58 AM, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@...libre.com>
> 
> The reset framework only supports device-tree. There are some platforms
> however, which need to use it even in legacy, board-file based mode.
> 
> An example of such architecture is the DaVinci family of SoCs which
> supports both device tree and legacy boot modes and we don't want to
> introduce any regressions.
> 
> We're currently working on converting the platform from its hand-crafted
> clock API to using the common clock framework. Part of the overhaul will
> be representing the chip's power sleep controller's reset lines using
> the reset framework.
> 
> This changeset extends the core reset code with new reset lookup
> structures. Each lookup table contains a set of lookup entries which
> allow the reset core to associate reset lines with devices (by
> comparing the dev_id and con_id strings).
> 
> Machine code can register a set of reset lines using this lookup table
> and concerned devices can access them using the regular reset_control
> API.
> 
> The new lookup function is only called as a fallback in case the
> of_node field is NULL and doesn't change anything for current users.
> 
> Tested with a dummy reset driver with several lookup entries.
> 
> An example lookup table can be found below:
> 
> static struct platform_device foobar_reset_dev = {
>          .name = "foobar-reset",
> };
> 
> static struct reset_lookup_entry foobar_reset_lookup_entries[] = {
>          { .con_id = "foo",    id = 15 },
>          { .con_id = "bar",    id = 5  },
> };
> 
> static struct reset_lookup_table foobar_reset_lookup_table = {
>          .dev_id = "foobar-device",
>          .entries = foobar_reset_lookup_entries,
>          .num_entries = ARRAY_SIZE(foobar_reset_lookup_entries),
>          .dev = &foobar_reset_dev.dev,
> };
> 

This seems like a lot of boilerplate to register a lookup. Can we have
something like phy_create_lookup() instead where there is just a single
function call to register a single lookup? This will be much easier to
use in the davinci PSC driver.

void reset_add_lookup(struct reset_controller_dev *rdev, int index,
		      const char *dev_id, const char *con_id);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ