From: Russ D. <ru...@us...> - 2003-12-12 02:58:44
|
Update of /cvsroot/blob/blob/include/blob/arch In directory sc8-pr-cvs1:/tmp/cvs-serv30869/include/blob/arch Modified Files: s3c2500-regs.h Log Message: fix some defines for the s3c2500 Index: s3c2500-regs.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/arch/s3c2500-regs.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- s3c2500-regs.h 27 Nov 2003 03:23:24 -0000 1.2 +++ s3c2500-regs.h 12 Dec 2003 02:58:41 -0000 1.3 @@ -20,12 +20,12 @@ /* Get the M value for a speed in MHz a P, and an S */ #define Fin 10 /* The +(Fin - 1) thing is so it rounds up */ -#define PLL_CALC_M(Fout, s, p) \ +#define PLL_CALC_M(Fout, p, s) \ (((p + 2) * (1 << s) * Fout + (Fin - 1)) / Fin - 8) /* get the whole kit-n-kaboodle */ -#define PLL_VALUE(Fout, s, p) \ - (PLL_S(s) | PLL_P(p) | PLL_M(PLL_CALC_M(Fout, s, p))) +#define PLL_VALUE(Fout, p, s) \ + (PLL_S(s) | PLL_P(p) | PLL_M(PLL_CALC_M(Fout, p, s))) /* get the MHz as a number */ @@ -39,12 +39,12 @@ #define GET_MHz(x) \ _GET_MHz(GET_PLL_S(x), GET_PLL_P(x), GET_PLL_M(x)) -/* PLL defines for a 10MHz input */ -#define SPEED_33MHz PLL_VALUE(33, 1, 3) -#define SPEED_48MHz PLL_VALUE(48, 3, 3) -#define SPEED_50HMz PLL_VALUE(50, 1, 3) -#define SPEED_66MHz PLL_VALUE(66, 1, 2) -#define SPEED_96MHz PLL_VALUE(96, 3, 2) +/* PLL defines for a 10MHz input MHz P S */ +#define SPEED_33MHz PLL_VALUE(33, 1, 3) +#define SPEED_48MHz PLL_VALUE(48, 3, 3) +#define SPEED_50HMz PLL_VALUE(50, 1, 3) +#define SPEED_66MHz PLL_VALUE(66, 1, 2) +#define SPEED_96MHz PLL_VALUE(96, 3, 2) #define SPEED_100MHz PLL_VALUE(100, 1, 2) #define SPEED_125MHz PLL_VALUE(125, 1, 1) #define SPEED_133MHz PLL_VALUE(133, 1, 1) @@ -83,7 +83,7 @@ */ #define SYSCFG_BASEB 0x00000000 -#define SYSCFG_BASE (ASIC_BASE + SYSCFGB) +#define SYSCFG_BASE (ASIC_BASE + SYSCFG_BASEB) #define SYSCFG __REG2(SYSCFG_BASE,0x00) /* System configuration */ #define CPLLREN (1 << 31) |