diff mbox

[U-Boot] powerpc: Add accessor macros for TCR[WPEXT] and TCR[FPEXT]

Message ID 1363262105-15406-1-git-send-email-hkronsto@frequentis.com
State Rejected
Delegated to: Wolfgang Denk
Headers show

Commit Message

Horst Kronstorfer March 14, 2013, 11:55 a.m. UTC
Information retrieved from EREF 2.0 (Rev.0 09/2011) pp.107-109.

Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
---
 arch/powerpc/include/asm/processor.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Wolfgang Denk March 14, 2013, 12:33 p.m. UTC | #1
Dear Horst Kronstorfer,

In message <1363262105-15406-1-git-send-email-hkronsto@frequentis.com> you wrote:
> Information retrieved from EREF 2.0 (Rev.0 09/2011) pp.107-109.
> 
> Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
> ---
>  arch/powerpc/include/asm/processor.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h
> index 8c91f08..85bb9ed 100644
> --- a/arch/powerpc/include/asm/processor.h
> +++ b/arch/powerpc/include/asm/processor.h
> @@ -399,6 +399,8 @@
>  #define     FP_2_21		3		/* 2^21 clocks */
>  #define   TCR_FIE		0x00800000	/* FIT Interrupt Enable */
>  #define   TCR_ARE		0x00400000	/* Auto Reload Enable */
> +#define   TCR_WPEXT(x)		(((x)&0xf)<<17)	/* WDT Period Extension */
> +#define   TCR_FPEXT(x)		(((x)&0xf)<<13)	/* FIT Period Extension */

Are these defines actually used anywhere, or are you just adding dead
code?

Probably the latter, as I don't remember any compile errors with such
names?

Best regards,

Wolfgang Denk
Wolfgang Denk March 14, 2013, 2 p.m. UTC | #2
Dear KRONSTORFER Horst,

In message <024FE3275EF7814D9B07390F28C0832C704F57D8@vie196nt> you wrote:
>
> > > +#define   TCR_WPEXT(x)		(((x)&0xf)<<17)	/* WDT Period Extension */
> > > +#define   TCR_FPEXT(x)		(((x)&0xf)<<13)	/* FIT Period Extension */
> > 
> > Are these defines actually used anywhere, or are you just adding dead
> > code?
> 
> i'm currently working on setting up/enabling the e500 wdt ...
> probably should have sent it in the according series.

Indeed.

[And please don't full-quote].

Thanks.

Wolfgang Denk
diff mbox

Patch

diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h
index 8c91f08..85bb9ed 100644
--- a/arch/powerpc/include/asm/processor.h
+++ b/arch/powerpc/include/asm/processor.h
@@ -399,6 +399,8 @@ 
 #define     FP_2_21		3		/* 2^21 clocks */
 #define   TCR_FIE		0x00800000	/* FIT Interrupt Enable */
 #define   TCR_ARE		0x00400000	/* Auto Reload Enable */
+#define   TCR_WPEXT(x)		(((x)&0xf)<<17)	/* WDT Period Extension */
+#define   TCR_FPEXT(x)		(((x)&0xf)<<13)	/* FIT Period Extension */
 #define SPRN_THRM1	0x3FC	/* Thermal Management Register 1 */
 #define   THRM1_TIN		(1<<0)
 #define   THRM1_TIV		(1<<1)