From: Tony Lindgren Date: Tue, 18 Oct 2005 14:49:33 +0000 (+0300) Subject: ARM: OMAP: Add more RNG registers X-Git-Tag: v2.6.15-omap2~146 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=d99adea74c532b82feff7cf8330849bfb59d19ab;p=linux-2.6-omap-h63xx.git ARM: OMAP: Add more RNG registers Add more RNG registers to allow developing common Linux RNG interface --- diff --git a/drivers/char/omap-rng.c b/drivers/char/omap-rng.c index 86ecd2939eb..a40f999641c 100644 --- a/drivers/char/omap-rng.c +++ b/drivers/char/omap-rng.c @@ -21,17 +21,31 @@ #include #if defined (CONFIG_ARCH_OMAP16XX) -#define RNG_BASE 0xfffe5000 +#define RNG_BASE 0xfffe5000 #endif #if defined (CONFIG_ARCH_OMAP24XX) -#define RNG_BASE 0x480A0000 +#define RNG_BASE 0x480A0000 #endif -#define RNG_OUT_REG 0x00 -#define RNG_STAT_REG 0x04 -#define RNG_REV_REG 0x3c -#define RNG_MASK_REG 0x40 -#define ENTROPY_WORD_COUNT 128 +#define RNG_OUT_REG 0x00 /* Output register */ +#define RNG_STAT_REG 0x04 /* Status register + [0] = STAT_BUSY */ +#define RNG_ALARM_REG 0x24 /* Alarm register + [7:0] = ALARM_COUNTER */ +#define RNG_CONFIG_REG 0x28 /* Configuration register + [11:6] = RESET_COUNT + [5:3] = RING2_DELAY + [2:0] = RING1_DELAY */ +#define RNG_REV_REG 0x3c /* Revision register + [7:0] = REV_NB */ +#define RNG_MASK_REG 0x40 /* Mask and reset register + [2] = IT_EN + [1] = SOFTRESET + [0] = AUTOIDLE */ +#define RNG_SYSSTATUS 0x44 /* System status + [0] = RESETDONE */ + +#define ENTROPY_WORD_COUNT 128 static u32 rng_base = io_p2v(RNG_BASE);