All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: Tony Dinh <mibodhi@gmail.com>,
	U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Tom Rini <trini@konsulko.com>, Chris Packham <judge.packham@gmail.com>
Subject: Re: [PATCH 3/4] NSA310S : Use Ethernet PHY name from device tree
Date: Thu, 1 Jul 2021 10:22:44 +0200	[thread overview]
Message-ID: <73d89073-9066-ff80-15d5-93bc0a7a4e27@denx.de> (raw)
In-Reply-To: <41f44aa6-0af8-6ddb-cf5c-2b4ced65b7d9@denx.de>

Hi Tony,

On 01.07.21 10:19, Stefan Roese wrote:
> On 01.07.21 06:26, Tony Dinh wrote:
>> In DM Ethernet, the old "egiga0" name is no longer valid, so replace it
>> with Ethernet PHY name from device tree.
>>
>> Signed-off-by: Tony Dinh <mibodhi@gmail.com>
>> ---
>>
>>   board/zyxel/nsa310s/nsa310s.c | 15 +++++++--------
>>   1 file changed, 7 insertions(+), 8 deletions(-)
>>
>> diff --git a/board/zyxel/nsa310s/nsa310s.c 
>> b/board/zyxel/nsa310s/nsa310s.c
>> index cd4a7723b1..29aded1910 100644
>> --- a/board/zyxel/nsa310s/nsa310s.c
>> +++ b/board/zyxel/nsa310s/nsa310s.c
>> @@ -1,5 +1,6 @@
>>   // SPDX-License-Identifier: GPL-2.0+
>>   /*
>> + * Copyright (C) 2021 Tony Dinh <mibodhi@gmail.com>
> 
> AFAIU, just changing a few lines, as this patch does, does not justify
> to add a copyright notice to this file.

I just noticed that you already are present in the copyright notice
below. I suggest to change this in a way, so that your name only
occurs once, like:

* Copyright (C) 2015, 2021 Tony Dinh <mibodhi@gmail.com>

Does this make sense?

Thanks,
Stefan

>>    * Copyright (C) 2015
>>    * Gerald Kerma <dreagle@doukki.net>
>>    * Tony Dinh <mibodhi@gmail.com>
>> @@ -81,22 +82,18 @@ int board_init(void)
>>       return 0;
>>   }
>> +#define PHY_ADR    1
> 
> You should be able to read this PHY address from the device-tree now.
> No need to define this here again.
> 
> Thanks,
> Stefan
> 
>> +
>>   #ifdef CONFIG_RESET_PHY_R
>>   void reset_phy(void)
>>   {
>>       u16 reg;
>> -    u16 phyaddr;
>> -    char *name = "egiga0";
>> +    u16 phyaddr = PHY_ADR;
>> +    char *name = "ethernet-controller@72000";
>>       if (miiphy_set_current_dev(name))
>>           return;
>> -    /* read PHY dev address */
>> -    if (miiphy_read(name, 0xee, 0xee, (u16 *) &phyaddr)) {
>> -        printf("could not read PHY dev address\n");
>> -        return;
>> -    }
>> -
>>       /* set RGMII delay */
>>       miiphy_write(name, phyaddr, MV88E1318_PGADR_REG, 
>> MV88E1318_MAC_CTRL_PG);
>>       miiphy_read(name, phyaddr, MV88E1318_MAC_CTRL_REG, &reg);
>> @@ -131,5 +128,7 @@ void reset_phy(void)
>>       /* downshift */
>>       miiphy_write(name, phyaddr, 0x10, 0x3860);
>>       miiphy_write(name, phyaddr, 0x0, 0x9140);
>> +
>> +    printf("MV88E1318 PHY initialized on %s\n", name);
>>   }
>>   #endif /* CONFIG_RESET_PHY_R */
>>
> 
> 
> Viele Grüße,
> Stefan
> 


Viele Grüße,
Stefan

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de

  reply	other threads:[~2021-07-01  8:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-01  4:26 [PATCH 0/4] Zyxel NSA310S NAS : convert to Driver Model Tony Dinh
2021-07-01  4:26 ` [PATCH 1/4] NSA310S : Add device tree DTS for Zyxel NSA310S board Tony Dinh
2021-07-01  8:14   ` Stefan Roese
2021-07-01  4:26 ` [PATCH 2/4] NSA310S : Add DM USB, DM Ethernet, and DM SATA configs Tony Dinh
2021-07-01  8:14   ` Stefan Roese
2021-07-01  4:26 ` [PATCH 3/4] NSA310S : Use Ethernet PHY name from device tree Tony Dinh
2021-07-01  8:19   ` Stefan Roese
2021-07-01  8:22     ` Stefan Roese [this message]
2021-07-01 10:56       ` Tony (bodhi)
2021-07-01  4:26 ` [PATCH 4/4] NSA310S : Add DM SATA configs Tony Dinh
2021-07-01  8:20   ` Stefan Roese
2021-07-19 12:32 ` [PATCH 0/4] Zyxel NSA310S NAS : convert to Driver Model Stefan Roese

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=73d89073-9066-ff80-15d5-93bc0a7a4e27@denx.de \
    --to=sr@denx.de \
    --cc=judge.packham@gmail.com \
    --cc=mibodhi@gmail.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.