public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Alex Marginean <alexm.osslist@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [EXT] Re: [PATCH 1/2 v3] net: introduce MDIO DM class for MDIO devices
Date: Tue, 9 Jul 2019 01:17:13 +0300	[thread overview]
Message-ID: <ee961abe-88be-9826-55ea-ca77c7e64133@gmail.com> (raw)
In-Reply-To: <CANr=Z=bL3viSKtafGripv_vxqnmMBYWk6U5jOb4BmhXweXEpxQ@mail.gmail.com>

On 7/9/2019 12:40 AM, Joe Hershberger wrote:
> On Fri, Jun 14, 2019 at 1:26 PM Alex Marginean <alexm.osslist@gmail.com> wrote:
>>
>> Hi Nevo,
>>
>> On 6/14/2019 7:55 PM, Nevo Hed wrote:
>>> Hi Alex
>>>
>>> In another thread (https://lists.denx.de/pipermail/u-boot/2019-June/371933.html)
>>> I asked Ken (before learning of their cut-backs) if I should take a
>>> stab at re-integrating his work
>>> where Joe also pointed out the impending acceptance of your work.
>>>
>>> I'm not sure where we left off here in this thread and wondering if
>>> you are working on that or not.  Ive been staring at this for a bit
>>> and ready to take a stab at it if you are not.
>>
>> I am planning to add helpers to MDIO uclass, along the lines Ken sent
>> initially, on top of the current patch.  It looks like the helpers would
>> fit just fine.  I didn't get to do it yet though.
> 
> I'm intending to take this as is... I assume that fits with your plan for this.

Thanks Joe, it does fit with the plan so far.
Nevo and I started a conversation on the side on a respin of the Marvell
MDIO driver, I'll send that out when it's ready too.

Alex

> 
> Thanks,
> -Joe
> 
>>
>> One difference between the two DM MDIO implementations is the way MDIO
>> ops work, the patch I sent abstracts away the legacy mii_bus from DM
>> MDIO driver.  I would keep that as it, which means a bit more rework on
>> the marvell driver.  I didn't look into this in detail yet.
>> I think I can send a version of the helpers in [1] in about a week,
>> maybe more, right now I'm trying to get MDIO MUX DM support out for
>> review plus some updates for the NXP platform I'm working on.  I can
>> take a stab at porting the marvell driver too, but I can't test it.
>> If you want to put some time into this right now feel free to do it :)
>>
>>>
>>> if easier - i'm `nhed73` on the #u-boot irc channel
>>>
>>> Thanks
>>>     ---Nevo
>>
>> I can join if you want to discuss details, let me know.
>>
>> Thanks!
>> Alex
>>
>>
>>>
>>> On Tue, Jun 11, 2019 at 8:04 AM Alexandru Marginean
>>> <alexandru.marginean@nxp.com> wrote:
>>>>
>>>> Hi Ken,
>>>>
>>>> On 6/11/2019 12:44 PM, Ken Ma wrote:
>>>>> Hi Alex
>>>>>
>>>>> Thanks a lot for your information!
>>>>>
>>>>> I think our patches have no essential difference.
>>>>> The 2 patches have only small implementation difference:
>>>>> In my patch, mii bus ops functions(read/write/reset...) need to be
>>>>> implemented while in your patch mdio bus functions need to be
>>>>> implemented and then mii bus ops functions will call mdio bus ops
>>>>> functions. > I had planned to reuse those existed mii ops functions such as
>>>>> smc911x_miiphy_read/ smc911x_miiphy_write/ sun8i_mdio_read/
>>>>> sun8i_mdio_write... then it is easy for turning old mdio driver to
>>>>> DM. >
>>>>> Now I am not working on u-boot, so I am sorry that I will not do the pulling work.
>>>>>
>>>>> Yours,
>>>>> Ken
>>>>
>>>> OK, I think I get what you wanted to do.  Either way it's not too
>>>> difficult to convert existing MDIOs to DM, but they have to start using
>>>> struct udevice.  That's similar to what was done on DM_ETH and others.
>>>>
>>>> The helpers mapping eth/phy/mdio make sense and could be useful, that's
>>>> something I'll try to look into.
>>>>
>>>> Thank you!
>>>> Alex
>>>>
>>>>
>>>>>
>>>>> -----Original Message-----
>>>>> From: Alex Marginean <alexm.osslist@gmail.com>
>>>>> Sent: Tuesday, June 11, 2019 9:18 AM
>>>>> To: joe.hershberger at ni.com; Ken Ma <make@marvell.com>
>>>>> Cc: u-boot <u-boot@lists.denx.de>; Joseph Hershberger <joseph.hershberger@ni.com>
>>>>> Subject: [EXT] Re: [U-Boot] [PATCH 1/2 v3] net: introduce MDIO DM class for MDIO devices
>>>>>
>>>>> External Email
>>>>>
>>>>> ----------------------------------------------------------------------
>>>>> +Ken,
>>>>>
>>>>> Hi Joe,
>>>>>
>>>>> On 6/10/2019 11:25 PM, Joe Hershberger wrote:
>>>>>> On Mon, Jun 3, 2019 at 11:11 AM Alex Marginean <alexm.osslist@gmail.com> wrote:
>>>>>>>
>>>>>>> Adds UCLASS_MDIO DM class supporting MDIO buses that are probed as
>>>>>>> stand-alone devices.  Useful in particular for systems that support
>>>>>>> DM_ETH and have a stand-alone MDIO hardware block shared by multiple
>>>>>>> Ethernet interfaces.
>>>>>>>
>>>>>>> Signed-off-by: Alex Marginean <alexm.osslist@gmail.com>
>>>>>>> ---
>>>>>>>
>>>>>>> Changes in v2:
>>>>>>>             - fixed several comments using wrong API names
>>>>>>>             - dropped dm_ from names of internal functions that don't use udevice *
>>>>>>>             - fixed UCLASS driver name
>>>>>>>             - added missing mdio_unregister in dm_mdio_pre_remove
>>>>>>>             - added a comment on why spaces in names aren't ok
>>>>>>>             - added a comment on how static mdio_read/_write/_reset functions
>>>>>>>             are used
>>>>>>> Changes in v3:
>>>>>>>             - none
>>>>>>
>>>>>>
>>>>>> Not sure if you already noticed this [1] or not, but there may be
>>>>>> something there that you want to incorporate or maybe not.
>>>>>>
>>>>>> Cheers,
>>>>>> -Joe
>>>>>>
>>>>>> [1] - https://patchwork.ozlabs.org/patch/939726/
>>>>>>
>>>>>
>>>>> I didn't notice it, thanks for pointing it out!
>>>>> Apart from the obvious overlap of adding UCLASS_MDIO and code like _post_probe they seem to deal with different needs.
>>>>>
>>>>> Ken, can you please take a look at the patch I sent?  It has a wrapper over phy_connect, but provides no helpers on how the caller would get the PHY ADDR.  Do you want to try pulling the API you add on top of the patch I sent, or do you want me to try?  It looks like it would work with minimal effort.
>>>>>
>>>>> Thank you!
>>>>> Alex
>>>>>
>>>>
>>>> _______________________________________________
>>>> U-Boot mailing list
>>>> U-Boot at lists.denx.de
>>>> https://lists.denx.de/listinfo/u-boot
>>> _______________________________________________
>>> U-Boot mailing list
>>> U-Boot at lists.denx.de
>>> https://lists.denx.de/listinfo/u-boot
>>>
>>
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> https://lists.denx.de/listinfo/u-boot

  reply	other threads:[~2019-07-08 22:17 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-31 16:27 [U-Boot] [PATCH] net: introduce MDIO DM class for MDIO devices Alex Marginean
2019-06-01 11:27 ` Joe Hershberger
2019-06-01 17:16 ` Bin Meng
2019-06-01 18:41   ` Alex Marginean
2019-06-01 18:42   ` Joe Hershberger
2019-06-01 18:44     ` Alex Marginean
2019-06-03  9:47 ` [U-Boot] [PATCH 1/2 v2] " Alex Marginean
2019-06-03  9:47   ` [U-Boot] [PATCH 2/2 v2] test: dm: add MDIO test Alex Marginean
2019-06-03 12:52     ` Bin Meng
2019-06-03 13:02       ` Alex Marginean
2019-06-03 12:52   ` [U-Boot] [PATCH 1/2 v2] net: introduce MDIO DM class for MDIO devices Bin Meng
2019-06-03 16:10   ` [U-Boot] [PATCH 1/2 v3] " Alex Marginean
2019-06-03 16:12     ` [U-Boot] [PATCH 2/2 v3] test: dm: add MDIO test Alex Marginean
2019-06-04  2:20       ` Bin Meng
2019-06-10 20:04       ` Joe Hershberger
2019-07-15 22:51       ` [U-Boot] " Joe Hershberger
2019-06-04  2:18     ` [U-Boot] [PATCH 1/2 v3] net: introduce MDIO DM class for MDIO devices Bin Meng
2019-06-10 20:04     ` Joe Hershberger
2019-06-10 20:25     ` Joe Hershberger
2019-06-11  7:17       ` Alex Marginean
2019-06-11  9:44         ` [U-Boot] [EXT] " Ken Ma
2019-06-11 12:04           ` Alexandru Marginean
2019-06-14 16:55             ` Nevo Hed
2019-06-14 18:26               ` Alex Marginean
2019-07-08 21:40                 ` Joe Hershberger
2019-07-08 22:17                   ` Alex Marginean [this message]
2019-07-15 22:51     ` [U-Boot] " Joe Hershberger

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=ee961abe-88be-9826-55ea-ca77c7e64133@gmail.com \
    --to=alexm.osslist@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox