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:   Fri, 19 Jun 2020 11:23:55 +0200
From:   Philipp Zabel <p.zabel@...gutronix.de>
To:     Álvaro Fernández Rojas <noltari@...il.com>,
        simon@...e.lp0.eu, jonas.gorski@...il.com, kishon@...com,
        vkoul@...nel.org, robh+dt@...nel.org, f.fainelli@...il.com,
        bcm-kernel-feedback-list@...adcom.com, krzk@...nel.org,
        gregkh@...uxfoundation.org, alcooperx@...il.com,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v4 2/2] phy: bcm63xx-usbh: Add BCM63xx USBH driver

Hi Álvaro,

On Fri, 2020-06-19 at 10:51 +0200, Álvaro Fernández Rojas wrote:
> Add BCM63xx USBH PHY driver for BMIPS.
> 
> Signed-off-by: Álvaro Fernández Rojas <noltari@...il.com>
> ---
>  v4: several improvements:
>   - Use devm_platform_ioremap_resource.
>   - Code cleanups.
>   - Improve device mode config:
>     - Move USBH_SWAP_CONTROL device mode value to variant variable.
>     - Set USBH_UTMI_CONTROL1 register value (variant variable).
>  v3: introduce changes suggested by Florian:
>   - Add support for device mode.
>  v2: introduce changes suggested by Florian:
>   - Drop OF dependency (use device_get_match_data).
>   - Drop __initconst from variant tables.
>   - Use devm_clk_get_optional.
> 
>  drivers/phy/broadcom/Kconfig            |   9 +
>  drivers/phy/broadcom/Makefile           |   1 +
>  drivers/phy/broadcom/phy-bcm63xx-usbh.c | 457 ++++++++++++++++++++++++
>  3 files changed, 467 insertions(+)
>  create mode 100644 drivers/phy/broadcom/phy-bcm63xx-usbh.c
> 
[...]
> diff --git a/drivers/phy/broadcom/phy-bcm63xx-usbh.c b/drivers/phy/broadcom/phy-bcm63xx-usbh.c
> new file mode 100644
> index 000000000000..79f913d86def
> --- /dev/null
> +++ b/drivers/phy/broadcom/phy-bcm63xx-usbh.c
[...]
> +static int __init bcm63xx_usbh_phy_probe(struct platform_device *pdev)
> +{
> +	struct device *dev = &pdev->dev;
> +	struct bcm63xx_usbh_phy	*usbh;
> +	const struct bcm63xx_usbh_phy_variant *variant;
> +	struct phy *phy;
> +	struct phy_provider *phy_provider;
> +
> +	usbh = devm_kzalloc(dev, sizeof(*usbh), GFP_KERNEL);
> +	if (!usbh)
> +		return -ENOMEM;
> +
> +	variant = device_get_match_data(dev);
> +	if (!variant)
> +		return -EINVAL;
> +	usbh->variant = variant;
> +
> +	usbh->base = devm_platform_ioremap_resource(pdev, 0);
> +	if (IS_ERR(usbh->base))
> +		return PTR_ERR(usbh->base);
> +
> +	usbh->reset = devm_reset_control_get(dev, NULL);

Please use devm_reset_control_get_exclusive() instead.

regards
Philipp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ