lkml.org 
[lkml]   [2021]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v10 3/7] [v10, 3/7]: soc: mediatek: SVS: introduce MTK SVS engine
From
Date
Hi Nicolas,

[snip]
> >
> > > +
> > > + /* Svs efuse parsing */
> > > + ft_pgm = (svsp->efuse[0] >> 4) & GENMASK(3, 0);
> > > +
> > > + for (idx = 0; idx < svsp->bank_num; idx++) {
> > > + svsb = &svsp->banks[idx];
> > > +
> > > + if (ft_pgm <= 1)
> > > + svsb->init01_volt_flag = SVSB_INIT01_VOLT_IGNORE;
> > > +
> > > + switch (svsb->sw_id) {
> > > + case SVSB_CPU_LITTLE:
> > > + svsb->bdes = svsp->efuse[16] & GENMASK(7, 0);
> > > + svsb->mdes = (svsp->efuse[16] >> 8) & GENMASK(7, 0);
> > > + svsb->dcbdet = (svsp->efuse[16] >> 16) & GENMASK(7, 0);
> > > + svsb->dcmdet = (svsp->efuse[16] >> 24) & GENMASK(7, 0);
> > > + svsb->mtdes = (svsp->efuse[17] >> 16) & GENMASK(7, 0);
> >
> > Again, if all of those values were u8, there'd be no need for these GENMASK
>
> Ok, I'll use u8 instead of GENMASK. Thanks.

After refining the codes, I think it's much explicit to assign the bits
I want by GENMASK() and will remove other GENMASK() that are repetitive
like in svs_set_bank_phase() or svs_set_freqs_pct_v2().

[snip]

\
 
 \ /
  Last update: 2021-01-06 09:43    [W:2.067 / U:0.640 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site