Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1650820 > unrolled thread

Re: [PATCH 2/2] timer: imx-tpm: add imx tpm timer support

Started byArnd Bergmann <arnd@arndb.de>
First post2017-05-25 23:10 +0200
Last post2017-05-31 08:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 2/2] timer: imx-tpm: add imx tpm timer support Arnd Bergmann <arnd@arndb.de> - 2017-05-25 23:10 +0200
    Re: [PATCH 2/2] timer: imx-tpm: add imx tpm timer support Dong Aisheng <dongas86@gmail.com> - 2017-05-31 08:40 +0200

#1650820 — Re: [PATCH 2/2] timer: imx-tpm: add imx tpm timer support

FromArnd Bergmann <arnd@arndb.de>
Date2017-05-25 23:10 +0200
SubjectRe: [PATCH 2/2] timer: imx-tpm: add imx tpm timer support
Message-ID<tL8b8-4Xy-5@gated-at.bofh.it>
On Sat, May 13, 2017 at 9:29 AM, Dong Aisheng <aisheng.dong@nxp.com> wrote:

> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
> index 3356ab8..03dfd6a 100644
> --- a/drivers/clocksource/Kconfig
> +++ b/drivers/clocksource/Kconfig
> @@ -590,6 +590,11 @@ config CLKSRC_IMX_GPT
>         depends on ARM && CLKDEV_LOOKUP
>         select CLKSRC_MMIO
>
> +config CLKSRC_IMX_TPM
> +       bool "Clocksource using i.MX TPM" if COMPILE_TEST
> +       depends on ARM && CLKDEV_LOOKUP && GENERIC_CLOCKEVENTS
> +       select CLKSRC_MMIO
> +

This needs a help text


> +static inline void tpm_timer_disable(void)
> +{
> +       unsigned int val;
> +
> +       /* channel disable */
> +       val = __raw_readl(timer_base + TPM_C0SC);
> +       val &= ~(TPM_C0SC_MODE_MASK | TPM_C0SC_CHIE);
> +       __raw_writel(val, timer_base + TPM_C0SC);
> +}

__raw_readl/__raw_writel is broken on big-endian kernels, please
use readl/writel instead.

        Arnd

[toc] | [next] | [standalone]


#1653874

FromDong Aisheng <dongas86@gmail.com>
Date2017-05-31 08:40 +0200
Message-ID<tN5st-1db-9@gated-at.bofh.it>
In reply to#1650820
Hi Arnd,

On Thu, May 25, 2017 at 11:02:22PM +0200, Arnd Bergmann wrote:
> On Sat, May 13, 2017 at 9:29 AM, Dong Aisheng <aisheng.dong@nxp.com> wrote:
> 
> > diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
> > index 3356ab8..03dfd6a 100644
> > --- a/drivers/clocksource/Kconfig
> > +++ b/drivers/clocksource/Kconfig
> > @@ -590,6 +590,11 @@ config CLKSRC_IMX_GPT
> >         depends on ARM && CLKDEV_LOOKUP
> >         select CLKSRC_MMIO
> >
> > +config CLKSRC_IMX_TPM
> > +       bool "Clocksource using i.MX TPM" if COMPILE_TEST
> > +       depends on ARM && CLKDEV_LOOKUP && GENERIC_CLOCKEVENTS
> > +       select CLKSRC_MMIO
> > +
> 
> This needs a help text
> 

Got it

> 
> > +static inline void tpm_timer_disable(void)
> > +{
> > +       unsigned int val;
> > +
> > +       /* channel disable */
> > +       val = __raw_readl(timer_base + TPM_C0SC);
> > +       val &= ~(TPM_C0SC_MODE_MASK | TPM_C0SC_CHIE);
> > +       __raw_writel(val, timer_base + TPM_C0SC);
> > +}
> 
> __raw_readl/__raw_writel is broken on big-endian kernels, please
> use readl/writel instead.
> 

That's true.

Thanks for the kind reminder.

Regards
Dong Aisheng

>         Arnd

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web