From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Mon, 8 Jun 2020 19:14:04 +0200 Subject: [RESEND PATCH v2 04/11] net: dwc_eth_qos: Make clk_rx and clk_tx optional In-Reply-To: References: <20200512095603.29126-1-david.wu@rock-chips.com> <20200512095603.29126-5-david.wu@rock-chips.com> <78c7def2-0659-6177-e860-bf2f61c2d3c3@denx.de> <6e0a52147c064dc58d32adaf4bea94fe@SFHDAG6NODE3.st.com> <081ae28c-8d65-96c6-e641-cc8290ae0ef3@denx.de> Message-ID: <3b4b3859-bfe4-2165-3a62-289fbd675ae0@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 6/8/20 7:05 PM, Patrick DELAUNAY wrote: > Dear Marek, Hi, >> From: Marek Vasut >> Sent: lundi 8 juin 2020 11:45 >> >> On 6/8/20 11:29 AM, Patrick DELAUNAY wrote: >> [...] >>>>> we don't select the STM32 glue for the correct compatible, I think I >>>>> will push >>>>> >>>>> static const struct udevice_id eqos_ids[] = { >>>>> { >>>>> .compatible = "nvidia,tegra186-eqos", >>>>> .data = (ulong)&eqos_tegra186_config >>>>> }, >>>>> { >>>>> - .compatible = "snps,dwmac-4.20a", >>>>> + .compatible = "st,stm32mp1-dwmac", >>>>> .data = (ulong)&eqos_stm32_config >>>>> }, >>>>> { >>>>> .compatible = "fsl,imx-eqos", >>>>> .data = (ulong)&eqos_imx_config >>>>> }, >>>>> >>>>> { } >>>>> }; >>>>> >>>>> Then you can manage your own glue for rockchip ETH for your compatible. >>>> >>>> You might even want to drop the tegra support on ARM32 , thus save >>>> space by dropping useless code. >>> >>> For information I push 2 patches after this remark: >>> >>> [1] net: dwc_eth_qos: update the compatible supported for STM32 >>> >>> http://patchwork.ozlabs.org/project/uboot/patch/20200514130023.15030-1 >>> -patrick.delaunay at st.com/ >>> >>> [2] net: dwc_eth_qos: add Kconfig option to select supported configuration >>> http://patchwork.ozlabs.org/project/uboot/list/?series=181931 >> >> That's for -next, right ? > > Yes both are for -next. > > It is driver improvement (=code size reduction and cleanup compatible) and no bugfix. I am still not entirely sure whether the ifdeffery is the way to go. I wonder whether we can't rather somehow use the linker-lists to generate a list of compatible strings at runtime (like we do for commands) and then reduce that list to only the compatible strings present in the DT (that's a bit tricky).