Lines Matching refs:spare

28 static inline void translate_spare2oob(const struct yaffs_spare *spare, u8 *oob)  in translate_spare2oob()  argument
30 oob[0] = spare->tb0; in translate_spare2oob()
31 oob[1] = spare->tb1; in translate_spare2oob()
32 oob[2] = spare->tb2; in translate_spare2oob()
33 oob[3] = spare->tb3; in translate_spare2oob()
34 oob[4] = spare->tb4; in translate_spare2oob()
35 oob[5] = spare->tb5 & 0x3f; in translate_spare2oob()
36 oob[5] |= spare->block_status == 'Y' ? 0 : 0x80; in translate_spare2oob()
37 oob[5] |= spare->page_status == 0 ? 0 : 0x40; in translate_spare2oob()
38 oob[6] = spare->tb6; in translate_spare2oob()
39 oob[7] = spare->tb7; in translate_spare2oob()
42 static inline void translate_oob2spare(struct yaffs_spare *spare, u8 *oob) in translate_oob2spare() argument
44 struct yaffs_nand_spare *nspare = (struct yaffs_nand_spare *)spare; in translate_oob2spare()
45 spare->tb0 = oob[0]; in translate_oob2spare()
46 spare->tb1 = oob[1]; in translate_oob2spare()
47 spare->tb2 = oob[2]; in translate_oob2spare()
48 spare->tb3 = oob[3]; in translate_oob2spare()
49 spare->tb4 = oob[4]; in translate_oob2spare()
50 spare->tb5 = oob[5] == 0xff ? 0xff : oob[5] & 0x3f; in translate_oob2spare()
51 spare->block_status = oob[5] & 0x80 ? 0xff : 'Y'; in translate_oob2spare()
52 spare->page_status = oob[5] & 0x40 ? 0xff : 0; in translate_oob2spare()
53 spare->ecc1[0] = spare->ecc1[1] = spare->ecc1[2] = 0xff; in translate_oob2spare()
54 spare->tb6 = oob[6]; in translate_oob2spare()
55 spare->tb7 = oob[7]; in translate_oob2spare()
56 spare->ecc2[0] = spare->ecc2[1] = spare->ecc2[2] = 0xff; in translate_oob2spare()
63 const u8 *data, const struct yaffs_spare *spare) in nandmtd_WriteChunkToNAND() argument
72 if (data && !spare) in nandmtd_WriteChunkToNAND()
75 else if (spare) { in nandmtd_WriteChunkToNAND()
77 translate_spare2oob(spare, spareAsBytes); in nandmtd_WriteChunkToNAND()
98 struct yaffs_spare *spare) in nandmtd_ReadChunkFromNAND() argument
108 if (data && !spare) in nandmtd_ReadChunkFromNAND()
111 else if (spare) { in nandmtd_ReadChunkFromNAND()
125 translate_oob2spare(spare, spareAsBytes); in nandmtd_ReadChunkFromNAND()