[PATCH 06/31] net: mediatek: use a struct to cover variations of all SoCs
Simon Glass
sjg at chromium.org
Thu Aug 4 15:56:58 CEST 2022
Hi Weijie,
On Wed, 3 Aug 2022 at 21:36, Weijie Gao <weijie.gao at mediatek.com> wrote:
>
> Using a single soc id to control different initialization and TX/RX flow
> for all SoCs is not extensible if more hardware variations are added in
> the future.
>
> This patch introduces a struct to replace the original mtk_soc to allow
> the driver be able handle newer hardwares.
>
> Signed-off-by: Weijie Gao <weijie.gao at mediatek.com>
> ---
> drivers/net/mtk_eth.c | 50 +++++++++++++++++++++++++++++--------------
> drivers/net/mtk_eth.h | 25 +++++++++++++++++++++-
> 2 files changed, 58 insertions(+), 17 deletions(-)
Reviewed-by: Simon Glass <sjg at chromium.org>
>
> diff --git a/drivers/net/mtk_eth.c b/drivers/net/mtk_eth.c
> index 4fe7ee0d36..92d2ea4f2a 100644
> --- a/drivers/net/mtk_eth.c
> +++ b/drivers/net/mtk_eth.c
> @@ -142,11 +142,9 @@ enum mtk_switch {
> SW_MT7531
> };
>
> -enum mtk_soc {
> - SOC_MT7623,
> - SOC_MT7629,
> - SOC_MT7622,
> - SOC_MT7621
> +struct mtk_soc_data {
> + u32 caps;
> + u32 ana_rgc3;
please comment these
[..]
Regards,
Simon
More information about the U-Boot
mailing list