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: <Y2Uu16RSF9Py5AdC@lunn.ch>
Date:   Fri, 4 Nov 2022 16:25:11 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Sriranjani P <sriranjani.p@...sung.com>
Cc:     peppe.cavallaro@...com, alexandre.torgue@...s.st.com,
        joabreu@...opsys.com, davem@...emloft.net, edumazet@...gle.com,
        kuba@...nel.org, pabeni@...hat.com, mcoquelin.stm32@...il.com,
        richardcochran@...il.com, netdev@...r.kernel.org,
        linux-stm32@...md-mailman.stormreply.com,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Chandrasekar R <rcsekar@...sung.com>,
        Suresh Siddha <ssiddha@...la.com>
Subject: Re: [PATCH 2/4] net: stmmac: dwc-qos: Add FSD EQoS support

> +static int dwc_eqos_setup_rxclock(struct platform_device *pdev)
> +{
> +	struct device_node *np = pdev->dev.of_node;
> +
> +	if (np && of_property_read_bool(np, "rx-clock-mux")) {
> +		unsigned int reg, val;
> +		struct regmap *syscon = syscon_regmap_lookup_by_phandle(np,
> +			"rx-clock-mux");
> +
> +		if (IS_ERR(syscon)) {
> +			dev_err(&pdev->dev, "couldn't get the rx-clock-mux syscon!\n");
> +			return PTR_ERR(syscon);
> +		}
> +
> +		if (of_property_read_u32_index(np, "rx-clock-mux", 1, &reg)) {
> +			dev_err(&pdev->dev, "couldn't get the rx-clock-mux reg. offset!\n");
> +			return -EINVAL;
> +		}
> +
> +		if (of_property_read_u32_index(np, "rx-clock-mux", 2, &val)) {
> +			dev_err(&pdev->dev, "couldn't get the rx-clock-mux reg. val!\n");
> +			return -EINVAL;
> +		}
> +
> +		regmap_write(syscon, reg, val);

This appears to be one of those binds which allows any magic value to
be placed into any register. That is not how DT should be used.

   Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ