rng.h 996 B

1234567891011121314151617181920212223242526272829303132333435
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * RNG Memory Map
  4. *
  5. * Copyright (C) 2004-2008 Freescale Semiconductor, Inc.
  6. * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
  7. */
  8. #ifndef __RNG_H__
  9. #define __RNG_H__
  10. /* Random Number Generator */
  11. typedef struct rng_ctrl {
  12. u32 cr; /* 0x00 Control */
  13. u32 sr; /* 0x04 Status */
  14. u32 er; /* 0x08 Entropy */
  15. u32 out; /* 0x0C Output FIFO */
  16. } rng_t;
  17. #define RNG_CR_SLM (0x00000010) /* Sleep mode - 5445x */
  18. #define RNG_CR_CI (0x00000008) /* Clear interrupt */
  19. #define RNG_CR_IM (0x00000004) /* Interrupt mask */
  20. #define RNG_CR_HA (0x00000002) /* High assurance */
  21. #define RNG_CR_GO (0x00000001) /* Go bit */
  22. #define RNG_SR_OFS(x) (((x) & 0x000000FF) << 16)
  23. #define RNG_SR_OFS_MASK (0xFF00FFFF)
  24. #define RNG_SR_OFL(x) (((x) & 0x000000FF) << 8)
  25. #define RNG_SR_OFL_MASK (0xFFFF00FF)
  26. #define RNG_SR_EI (0x00000008)
  27. #define RNG_SR_FUF (0x00000004)
  28. #define RNG_SR_LRS (0x00000002)
  29. #define RNG_SR_SV (0x00000001)
  30. #endif /* __RNG_H__ */