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: <dleftjr1qigx6p.fsf%l.stelmach@samsung.com>
Date:   Thu, 01 Oct 2020 10:36:14 +0200
From:   Lukasz Stelmach <l.stelmach@...sung.com>
To:     Krzysztof Kozlowski <krzk@...nel.org>
Cc:     Rob Herring <robh+dt@...nel.org>, Kukjin Kim <kgene@...nel.org>,
        devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
        b.zolnierkie@...sung.com, m.szyprowski@...sung.com
Subject: Re: [PATCH] ARM: dts: exynos: Add a placeholder for a MAC address

It was <2020-10-01 czw 09:22>, when Krzysztof Kozlowski wrote:
> On Wed, Sep 30, 2020 at 04:31:51PM +0200, Łukasz Stelmach wrote:
>> Add a placeholder for a MAC address. A bootloader may fill it
>> to set the MAC address and override EEPROM settings.
>> 
>> Signed-off-by: Łukasz Stelmach <l.stelmach@...sung.com>
>> ---
>>  arch/arm/boot/dts/exynos5422-odroidxu3.dts | 18 ++++++++++++++++++
>>  1 file changed, 18 insertions(+)
>> 
>> diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
>> index db0bc17a667b..9f7f3eacb750 100644
>> --- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts
>> +++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
>> @@ -70,3 +70,21 @@ &pwm {
>>  &usbdrd_dwc3_1 {
>>  	dr_mode = "peripheral";
>>  };
>> +
>> +&usbhost2 {
>> +	#address-cells = <1>;
>> +	#size-cells = <0>;
>> +
>> +	hub@1 {
>> +		compatible = "usb8087,0024";
>> +		reg = <1>;
>> +		#address-cells = <1>;
>> +		#size-cells = <0>;
>> +
>> +		ethernet: usbether@1 {
>> +			compatible = "usb0c45,6310";
>> +			reg = <1>;
>> +			mac-address = [00 00 00 00 00 00]; /* Filled in by a bootloader */
>
> Why do you need a placeholder? U-Boot can just append the
> address/property.

Several other dts files have such placeholder

git grep 'mac-addr.*\[00 00 00 00 00 00\]' arch/arm/boot/dts/ | wc -l
26

I can see two scenarios where this patch may be helpful. Another
(simple) boot loading code might be used. The value may also be
customized during build time and used without any support of a
bootloader.

Finding and filling a placeholder would be easier in u-boot too.

And it serves as a reference how to configure a USB device in a dts
file.

-- 
Łukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics

Download attachment "signature.asc" of type "application/pgp-signature" (488 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ