From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Wu Date: Mon, 11 May 2020 15:07:31 +0800 Subject: [PATCH v2 09/11] net: dwc_eth_qos: Add eqos_rockchip_ops In-Reply-To: <20200511070041.12254-1-david.wu@rock-chips.com> References: <20200511070041.12254-1-david.wu@rock-chips.com> Message-ID: <20200511070731.12735-1-david.wu@rock-chips.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de The eqos_rockchip_ops is simillar to eqos_stm32_ops, and export the eqos_rockchip_ops to use. Signed-off-by: David Wu --- Changes in v2: - None drivers/net/dwc_eth_qos.c | 16 ++++++++++++++++ drivers/net/dwc_eth_qos.h | 2 ++ 2 files changed, 18 insertions(+) diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c index d6c0622de6..7453b92f40 100644 --- a/drivers/net/dwc_eth_qos.c +++ b/drivers/net/dwc_eth_qos.c @@ -1907,6 +1907,22 @@ static const struct eqos_config eqos_stm32_config = { .ops = &eqos_stm32_ops }; +struct eqos_ops eqos_rockchip_ops = { + .eqos_inval_desc = eqos_inval_desc_stm32, + .eqos_flush_desc = eqos_flush_desc_stm32, + .eqos_inval_buffer = eqos_inval_buffer_stm32, + .eqos_flush_buffer = eqos_flush_buffer_stm32, + .eqos_probe_resources = eqos_probe_resources_stm32, + .eqos_remove_resources = eqos_remove_resources_stm32, + .eqos_stop_resets = eqos_stop_resets_stm32, + .eqos_start_resets = eqos_start_resets_stm32, + .eqos_calibrate_pads = eqos_calibrate_pads_stm32, + .eqos_disable_calibration = eqos_disable_calibration_stm32, + .eqos_set_tx_clk_speed = eqos_set_tx_clk_speed_stm32, + .eqos_get_tick_clk_rate = eqos_get_tick_clk_rate_stm32, + .eqos_get_interface = eqos_get_interface_stm32 +}; + static const struct udevice_id eqos_ids[] = { { .compatible = "nvidia,tegra186-eqos", diff --git a/drivers/net/dwc_eth_qos.h b/drivers/net/dwc_eth_qos.h index 3125a301f0..def2706271 100644 --- a/drivers/net/dwc_eth_qos.h +++ b/drivers/net/dwc_eth_qos.h @@ -84,4 +84,6 @@ int eqos_recv(struct udevice *dev, int flags, uchar **packetp); int eqos_free_pkt(struct udevice *dev, uchar *packet, int length); int eqos_write_hwaddr(struct udevice *dev); +extern struct eqos_ops eqos_rockchip_ops; + #endif -- 2.19.1