Go to the documentation of this file.
21 #ifndef __GPMI_NAND_BCH_REGS_H
22 #define __GPMI_NAND_BCH_REGS_H
24 #define HW_BCH_CTRL 0x00000000
25 #define HW_BCH_CTRL_SET 0x00000004
26 #define HW_BCH_CTRL_CLR 0x00000008
27 #define HW_BCH_CTRL_TOG 0x0000000c
29 #define BM_BCH_CTRL_COMPLETE_IRQ_EN (1 << 8)
30 #define BM_BCH_CTRL_COMPLETE_IRQ (1 << 0)
32 #define HW_BCH_STATUS0 0x00000010
33 #define HW_BCH_MODE 0x00000020
34 #define HW_BCH_ENCODEPTR 0x00000030
35 #define HW_BCH_DATAPTR 0x00000040
36 #define HW_BCH_METAPTR 0x00000050
37 #define HW_BCH_LAYOUTSELECT 0x00000070
39 #define HW_BCH_FLASH0LAYOUT0 0x00000080
41 #define BP_BCH_FLASH0LAYOUT0_NBLOCKS 24
42 #define BM_BCH_FLASH0LAYOUT0_NBLOCKS (0xff << BP_BCH_FLASH0LAYOUT0_NBLOCKS)
43 #define BF_BCH_FLASH0LAYOUT0_NBLOCKS(v) \
44 (((v) << BP_BCH_FLASH0LAYOUT0_NBLOCKS) & BM_BCH_FLASH0LAYOUT0_NBLOCKS)
46 #define BP_BCH_FLASH0LAYOUT0_META_SIZE 16
47 #define BM_BCH_FLASH0LAYOUT0_META_SIZE (0xff << BP_BCH_FLASH0LAYOUT0_META_SIZE)
48 #define BF_BCH_FLASH0LAYOUT0_META_SIZE(v) \
49 (((v) << BP_BCH_FLASH0LAYOUT0_META_SIZE)\
50 & BM_BCH_FLASH0LAYOUT0_META_SIZE)
52 #define BP_BCH_FLASH0LAYOUT0_ECC0 12
53 #define BM_BCH_FLASH0LAYOUT0_ECC0 (0xf << BP_BCH_FLASH0LAYOUT0_ECC0)
54 #define MX6Q_BP_BCH_FLASH0LAYOUT0_ECC0 11
55 #define MX6Q_BM_BCH_FLASH0LAYOUT0_ECC0 (0x1f << MX6Q_BP_BCH_FLASH0LAYOUT0_ECC0)
56 #define BF_BCH_FLASH0LAYOUT0_ECC0(v, x) \
58 ? (((v) << MX6Q_BP_BCH_FLASH0LAYOUT0_ECC0) \
59 & MX6Q_BM_BCH_FLASH0LAYOUT0_ECC0) \
60 : (((v) << BP_BCH_FLASH0LAYOUT0_ECC0) \
61 & BM_BCH_FLASH0LAYOUT0_ECC0) \
64 #define BP_BCH_FLASH0LAYOUT0_DATA0_SIZE 0
65 #define BM_BCH_FLASH0LAYOUT0_DATA0_SIZE \
66 (0xfff << BP_BCH_FLASH0LAYOUT0_DATA0_SIZE)
67 #define MX6Q_BM_BCH_FLASH0LAYOUT0_DATA0_SIZE \
68 (0x3ff << BP_BCH_FLASH0LAYOUT0_DATA0_SIZE)
69 #define BF_BCH_FLASH0LAYOUT0_DATA0_SIZE(v, x) \
71 ? (((v) >> 2) & MX6Q_BM_BCH_FLASH0LAYOUT0_DATA0_SIZE) \
72 : ((v) & BM_BCH_FLASH0LAYOUT0_DATA0_SIZE) \
75 #define HW_BCH_FLASH0LAYOUT1 0x00000090
77 #define BP_BCH_FLASH0LAYOUT1_PAGE_SIZE 16
78 #define BM_BCH_FLASH0LAYOUT1_PAGE_SIZE \
79 (0xffff << BP_BCH_FLASH0LAYOUT1_PAGE_SIZE)
80 #define BF_BCH_FLASH0LAYOUT1_PAGE_SIZE(v) \
81 (((v) << BP_BCH_FLASH0LAYOUT1_PAGE_SIZE) \
82 & BM_BCH_FLASH0LAYOUT1_PAGE_SIZE)
84 #define BP_BCH_FLASH0LAYOUT1_ECCN 12
85 #define BM_BCH_FLASH0LAYOUT1_ECCN (0xf << BP_BCH_FLASH0LAYOUT1_ECCN)
86 #define MX6Q_BP_BCH_FLASH0LAYOUT1_ECCN 11
87 #define MX6Q_BM_BCH_FLASH0LAYOUT1_ECCN (0x1f << MX6Q_BP_BCH_FLASH0LAYOUT1_ECCN)
88 #define BF_BCH_FLASH0LAYOUT1_ECCN(v, x) \
90 ? (((v) << MX6Q_BP_BCH_FLASH0LAYOUT1_ECCN) \
91 & MX6Q_BM_BCH_FLASH0LAYOUT1_ECCN) \
92 : (((v) << BP_BCH_FLASH0LAYOUT1_ECCN) \
93 & BM_BCH_FLASH0LAYOUT1_ECCN) \
96 #define BP_BCH_FLASH0LAYOUT1_DATAN_SIZE 0
97 #define BM_BCH_FLASH0LAYOUT1_DATAN_SIZE \
98 (0xfff << BP_BCH_FLASH0LAYOUT1_DATAN_SIZE)
99 #define MX6Q_BM_BCH_FLASH0LAYOUT1_DATAN_SIZE \
100 (0x3ff << BP_BCH_FLASH0LAYOUT1_DATAN_SIZE)
101 #define BF_BCH_FLASH0LAYOUT1_DATAN_SIZE(v, x) \
103 ? (((v) >> 2) & MX6Q_BM_BCH_FLASH0LAYOUT1_DATAN_SIZE) \
104 : ((v) & BM_BCH_FLASH0LAYOUT1_DATAN_SIZE) \