Lines Matching defs:byte

44 #define CONFIG_NANDSIM_THIRD_ID_BYTE  0xFF /* No byte */
45 #define CONFIG_NANDSIM_FOURTH_ID_BYTE 0xFF /* No byte */
107 module_param_array(id_bytes, byte, NULL, 0400);
108 module_param_named(first_id_byte, id_bytes[0], byte, 0400);
109 module_param_named(second_id_byte, id_bytes[1], byte, 0400);
110 module_param_named(third_id_byte, id_bytes[2], byte, 0400);
111 module_param_named(fourth_id_byte, id_bytes[3], byte, 0400);
133 MODULE_PARM_DESC(first_id_byte, "The first byte returned by NAND Flash 'read ID' command (manufacturer ID) (obsolete)");
134 MODULE_PARM_DESC(second_id_byte, "The second byte returned by NAND Flash 'read ID' command (chip ID) (obsolete)");
135 MODULE_PARM_DESC(third_id_byte, "The third byte returned by NAND Flash 'read ID' command (obsolete)");
136 MODULE_PARM_DESC(fourth_id_byte, "The fourth byte returned by NAND Flash 'read ID' command (obsolete)");
165 "be correctable in 512-byte blocks");
204 /* Calculate the byte shift in the next page to access */
227 #define STATE_ADDR_ZERO 0x00000040 /* one byte zero address was accepted */
258 #define OPT_PAGE512 0x00000002 /* 512-byte page chips */
259 #define OPT_PAGE2048 0x00000008 /* 2048-byte page chips */
260 #define OPT_PAGE512_8BIT 0x00000040 /* 512-byte page chips with 8-bit bus width */
261 #define OPT_PAGE4096 0x00000080 /* 4096-byte page chips */
262 #define OPT_LARGEPAGE (OPT_PAGE2048 | OPT_PAGE4096) /* 2048 & 4096-byte page chips */
263 #define OPT_SMALLPAGE (OPT_PAGE512) /* 512-byte page chips */
271 * (which is only valid for 512-byte pages).
282 u_char *byte; /* for byte access */
587 ns->pages[i].byte = NULL;
621 if (ns->pages[i].byte)
623 ns->pages[i].byte);
766 ns->buf.byte = kmalloc(ns->geom.pgszoob, GFP_KERNEL);
767 if (!ns->buf.byte) {
773 memset(ns->buf.byte, 0xFF, ns->geom.pgszoob);
796 kfree(ns->buf.byte);
1136 * Move an address byte to the correspondent internal register.
1140 uint byte = (uint)bt;
1143 ns->regs.column |= (byte << 8 * ns->regs.count);
1145 ns->regs.row |= (byte << 8 * (ns->regs.count -
1384 * Retuns a pointer to the current byte, within the current page.
1388 return NS_GET_PAGE(ns)->byte + NS_PAGE_BYTE_SHIFT(ns);
1396 get_random_bytes(ns->buf.byte, num);
1411 ns->buf.byte[pos / 8] ^= (1 << (pos % 8));
1430 memset(ns->buf.byte, 0xFF, num);
1440 tx = ns_read_file(ns, ns->cfile, ns->buf.byte, num,
1452 if (mypage->byte == NULL) {
1454 memset(ns->buf.byte, 0xFF, num);
1460 memcpy(ns->buf.byte, NS_PAGE_BYTE_OFF(ns), num);
1484 if (mypage->byte != NULL) {
1486 kmem_cache_free(ns->nand_pages_slab, mypage->byte);
1487 mypage->byte = NULL;
1522 pg_off[i] &= ns->buf.byte[i];
1543 if (mypage->byte == NULL) {
1551 mypage->byte = kmem_cache_alloc(ns->nand_pages_slab, GFP_NOFS);
1552 if (mypage->byte == NULL) {
1556 memset(mypage->byte, 0xFF, ns->geom.pgszoob);
1561 pg_off[i] &= ns->buf.byte[i];
1699 "byte page size 8x chips\n");
1898 outb = ns->buf.byte[ns->regs.count];
1906 NS_DBG("read_byte: read ID byte %d, total = %d\n", ns->regs.count, ns->regs.num);
1924 static void ns_nand_write_byte(struct nand_chip *chip, u_char byte)
1940 * The byte written is a command.
1943 if (byte == NAND_CMD_RESET) {
1949 /* Check that the command byte is correct */
1950 if (ns_check_command(byte)) {
1951 NS_ERR("write_byte: unknown command %#x\n", (uint)byte);
1960 if (byte == NAND_CMD_RNDOUT)
1975 (uint)byte,
1981 NS_DBG("command byte corresponding to %s state accepted\n",
1982 ns_get_state_name(ns_get_state_by_command(byte)));
1983 ns->regs.command = byte;
1988 * The byte written is an address.
2024 (uint)byte, ns_get_state_name(ns->nxstate));
2029 /* Check if this is expected byte */
2036 ns_accept_addr_byte(ns, byte);
2040 NS_DBG("write_byte: address byte %#x was accepted (%d bytes input, %d expected)\n",
2041 (uint)byte, ns->regs.count, ns->regs.num);
2050 * The byte written is an input data.
2056 (uint)byte, ns_get_state_name(ns->state),
2062 /* Check if this is expected byte */
2070 ns->buf.byte[ns->regs.count] = byte;
2073 ns->buf.word[ns->regs.count >> 1] = cpu_to_le16((uint16_t)byte);
2101 memcpy(ns->buf.byte + ns->regs.count, buf, len);
2144 memcpy(buf, ns->buf.byte + ns->regs.count, len);
2228 /* Use 512-byte ecc blocks */