u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: Yanhong Wang <yanhong.wang@starfivetech.com>
Cc: u-boot@lists.denx.de, Rick Chen <rick@andestech.com>,
	Leo <ycliang@andestech.com>,
	 Joe Hershberger <joe.hershberger@ni.com>,
	Ramon Fried <rfried.dev@gmail.com>
Subject: Re: [PATCH v2 2/5] net: dwc_eth_qos: Add StarFive ethernet driver glue layer
Date: Thu, 30 Mar 2023 09:02:27 +1300	[thread overview]
Message-ID: <CAPnjgZ3E1BDRsiVERam2=Ao73k6VWXziuJXvZOsit5dX+hGGAQ@mail.gmail.com> (raw)
In-Reply-To: <20230329102720.25439-3-yanhong.wang@starfivetech.com>

Hi Yanhong,

On Wed, 29 Mar 2023 at 23:29, Yanhong Wang
<yanhong.wang@starfivetech.com> wrote:
>
> The StarFive ETHQOS hardware has its own clock and reset,so add a
> corresponding glue driver to configure them.
>
> Signed-off-by: Yanhong Wang <yanhong.wang@starfivetech.com>
> ---
>  drivers/net/Kconfig                |   7 +
>  drivers/net/Makefile               |   1 +
>  drivers/net/dwc_eth_qos.c          |   6 +
>  drivers/net/dwc_eth_qos.h          |   1 +
>  drivers/net/dwc_eth_qos_starfive.c | 249 +++++++++++++++++++++++++++++
>  5 files changed, 264 insertions(+)
>  create mode 100644 drivers/net/dwc_eth_qos_starfive.c
>

[..]

> +static struct eqos_ops eqos_jh7110_ops = {
> +       .eqos_inval_desc = eqos_inval_desc_generic,
> +       .eqos_flush_desc = eqos_flush_desc_generic,
> +       .eqos_inval_buffer = eqos_inval_buffer_generic,
> +       .eqos_flush_buffer = eqos_flush_buffer_generic,
> +       .eqos_probe_resources = eqos_probe_resources_jh7110,
> +       .eqos_remove_resources = eqos_remove_resources_jh7110,
> +       .eqos_stop_resets = eqos_stop_resets_jh7110,
> +       .eqos_start_resets = eqos_start_resets_jh7110,
> +       .eqos_stop_clks = eqos_stop_clks_jh7110,
> +       .eqos_start_clks = eqos_start_clks_jh7110,
> +       .eqos_calibrate_pads = eqos_null_ops,
> +       .eqos_disable_calibration = eqos_null_ops,
> +       .eqos_set_tx_clk_speed = eqos_set_tx_clk_speed_jh7110,
> +       .eqos_get_enetaddr = eqos_null_ops,
> +       .eqos_get_tick_clk_rate = eqos_get_tick_clk_rate_jh7110
> +};

What is eqos_ops? Why is this layer needed in U-Boot?

Can you not use driver model directly?

Regards,
Simon

  reply	other threads:[~2023-03-29 20:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-29 10:27 [PATCH v2 0/5] Add ethernet driver for StarFive JH7110 SoC Yanhong Wang
2023-03-29 10:27 ` [PATCH v2 1/5] net: phy: Add driver for Motorcomm yt8531 gigabit ethernet phy Yanhong Wang
2023-04-02  7:36   ` Ramon Fried
2023-03-29 10:27 ` [PATCH v2 2/5] net: dwc_eth_qos: Add StarFive ethernet driver glue layer Yanhong Wang
2023-03-29 20:02   ` Simon Glass [this message]
2023-03-30  2:03     ` yanhong wang
2023-03-29 10:27 ` [PATCH v2 3/5] riscv: dts: jh7110: Add ethernet device tree nodes Yanhong Wang
2023-03-29 10:27 ` [PATCH v2 4/5] riscv: dts: starfive: Add phy clock delay configuration for StarFive VisionFive2 board Yanhong Wang
2023-03-29 10:27 ` [PATCH v2 5/5] configs: starfive: Enable ethernet configuration for StarFive VisionFive 2 Yanhong Wang

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='CAPnjgZ3E1BDRsiVERam2=Ao73k6VWXziuJXvZOsit5dX+hGGAQ@mail.gmail.com' \
    --to=sjg@chromium.org \
    --cc=joe.hershberger@ni.com \
    --cc=rfried.dev@gmail.com \
    --cc=rick@andestech.com \
    --cc=u-boot@lists.denx.de \
    --cc=yanhong.wang@starfivetech.com \
    --cc=ycliang@andestech.com \
    /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;
as well as URLs for NNTP newsgroup(s).