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] [day] [month] [year] [list]
Message-ID: <4736928.ouoSJRV5Ml@wuerfel>
Date:	Mon, 01 Dec 2014 16:40:35 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	linux-arm-kernel@...ts.infradead.org
Cc:	Peter Griffin <peter.griffin@...aro.org>,
	linux-kernel@...r.kernel.org, srinivas.kandagatla@...il.com,
	maxime.coquelin@...com, patrice.chotard@...com,
	peppe.cavallaro@...com, kishon@...com, netdev@...r.kernel.org,
	lee.jones@...aro.org, alexandre.torgue@...com,
	devicetree@...r.kernel.org
Subject: Re: [PATCH 4/7] ARM: STi: DT: STiH410: Add usb2 picophy dt nodes

On Wednesday 19 November 2014 08:27:09 Peter Griffin wrote:
> +       soc {
> +               usb2_picophy1: phy@1 {
> +                       compatible = "st,stih407-usb2-phy";
> +                       #phy-cells = <0>;
> +                       st,syscfg = <&syscfg_core 0xf8 0xf4>;
> +                       resets = <&softreset STIH407_PICOPHY_SOFTRESET>,
> +                                <&picophyreset STIH407_PICOPHY0_RESET>;
> +                       reset-names = "global", "port";
> +               };
>  
> +               usb2_picophy2: phy@2 {
> +                       compatible = "st,stih407-usb2-phy";
> +                       #phy-cells = <0>;
> +                       st,syscfg = <&syscfg_core 0xfc 0xf4>;
> +                       resets = <&softreset STIH407_PICOPHY_SOFTRESET>,
> +                                <&picophyreset STIH407_PICOPHY1_RESET>;
> +                       reset-names = "global", "port";
> +               };
> +       };

In theory the unit-address (the @1 and @2 part of the name) is supposed to
match the 'reg' property value, but of course that doesn't work any
more with the changed binding. The same problem keeps coming up, so
I wonder if anyone has an idea how this is supposed to be handled properly.

Should we just make up unit-address numbers? I guess a more elaborate
variant would be to have a parent node with #address-cells = <1> and
no ranges, to make up a new address space with arbitrarily assigned
reg values, like

	phys {
		#address-cells = <1>; /* just counting the nodes */
		#size-cells = <0>;

               usb2_picophy1: phy@0 {
                       compatible = "st,stih407-usb2-phy";
			reg = <0>;
                       #phy-cells = <0>;
                       st,syscfg = <&syscfg_core 0xf8 0xf4>;
               };

               usb2_picophy2: phy@1 {
                       compatible = "st,stih407-usb2-phy";
			reg = <0>;
                       #phy-cells = <0>;
                       st,syscfg = <&syscfg_core 0xf8 0xf4>;
               };
	}

Should we try to do it like this, or is that overcomplicating
things?

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ