board_memorymap.h 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /************************************************************************************
  2. * configs/ea3152/include/board_memorymap.h
  3. * include/arch/board/board_memorymap.h
  4. *
  5. * Copyright (C) 2011 Gregory Nutt. All rights reserved.
  6. * Author: Gregory Nutt <gnutt@nuttx.org>
  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
  16. * the documentation and/or other materials provided with the
  17. * distribution.
  18. * 3. Neither the name NuttX nor the names of its contributors may be
  19. * used to endorse or promote products derived from this software
  20. * without specific prior written permission.
  21. *
  22. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  23. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  24. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  25. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  26. * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  27. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  28. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  29. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  30. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  31. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
  32. * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  33. * POSSIBILITY OF SUCH DAMAGE.
  34. *
  35. ************************************************************************************/
  36. #ifndef __ARCH_BOARD_BOARD_MEMORYMAP_H
  37. #define __ARCH_BOARD_BOARD_MEMORYMAP_H
  38. /* This file should never be included directly, but only indirectly via
  39. * lpc31_memorymap.h.
  40. */
  41. /************************************************************************************
  42. * Included Files
  43. ************************************************************************************/
  44. #include <nuttx/config.h>
  45. /************************************************************************************
  46. * Pre-processor Definitions
  47. ************************************************************************************/
  48. /* If the LPC31xx ROM page table is selected, then the board-logic is required
  49. * to provide:
  50. *
  51. * PGTABLE_BASE_PADDR - The physical address of the page table in ROM,
  52. * PGTABLE_BASE_VADDR - The mapped address of the page table in ROM, and
  53. * Mappings for each of the PSECTIONS in lpc31_memorymap.h
  54. */
  55. #ifdef CONFIG_ARCH_ROMPGTABLE
  56. /* The LPC31xx ROM page table uses a 1-1 physical to virtual memory mapping */
  57. # define LPC31_SHADOWSPACE_VSECTION 0x00000000 /* 0x00000000-0x00000fff: Shadow Area 4Kb */
  58. # define LPC31_INTSRAM_VSECTION 0x11028000 /* Internal SRAM 96Kb-192Kb */
  59. # define LPC31_INTSRAM0_VADDR 0x11028000 /* 0x11028000-0x1103ffff: Internal SRAM 0 96Kb */
  60. # define LPC31_INTSRAM1_VADDR 0x11040000 /* 0x11040000-0x11057fff: Internal SRAM 1 96Kb */
  61. # define LPC31_INTSROM0_VSECTION 0x12000000 /* 0x12000000-0x1201ffff: Internal SROM 0 128Kb */
  62. # define LPC31_APB01_VSECTION 0x13000000 /* 0x13000000-0x1300bfff: APB0 32Kb APB1 16Kb*/
  63. # define LPC31_APB0_VADDR 0x13000000 /* 0x13000000-0x13007fff: APB0 32Kb */
  64. # define LPC31_APB1_VADDR 0x13008000 /* 0x13008000-0x1300bfff: APB1 16Kb */
  65. # define LPC31_APB2_VSECTION 0x15000000 /* 0x15000000-0x15003fff: APB2 16Kb */
  66. # define LPC31_APB3_VSECTION 0x16000000 /* 0x16000000-0x160003ff: APB3 1Kb */
  67. # define LPC31_APB4MPMC_VSECTION 0x17000000 /* 8Kb */
  68. # define LPC31_APB4_VADDR 0x17000000 /* 0x17000000-0x17000fff: APB4 4Kb */
  69. # define LPC31_MPMC_VADDR 0x17008000 /* 0x17008000-0x17008fff: MPMC cfg 4Kb */
  70. # define LPC31_MCI_VSECTION 0x18000000 /* 0x18000000 0x180003ff: MCI/SD/SDIO 1Kb */
  71. # define LPC31_USBOTG_VSECTION 0x19000000 /* 0x19000000-0x19000fff: USB OTG 4Kb */
  72. # define LPC31_EXTSRAM_VSECTION 0x20020000 /* 64-128Kb */
  73. # define LPC31_EXTSRAM0_VADDR 0x20000000 /* 0x20000000-0x2001ffff: External SRAM 0 64-128Kb */
  74. # define LPC31_EXTSRAM1_VADDR 0x20020000 /* 0x20020000-0x2003ffff: External SRAM 1 64-128Kb */
  75. # define LPC31_EXTSDRAM0_VSECTION 0x30000000 /* 0x30000000-0x37ffffff: External SDRAM 0 128Mb */
  76. # define LPC31_INTC_VSECTION 0x60000000 /* 0x60000000-0x60000fff: Interrupt controller 4Kb */
  77. # define LPC31_NAND_VSECTION 0x70000000 /* 0x70000000-0x700007ff: NANDFLASH Ctrl 2Kb */
  78. /* Define the address of the page table within the ROM */
  79. # define ROMPGTABLE_OFFSET 0x0001c000 /* Offset of the ROM page table in ROM */
  80. # define PGTABLE_BASE_PADDR (LPC31_INTSROM0_PSECTION+ROMPGTABLE_OFFSET)
  81. # define PGTABLE_BASE_VADDR (LPC31_INTSROM0_VSECTION+ROMPGTABLE_OFFSET)
  82. #endif
  83. /************************************************************************************
  84. * Public Data
  85. ************************************************************************************/
  86. #ifndef __ASSEMBLY__
  87. #undef EXTERN
  88. #if defined(__cplusplus)
  89. #define EXTERN extern "C"
  90. extern "C" {
  91. #else
  92. #define EXTERN extern
  93. #endif
  94. /************************************************************************************
  95. * Public Function Prototypes
  96. ************************************************************************************/
  97. #undef EXTERN
  98. #if defined(__cplusplus)
  99. }
  100. #endif
  101. #endif /* __ASSEMBLY__ */
  102. #endif /* __ARCH_BOARD_BOARD_MEMORYMAP_H */