changeset 3984:1002c8b10b95

efm32: enable the hwrand driver
author Alexandre Becoulet <alexandre.becoulet@free.fr>
date Mon, 09 Jul 2018 18:33:59 +0200
parents 299a6003abef
children 320f8022fc89
files arch/efm32/boards/stk3x00_678.c arch/efm32/efm32.build
diffstat 2 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/arch/efm32/boards/stk3x00_678.c	Mon Jul 09 18:32:56 2018 +0200
+++ b/arch/efm32/boards/stk3x00_678.c	Mon Jul 09 18:33:59 2018 +0200
@@ -97,6 +97,15 @@
 
 #endif
 
+
+#ifdef CONFIG_DRIVER_EFM32_HWRAND
+DEV_DECLARE_STATIC(hwrand_dev, "hwrand", 0, efm32_hwrand_drv,
+                   DEV_STATIC_RES_MEM(0x400c8000, 0x400c8400), /* CMU */
+                   DEV_STATIC_RES_MEM(0x40080000, 0x40080400)  /* RTC */
+                   );
+#endif
+
+
 #ifdef CONFIG_DRIVER_EFM32_RECMU
 
 DEV_DECLARE_STATIC(recmu_dev, "recmu", 0, efm32_recmu_drv,
@@ -107,6 +116,10 @@
                    DEV_STATIC_RES_DEV_ICU("/cpu"),
                    DEV_STATIC_RES_IRQ(0, EFM32_IRQ_CMU, DEV_IRQ_SENSE_RISING_EDGE, 0, 1),
 
+#ifdef CONFIG_DRIVER_EFM32_HWRAND
+                   DEV_STATIC_RES_DEV_PARAM("after", "/hwrand"),
+#endif
+
                    /* config 0: run on HFRCO @ 14Mhz */
                    DEV_STATIC_RES_CMU_MUX(EFM32_CLOCK_LFRCO, EFM32_CLOCK_LFACLK, 0b0111, 1, 1),
                    DEV_STATIC_RES_CMU_MUX(EFM32_CLOCK_HFRCO, EFM32_CLOCK_HFCLK,  0b0011, 1, 1),
--- a/arch/efm32/efm32.build	Mon Jul 09 18:32:56 2018 +0200
+++ b/arch/efm32/efm32.build	Mon Jul 09 18:33:59 2018 +0200
@@ -39,6 +39,7 @@
   CONFIG_DRIVER_EFM32_AES
   CONFIG_DRIVER_EFM32_DMA
   CONFIG_DRIVER_EFM32_I2C
+  CONFIG_DRIVER_EFM32_HWRAND
 
   %subsection debug
     CONFIG_CPU_ARM32M_MPU_STACK_GUARD