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


Groups > linux.kernel > #1197894 > unrolled thread

Re: [PATCH v5] powerpc/rcpm: add RCPM driver

Started byScott Wood <scottwood@freescale.com>
First post2015-08-01 02:50 +0200
Last post2015-08-03 22:30 +0200
Articles 3 — 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 v5] powerpc/rcpm: add RCPM driver Scott Wood <scottwood@freescale.com> - 2015-08-01 02:50 +0200
    Re: [PATCH v5] powerpc/rcpm: add RCPM driver Chenhui Zhao <chenhui.zhao@freescale.com> - 2015-08-03 13:20 +0200
      Re: [PATCH v5] powerpc/rcpm: add RCPM driver Scott Wood <scottwood@freescale.com> - 2015-08-03 22:30 +0200

#1197894 — Re: [PATCH v5] powerpc/rcpm: add RCPM driver

FromScott Wood <scottwood@freescale.com>
Date2015-08-01 02:50 +0200
SubjectRe: [PATCH v5] powerpc/rcpm: add RCPM driver
Message-ID<pSt9T-5yr-5@gated-at.bofh.it>
On Fri, 2015-06-26 at 15:44 +0800, Yuantian.Tang@freescale.com wrote:
> +static void rcpm_v1_set_ip_power(bool enable, u32 *mask)
> +{
> +     if (enable)
> +             setbits32(&rcpm_v1_regs->ippdexpcr, *mask);
> +     else
> +             clrbits32(&rcpm_v1_regs->ippdexpcr, *mask);
> +}
> +
> +static void rcpm_v2_set_ip_power(bool enable, u32 *mask)
> +{
> +     if (enable)
> +             setbits32(&rcpm_v2_regs->ippdexpcr[0], *mask);
> +     else
> +             clrbits32(&rcpm_v2_regs->ippdexpcr[0], *mask);
> +}

Why do these take "u32 *mask" instead of "u32 mask"?

-Scott

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1198749

FromChenhui Zhao <chenhui.zhao@freescale.com>
Date2015-08-03 13:20 +0200
Message-ID<pTlWG-1pW-7@gated-at.bofh.it>
In reply to#1197894

On Sat, Aug 1, 2015 at 8:45 AM, Scott Wood <scottwood@freescale.com> 
wrote:
> On Fri, 2015-06-26 at 15:44 +0800, Yuantian.Tang@freescale.com wrote:
>>  +static void rcpm_v1_set_ip_power(bool enable, u32 *mask)
>>  +{
>>  +     if (enable)
>>  +             setbits32(&rcpm_v1_regs->ippdexpcr, *mask);
>>  +     else
>>  +             clrbits32(&rcpm_v1_regs->ippdexpcr, *mask);
>>  +}
>>  +
>>  +static void rcpm_v2_set_ip_power(bool enable, u32 *mask)
>>  +{
>>  +     if (enable)
>>  +             setbits32(&rcpm_v2_regs->ippdexpcr[0], *mask);
>>  +     else
>>  +             clrbits32(&rcpm_v2_regs->ippdexpcr[0], *mask);
>>  +}
> 
> Why do these take "u32 *mask" instead of "u32 mask"?
> 
> -Scott

I think it can be used in the case where there are several mask values.

-Chenhui

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1199245

FromScott Wood <scottwood@freescale.com>
Date2015-08-03 22:30 +0200
Message-ID<pTuwX-5lZ-9@gated-at.bofh.it>
In reply to#1198749
On Mon, 2015-08-03 at 19:14 +0800, Chenhui Zhao wrote:
> On Sat, Aug 1, 2015 at 8:45 AM, Scott Wood <scottwood@freescale.com> 
> wrote:
> > On Fri, 2015-06-26 at 15:44 +0800,  Yuantian.Tang@freescale.comwrote:
> > >  +static void rcpm_v1_set_ip_power(bool enable, u32 *mask)
> > >  +{
> > >  +     if (enable)
> > >  +             setbits32(&rcpm_v1_regs->ippdexpcr, *mask);
> > >  +     else
> > >  +             clrbits32(&rcpm_v1_regs->ippdexpcr, *mask);
> > >  +}
> > >  +
> > >  +static void rcpm_v2_set_ip_power(bool enable, u32 *mask)
> > >  +{
> > >  +     if (enable)
> > >  +             setbits32(&rcpm_v2_regs->ippdexpcr[0], *mask);
> > >  +     else
> > >  +             clrbits32(&rcpm_v2_regs->ippdexpcr[0], *mask);
> > >  +}
> > 
> > Why do these take "u32 *mask" instead of "u32 mask"?
> > 
> > -Scott
> 
> I think it can be used in the case where there are several mask values.

When would that be?

-Scott

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web