partition_define_mlc.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. #ifndef __PARTITION_DEFINE_H__
  2. #define __PARTITION_DEFINE_H__
  3. #define KB (1024)
  4. #define MB (1024 * KB)
  5. #define GB (1024 * MB)
  6. #define PART_PRELOADER "PRELOADER"
  7. #define PART_PRO_INFO "PRO_INFO"
  8. #define PART_NVRAM "NVRAM"
  9. #define PART_PROTECT_F "PROTECT_F"
  10. #define PART_PROTECT_S "PROTECT_S"
  11. #define PART_SECCFG "SECCFG"
  12. #define PART_UBOOT "UBOOT"
  13. #define PART_BOOTIMG "BOOTIMG"
  14. #define PART_RECOVERY "RECOVERY"
  15. #define PART_SEC_RO "SEC_RO"
  16. #define PART_MISC "MISC"
  17. #define PART_FRP "FRP"
  18. #define PART_LOGO "LOGO"
  19. #define PART_EXPDB "EXPDB"
  20. #define PART_FAT "FAT"
  21. #define PART_ANDROID "ANDROID"
  22. #define PART_CACHE "CACHE"
  23. #define PART_NVDATA "NVDATA"
  24. #define PART_USRDATA "USRDATA"
  25. #define PART_BMTPOOL "BMTPOOL"
  26. /*preloader re-name*/
  27. #define PART_SECURE "SECURE"
  28. #define PART_SECSTATIC "SECSTATIC"
  29. #define PART_ANDSYSIMG "ANDSYSIMG"
  30. #define PART_USER "USER"
  31. /*Uboot re-name*/
  32. #define PART_APANIC "APANIC"
  33. #define PART_FLAG_NONE 0
  34. #define PART_FLAG_LEFT 0x1
  35. #define PART_FLAG_END 0x2
  36. #define PART_MAGIC 0x58881688
  37. #if defined(CONFIG_MTK_MLC_NAND_SUPPORT)
  38. #define PART_SIZE_BMTPOOL (480*1024*1024)
  39. #else
  40. #define PART_SIZE_BMTPOOL (14*1024*1024)
  41. #endif
  42. #if 0
  43. #ifdef CONFIG_MTK_EMMC_SUPPORT
  44. #define PART_SIZE_SECCFG (128*KB)
  45. #define PART_OFFSET_SECCFG (0x2900000)
  46. #define PART_SIZE_SEC_RO (256*KB)
  47. #define PART_OFFSET_SEC_RO (0x3780000)
  48. #else
  49. #define PART_SIZE_SECCFG (256*KB)
  50. #define PART_OFFSET_SECCFG (0xb00000)
  51. #define PART_SIZE_SEC_RO (256*KB)
  52. #define PART_OFFSET_SEC_RO (0x19c0000)
  53. #endif
  54. #else
  55. #define PART_SIZE_SECCFG 0
  56. #define PART_OFFSET_SECCFG 0
  57. #define PART_SIZE_SEC_RO 0
  58. #define PART_OFFSET_SEC_RO 0
  59. #endif
  60. #ifndef RAND_START_ADDR
  61. #define RAND_START_ADDR 1024
  62. #endif
  63. #define PART_MAX_COUNT 40
  64. #define WRITE_SIZE_Byte (16*1024)
  65. typedef enum {
  66. EMMC = 1,
  67. NAND = 2,
  68. } dev_type;
  69. typedef enum {
  70. USER = 0,
  71. BOOT_1,
  72. BOOT_2,
  73. RPMB,
  74. GP_1,
  75. GP_2,
  76. GP_3,
  77. GP_4,
  78. } Region;
  79. struct excel_info {
  80. char *name;
  81. unsigned long long size;
  82. unsigned long long start_address;
  83. dev_type type;
  84. unsigned int partition_idx;
  85. Region region;
  86. };
  87. extern struct excel_info PartInfo[PART_MAX_COUNT];
  88. #else
  89. extern int get_part_num_nand(void);
  90. #define PART_NUM get_part_num_nand()
  91. #endif