From 1814af1563a90d35a6fa12c8dedf2e8e47374cde Mon Sep 17 00:00:00 2001 From: Marcel Telka Date: Fri, 11 Oct 2002 10:48:24 +0000 Subject: [PATCH] Replaced constants with macros. git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@175 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- include/arm/sa11x0/pm.h | 6 +++--- include/arm/sa11x0/ssp.h | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/arm/sa11x0/pm.h b/include/arm/sa11x0/pm.h index 466a0682..75d1ff42 100644 --- a/include/arm/sa11x0/pm.h +++ b/include/arm/sa11x0/pm.h @@ -95,10 +95,10 @@ typedef volatile struct PM_registers { #define PCFR_FP bit(1) #define PCFR_OPDE bit(0) -/* PPCR bits */ +/* PPCR bits - see 9.5.7.3 in [1] */ -#define PPCR_CCF_MASK 0x1F -#define PPCR_CCF(x) (x & PPCR_CCF_MASK) +#define PPCR_CCF_MASK bits(4,0) +#define PPCR_CCF(x) bits_val(4,0,x) #define PPCR_CCF_59_0 PPCR_CCF(0x00) #define PPCR_CCF_73_7 PPCR_CCF(0x01) diff --git a/include/arm/sa11x0/ssp.h b/include/arm/sa11x0/ssp.h index f6d7e2c1..086abcf3 100644 --- a/include/arm/sa11x0/ssp.h +++ b/include/arm/sa11x0/ssp.h @@ -74,15 +74,15 @@ typedef volatile struct SSP_registers { #define SSDR_OFFSET 0x0C #define SSSR_OFFSET 0x14 -/* SSCR0 bits */ +/* SSCR0 bits - see 11.12.9 */ -#define SSCR0_SCR_MASK 0xFF00 -#define SSCR0_SCR(x) ((x << 8) & SSCR0_SCR_MASK) +#define SSCR0_SCR_MASK bits(15,8) +#define SSCR0_SCR(x) bits_val(15,8,x) #define SSCR0_SSE bit(7) -#define SSCR0_FRF_MASK 0x0030 -#define SSCR0_FRF(x) ((x << 4) & SSCR0_FRF_MASK) -#define SSCR0_DSS_MASK 0x000F -#define SSCR0_DSS(x) (x & SSCR0_DSS_MASK) +#define SSCR0_FRF_MASK bits(5,4) +#define SSCR0_FRF(x) bits_val(5,4,x) +#define SSCR0_DSS_MASK bits(3,0) +#define SSCR0_DSS(x) bits_val(3,0,x) /* SSCR1 bits */