[PATCH v2 03/14] clk: mtmips: add clock driver for MediaTek MT7621 SoC

Sean Anderson seanga2 at gmail.com
Fri Dec 31 03:30:36 CET 2021

On 12/27/21 3:06 AM, Weijie Gao wrote:
> On Wed, 2021-12-15 at 11:11 -0500, Sean Anderson wrote:

>> It is fine to implement only the necessary functionality, but it
>> should
>> be done in a way which is easy to extend in the future, and which
>> won't
>> cause us compatibility problems.
>> Generally, I would like to preserve both source and binary
>> compatibility
>> with Linux where possible. I am not sure whether they are hard
>> requirements, so I made a post regarding that question [1]. For now,
>> addressing my above comments will be fine.
> I agreed.
> But now I decide to write a simple driver which provides only the bus
> clock. It seems that I don't have much time for rewrite the full clock
> driver at present.

Well, all you have to do is something like

switch (clk->id) {
case MT7621_CLK_TIMER:
     mask = CLKCFG1_TIMER;
/* etc */

or use an array if you like that style better.


More information about the U-Boot mailing list