]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: Add more RNG registers
authorTony Lindgren <tony@atomide.com>
Tue, 18 Oct 2005 14:49:33 +0000 (17:49 +0300)
committerTony Lindgren <tony@atomide.com>
Tue, 18 Oct 2005 14:49:33 +0000 (17:49 +0300)
Add more RNG registers to allow developing common Linux RNG interface

drivers/char/omap-rng.c

index 86ecd2939eb2f82d280e3aa57c6948a2b8ac3361..a40f999641cb1e951e285876f6b0d83f8bfea497 100644 (file)
 #include <asm/hardware/clock.h>
 
 #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);