Lines Matching +full:byte +full:- +full:len

5  * SPDX-License-Identifier:	GPL-2.0+
16 static void sc_nand_write_byte(struct mtd_info *mtd, u_char byte);
17 static void sc_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len);
20 static void sc_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len);
33 * sc_nand_write_byte - write one byte to the chip
35 * @byte: pointer to data byte to write
37 static void sc_nand_write_byte(struct mtd_info *mtd, u_char byte) in sc_nand_write_byte() argument
39 sc_nand_write_buf(mtd, (const uchar *)&byte, sizeof(byte)); in sc_nand_write_byte()
43 * sc_nand_write_buf - write buffer to chip
46 * @len: number of bytes to write
48 static void sc_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len) in sc_nand_write_buf() argument
53 for (i = 0; i < len; i++) { in sc_nand_write_buf()
54 out_be32(this->IO_ADDR_W, in sc_nand_write_buf()
61 * sc_nand_read_byte - read one byte from the chip
66 u8 byte; in sc_nand_read_byte() local
67 sc_nand_read_buf(mtd, (uchar *)&byte, sizeof(byte)); in sc_nand_read_byte()
68 return byte; in sc_nand_read_byte()
72 * sc_nand_read_word - read one word from the chip
83 * sc_nand_read_buf - read chip data into buffer
86 * @len: number of bytes to read
88 static void sc_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len) in sc_nand_read_buf() argument
96 out_be32(this->IO_ADDR_W, val); in sc_nand_read_buf()
97 for (i = 0; i < len; i++) { in sc_nand_read_buf()
98 buf[i] = (in_be32(this->IO_ADDR_R) >> FPGA_NAND_DATA_SHIFT) & 0xff; in sc_nand_read_buf()
103 * sc_nand_device_ready - Check the NAND device is ready for next command.
110 if (in_be32(this->IO_ADDR_W) & FPGA_NAND_BUSY) in sc_nand_device_ready()
116 * sc_nand_hwcontrol - NAND control functions wrapper.
152 nand->cmd_ctrl = sc_nand_hwcontrol; in board_nand_init()
153 nand->ecc.mode = NAND_ECC_SOFT; in board_nand_init()
154 nand->dev_ready = sc_nand_device_ready; in board_nand_init()
155 nand->read_byte = sc_nand_read_byte; in board_nand_init()
156 nand->read_word = sc_nand_read_word; in board_nand_init()
157 nand->write_buf = sc_nand_write_buf; in board_nand_init()
158 nand->read_buf = sc_nand_read_buf; in board_nand_init()