sec_mtd.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef SEC_MTD_H
  2. #define SEC_MTD_H
  3. #include "sec_osal.h"
  4. /**************************************************************************
  5. * MTD INTERNAL DEFINITION
  6. **************************************************************************/
  7. typedef struct _MtdRCtx {
  8. char *buf;
  9. ASF_FILE fd;
  10. } MtdRCtx;
  11. /**************************************************************************
  12. * MTD CONFIGURATION
  13. **************************************************************************/
  14. #define ROM_INFO_SEARCH_LEN (0x100000)
  15. #define SECRO_SEARCH_START (0x0)
  16. #define SECRO_SEARCH_LEN (0x100000)
  17. /* mtd number */
  18. #define MTD_PL_NUM (0x0)
  19. #define MTD_SECCFG_NUM (0x3)
  20. /* indicate the search region each time */
  21. #define ROM_INFO_SEARCH_REGION (0x2000)
  22. #define SECRO_SEARCH_REGION (0x4000)
  23. /******************************************************************************
  24. * EXPORT FUNCTION
  25. ******************************************************************************/
  26. extern void sec_mtd_find_partitions(void);
  27. extern unsigned int sec_mtd_read_image(char *part_name, char *buf, unsigned int off,
  28. unsigned int sz);
  29. extern unsigned int sec_mtd_get_off(char *part_name);
  30. #endif /* SEC_MTD_H */