]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/arm/mach-omap2/id.c
Merge remote-tracking branch 'arm-soc/for-next'
[karo-tx-linux.git] / arch / arm / mach-omap2 / id.c
index 0289adcb6efb8dbc1f718a4e38a867afba414cfc..9428c5f9d4f2faa47e91a2caa193ecf39bba39fb 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/io.h>
+#include <linux/random.h>
 #include <linux/slab.h>
 
 #ifdef CONFIG_SOC_BUS
@@ -130,6 +131,17 @@ void omap_get_die_id(struct omap_die_id *odi)
        odi->id_3 = read_tap_reg(OMAP_TAP_DIE_ID_3);
 }
 
+static int __init omap_feed_randpool(void)
+{
+       struct omap_die_id odi;
+
+       /* Throw the die ID into the entropy pool at boot */
+       omap_get_die_id(&odi);
+       add_device_randomness(&odi, sizeof(odi));
+       return 0;
+}
+omap_device_initcall(omap_feed_randpool);
+
 void __init omap2xxx_check_revision(void)
 {
        int i, j;
@@ -576,8 +588,8 @@ void __init omap5xxx_check_revision(void)
        case 0xb942:
                switch (rev) {
                case 0:
-                       omap_revision = OMAP5430_REV_ES1_0;
-                       break;
+                       /* No support for ES1.0 Test chip */
+                       BUG();
                case 1:
                default:
                        omap_revision = OMAP5430_REV_ES2_0;
@@ -587,8 +599,8 @@ void __init omap5xxx_check_revision(void)
        case 0xb998:
                switch (rev) {
                case 0:
-                       omap_revision = OMAP5432_REV_ES1_0;
-                       break;
+                       /* No support for ES1.0 Test chip */
+                       BUG();
                case 1:
                default:
                        omap_revision = OMAP5432_REV_ES2_0;