Lines Matching defs:crc
17 #include <u-boot/crc.h>
41 * Read and write blocks start with these tokens and end with crc;
181 * @xbuf: buffer of the actual data (excluding token and crc) to read
183 * @bsize: size of the actual data (excluding token and crc) in bytes
184 * Return: 0 if OK, -ECOMM if crc error, -ETIMEDOUT on other errors
189 u16 crc;
206 ret = dm_spi_xfer(dev, 2 * 8, NULL, &crc, 0);
211 if (crc_ok != crc) {
212 debug("%s: data crc error, expected %04x got %04x\n",
213 __func__, crc_ok, crc);
238 * @xbuf: buffer of the actual data (excluding token and crc) to write
240 * @bsize: size of actual data (excluding token and crc) in bytes
242 * Return: 0 if OK, -ECOMM if crc error, -ETIMEDOUT on other errors
249 u16 crc;
257 crc = cpu_to_be16(crc16_ccitt(0, (u8 *)buf, bsize));
261 dm_spi_xfer(dev, 2 * 8, &crc, NULL, 0);