Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1478947
| From | Meng Yi <meng.yi@nxp.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [PATCH] clocksource/fsl: Fix errata A-007728 for flextimer |
| Date | 2016-09-08 11:10 +0200 |
| Message-ID | <sf3vk-3RO-29@gated-at.bofh.it> (permalink) |
| References | <sf10t-2cU-5@gated-at.bofh.it> <sf10t-2cU-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> > drivers/clocksource/fsl_ftm_timer.c | 9 ++++-----
> > 1 file changed, 4 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/clocksource/fsl_ftm_timer.c
> > b/drivers/clocksource/fsl_ftm_timer.c index 738515b..ade26e5 100644
> > --- a/drivers/clocksource/fsl_ftm_timer.c
> > +++ b/drivers/clocksource/fsl_ftm_timer.c
> > @@ -83,11 +83,10 @@ static inline void ftm_counter_disable(void
> > __iomem
> > *base)
> >
> > static inline void ftm_irq_acknowledge(void __iomem *base) {
> > - u32 val;
> > -
> > - val = ftm_readl(base + FTM_SC);
> > - val &= ~FTM_SC_TOF;
> > - ftm_writel(val, base + FTM_SC);
> > + /*read and clean the FTM_SC_TOF bit until its cleared*/
> > + while (FTM_SC_TOF & ftm_readl(base + FTM_SC))
> > + ftm_writel(ftm_readl(base + FTM_SC) & (~FTM_SC_TOF),
> > + base + FTM_SC);
> > }
>
> So you are essentially polling hardware in interrupt context. Please add a
> sensible timeout to abort this loop in case of defective hardware, and maybe
> disable the interrupt in that case.
>
Oh, right. Thank for your comments. I will correct that in next version.
Best regards,
Meng
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH] clocksource/fsl: Fix errata A-007728 for flextimer Alexander Stein <alexander.stein@systec-electronic.com> - 2016-09-08 08:30 +0200 RE: [PATCH] clocksource/fsl: Fix errata A-007728 for flextimer Meng Yi <meng.yi@nxp.com> - 2016-09-08 11:10 +0200
csiph-web