[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACWXhKmmJxWuVWN51jn6fKtJ-2Gntb67hFq77qa7p_F8+WpnVQ@mail.gmail.com>
Date: Sat, 5 Aug 2023 14:14:07 +0800
From: Feiyang Chen <chris.chenfeiyang@...il.com>
To: Jose Abreu <Jose.Abreu@...opsys.com>
Cc: Feiyang Chen <chenfeiyang@...ngson.cn>, "andrew@...n.ch" <andrew@...n.ch>,
"hkallweit1@...il.com" <hkallweit1@...il.com>, "peppe.cavallaro@...com" <peppe.cavallaro@...com>,
"alexandre.torgue@...s.st.com" <alexandre.torgue@...s.st.com>,
"chenhuacai@...ngson.cn" <chenhuacai@...ngson.cn>, "linux@...linux.org.uk" <linux@...linux.org.uk>,
"dongbiao@...ngson.cn" <dongbiao@...ngson.cn>,
"loongson-kernel@...ts.loongnix.cn" <loongson-kernel@...ts.loongnix.cn>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"loongarch@...ts.linux.dev" <loongarch@...ts.linux.dev>
Subject: Re: [PATCH v3 00/16] stmmac: Add Loongson platform support
On Sat, Aug 5, 2023 at 1:26 AM Jose Abreu <Jose.Abreu@...opsys.com> wrote:
>
> From: Feiyang Chen <chenfeiyang@...ngson.cn>
> Date: Thu, Aug 03, 2023 at 12:28:02
>
> > Extend stmmac functions and macros for Loongson DWMAC.
> > Add LS7A support for dwmac_loongson.
> >
> > v2 -> v3:
> > * Avoid macros accessing variables that are not passed to them.
> > * Implement a new struct to support 64-bit DMA.
> > * Use feature names rather than 'lgmac' and 'dwmac_is_loongson'.
>
> This is still mixing up with HWIF.
>
> As I tried to highlight before, if you are using a custom IP,
> you need custom callbacks.
>
> As far as I saw, you are mixing dwmac1000_core with
> Loongson registers, which is not what I believe is the best approach.
>
Hi, Jose,
The problem we encounter is that we have three different layouts of
register maps. To avoid mixing up with HWIF, we should use three sets
of callbacks with rather similar logic. Maybe I can extract the common
code blocks to functions, create two additional sets of callbacks,
namely dwmac1000_loongson and dwmac1000_loongson64, and then have the
three sets share these functions?
> I understand that stmmac is confusing and needs a lot of revamp.
> Perhaps we can switch to regmaps first? This way you would have
> a lot more flexibility.
>
If we switch to regmaps, we still need three sets, and I think I need
to revamp more :)
Thanks,
Feiyang
> Thanks,
> Jose
Powered by blists - more mailing lists