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]
Date:   Wed, 3 Aug 2022 13:45:04 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Colin Foster <colin.foster@...advantage.com>
Cc:     linux-arm Mailing List <linux-arm-kernel@...ts.infradead.org>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        netdev <netdev@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        devicetree <devicetree@...r.kernel.org>,
        Terry Bowman <terry.bowman@....com>,
        Vladimir Oltean <vladimir.oltean@....com>,
        Wolfram Sang <wsa@...nel.org>,
        Microchip Linux Driver Support <UNGLinuxDriver@...rochip.com>,
        Steen Hegelund <Steen.Hegelund@...rochip.com>,
        Lars Povlsen <lars.povlsen@...rochip.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        "David S. Miller" <davem@...emloft.net>,
        Russell King <linux@...linux.org.uk>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Andrew Lunn <andrew@...n.ch>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Lee Jones <lee.jones@...aro.org>, katie.morris@...advantage.com
Subject: Re: [PATCH v15 mfd 9/9] mfd: ocelot: add support for the vsc7512 chip
 via spi

On Wed, Aug 3, 2022 at 7:48 AM Colin Foster
<colin.foster@...advantage.com> wrote:
>
> The VSC7512 is a networking chip that contains several peripherals. Many of
> these peripherals are currently supported by the VSC7513 and VSC7514 chips,
> but those run on an internal CPU. The VSC7512 lacks this CPU, and must be
> controlled externally.
>
> Utilize the existing drivers by referencing the chip as an MFD. Add support
> for the two MDIO buses, the internal phys, pinctrl, and serial GPIO.


...

> +#include <asm/byteorder.h>

Not sure I see the user of this header.

...

> +struct regmap *ocelot_spi_init_regmap(struct device *dev, const struct resource *res)
> +{
> +       struct regmap_config regmap_config;
> +
> +       memcpy(&regmap_config, &ocelot_spi_regmap_config, sizeof(regmap_config));
> +
> +       regmap_config.name = res->name;

> +       regmap_config.max_register = res->end - res->start;

Hmm... First of all, resource_size() is for that (with - 1 to the
result). But don't you need to use stride in the calculations?

> +       regmap_config.reg_base = res->start;
> +
> +       return devm_regmap_init(dev, &ocelot_spi_regmap_bus, dev, &regmap_config);
> +}

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ