Go to the documentation of this file.
30 #ifndef __UBI_MEDIA_H__
31 #define __UBI_MEDIA_H__
33 #include <asm/byteorder.h>
39 #define UBI_MAX_ERASECOUNTER 0x7FFFFFFF
42 #define UBI_CRC32_INIT 0xFFFFFFFFU
45 #define UBI_EC_HDR_MAGIC 0x55424923
47 #define UBI_VID_HDR_MAGIC 0x55424921
116 #define UBI_EC_HDR_SIZE sizeof(struct ubi_ec_hdr)
117 #define UBI_VID_HDR_SIZE sizeof(struct ubi_vid_hdr)
120 #define UBI_EC_HDR_SIZE_CRC (UBI_EC_HDR_SIZE - sizeof(__be32))
121 #define UBI_VID_HDR_SIZE_CRC (UBI_VID_HDR_SIZE - sizeof(__be32))
298 #define UBI_INT_VOL_COUNT 1
304 #define UBI_INTERNAL_VOL_START (0x7FFFFFFF - 4096)
308 #define UBI_LAYOUT_VOLUME_ID UBI_INTERNAL_VOL_START
309 #define UBI_LAYOUT_VOLUME_TYPE UBI_VID_DYNAMIC
310 #define UBI_LAYOUT_VOLUME_ALIGN 1
311 #define UBI_LAYOUT_VOLUME_EBS 2
312 #define UBI_LAYOUT_VOLUME_NAME "layout volume"
313 #define UBI_LAYOUT_VOLUME_COMPAT UBI_COMPAT_REJECT
316 #define UBI_MAX_VOLUMES 128
319 #define UBI_VOL_NAME_MAX 127
322 #define UBI_VTBL_RECORD_SIZE sizeof(struct ubi_vtbl_record)
325 #define UBI_VTBL_RECORD_SIZE_CRC (UBI_VTBL_RECORD_SIZE - sizeof(__be32))
380 #define UBI_FM_SB_VOLUME_ID (UBI_LAYOUT_VOLUME_ID + 1)
381 #define UBI_FM_DATA_VOLUME_ID (UBI_LAYOUT_VOLUME_ID + 2)
384 #define UBI_FM_FMT_VERSION 1
386 #define UBI_FM_SB_MAGIC 0x7B11D69F
387 #define UBI_FM_HDR_MAGIC 0xD4B82EF7
388 #define UBI_FM_VHDR_MAGIC 0xFA370ED1
389 #define UBI_FM_POOL_MAGIC 0x67AF4D08
390 #define UBI_FM_EBA_MAGIC 0xf0c040a8
394 #define UBI_FM_MAX_START 64
397 #define UBI_FM_MAX_BLOCKS 32
403 #define UBI_FM_MIN_POOL_SIZE 8
404 #define UBI_FM_MAX_POOL_SIZE 256
406 #define UBI_FM_WL_POOL_SIZE 25