[PATCH 4/8] net: dwc_eth_qos: Move interface() to eqos_ops struct
david.wu at rock-chips.com
Sat May 9 05:22:23 CEST 2020
在 2020/5/1 上午6:39, Stephen Warren 写道:
> On 4/30/20 4:36 AM, David Wu wrote:
>> After moving to eqos_ops, if eqos_config is defined
>> outside, can not export interface() definition.
> Looking at the patch itself, I think this patch just moves a function
> pointer from the config to the ops structure which makes sense. However,
> I can't understand the patch description at all, so I worry there's
> intended to be some other justification/implication for this patch, and
> that may not be correct...
> In particular, defined outside of what, and what does this have to do
> with exporting things
Yes, if define eqos_config structure in gmac_rockchip.c, need to export
an eqos_get_interface function, or redefine a similar function in
gmac_rockchip.c, but this function is the same implementation as
eqos_get_interface_stm32(), so we can share this function. Move
interface() to eqos_ops structure, no need to export interface() in the
head file. I lost a patch to define eqos_ops structure at curent file,
then only exprot eqos_rockchip_ops, so it would be simpler?
More information about the U-Boot