at91_eefc.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. #ifndef _ARCH_ARM_AT91_EEFC_H_
  2. #define _ARCH_ARM_AT91_EEFC_H_
  3. /*
  4. * Copyright (C) 2010 by egnite GmbH
  5. *
  6. * All rights reserved.
  7. *
  8. * Redistribution and use in source and binary forms, with or without
  9. * modification, are permitted provided that the following conditions
  10. * are met:
  11. *
  12. * 1. Redistributions of source code must retain the above copyright
  13. * notice, this list of conditions and the following disclaimer.
  14. * 2. Redistributions in binary form must reproduce the above copyright
  15. * notice, this list of conditions and the following disclaimer in the
  16. * documentation and/or other materials provided with the distribution.
  17. * 3. Neither the name of the copyright holders nor the names of
  18. * contributors may be used to endorse or promote products derived
  19. * from this software without specific prior written permission.
  20. *
  21. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  22. * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  24. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  25. * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  26. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  27. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  28. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  29. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  30. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  31. * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  32. * SUCH DAMAGE.
  33. *
  34. * For additional information see http://www.ethernut.de/
  35. */
  36. /*!
  37. * \file arch/arm/at91_eefc.h
  38. * \brief AT91 peripherals.
  39. *
  40. * \verbatim
  41. * $Id$
  42. * \endverbatim
  43. */
  44. /*!
  45. * \addtogroup xgNutArchArmAt91Eefc
  46. */
  47. /*@{*/
  48. /*! \name EEFC Flash Mode Register */
  49. /*@{*/
  50. #define EEFC_FMR_OFF 0x00000000 /*!< \brief Mode register offset. */
  51. #define EEFC_FMR (EEFC_BASE + EEFC_FMR_OFF) /*!< \brief Mode register address. */
  52. #define EEFC_FWS 0x00000F00 /*!< \brief Flash wait state mask. */
  53. #define EEFC_FWS_LSB 8 /*!< \brief Flash wait state LSB. */
  54. /*@}*/
  55. /*! \name EEFC Flash Command Register */
  56. /*@{*/
  57. #define EEFC_FCR_OFF 0x00000004 /*!< \brief Command register offset. */
  58. #define EEFC_FCR (EEFC_BASE + EEFC_FCR_OFF) /*!< \brief Command register address. */
  59. #define EEFC_FCMD 0x000000FF /*!< \brief Flash command mask. */
  60. #define EEFC_FCMD_GETD 0x00000000 /*!< \brief Get flash descriptor command. */
  61. #define EEFC_FCMD_WP 0x00000001 /*!< \brief Write page command. */
  62. #define EEFC_FCMD_WPL 0x00000002 /*!< \brief Write page and lock command. */
  63. #define EEFC_FCMD_EWP 0x00000003 /*!< \brief Erase and write page command. */
  64. #define EEFC_FCMD_EWPL 0x00000004 /*!< \brief Erase and write page with lock command. */
  65. #define EEFC_FCMD_EA 0x00000005 /*!< \brief Erase all command. */
  66. #define EEFC_FCMD_EPL 0x00000006 /*!< \brief Erase plane command. */
  67. #define EEFC_FCMD_EPA 0x00000007 /*!< \brief Erase pages command. */
  68. #define EEFC_FCMD_SLB 0x00000008 /*!< \brief Set lock bit command. */
  69. #define EEFC_FCMD_CLB 0x00000009 /*!< \brief Clear lock bit command. */
  70. #define EEFC_FCMD_GLB 0x0000000A /*!< \brief Get lock bit command. */
  71. #define EEFC_FCMD_SGPB 0x0000000B /*!< \brief Set GPNVM bit command. */
  72. #define EEFC_FCMD_CGPB 0x0000000C /*!< \brief Clear GPNVM bit command. */
  73. #define EEFC_FCMD_GGPB 0x0000000D /*!< \brief Get GPNVM bit command. */
  74. #define EEFC_FARG 0x00FFFF00 /*!< \brief Flash command argument mask. */
  75. #define EEFC_FARG_LSB 8 /*!< \brief Flash command argument LSB. */
  76. #define EEFC_FKEY 0x5A000000 /*!< \brief Flash write protection key. */
  77. /*@}*/
  78. /*! \name EEFC Flash Status Register */
  79. /*@{*/
  80. #define EEFC_FSR_OFF 0x00000008 /*!< \brief Status register offset. */
  81. #define EEFC_FSR (EEFC_BASE + EEFC_FSR_OFF) /*!< \brief Status register address. */
  82. #define EEFC_FRDY 0x00000001 /*!< \brief Flash ready. */
  83. #define EEFC_FCMDE 0x00000002 /*!< \brief Flash command error. */
  84. #define EEFC_LOCKE 0x00000004 /*!< \brief Flash lock error. */
  85. /*@}*/
  86. /*! \name EEFC Flash Result Register */
  87. /*@{*/
  88. #define EEFC_FRR_OFF 0x0000000C /*!< \brief Result register offset. */
  89. #define EEFC_FRR (EEFC_BASE + EEFC_FRR_OFF) /*!< \brief Result register address. */
  90. /*@}*/
  91. /*! \name EEFC Flash Version Register */
  92. /*@{*/
  93. #define EEFC_FVR_OFF 0x00000010 /*!< \brief Version register offset. */
  94. #define EEFC_FVR (EEFC_BASE + EEFC_FVR_OFF) /*!< \brief Version register address. */
  95. /*@}*/
  96. /*@} xgNutArchArmAt91Eefc */
  97. #endif