Lines Matching defs:byte
45 #define CONFIG_NANDSIM_THIRD_ID_BYTE 0xFF /* No byte */
46 #define CONFIG_NANDSIM_FOURTH_ID_BYTE 0xFF /* No byte */
108 module_param_array(id_bytes, byte, NULL, 0400);
109 module_param_named(first_id_byte, id_bytes[0], byte, 0400);
110 module_param_named(second_id_byte, id_bytes[1], byte, 0400);
111 module_param_named(third_id_byte, id_bytes[2], byte, 0400);
112 module_param_named(fourth_id_byte, id_bytes[3], byte, 0400);
134 MODULE_PARM_DESC(first_id_byte, "The first byte returned by NAND Flash 'read ID' command (manufacturer ID) (obsolete)");
135 MODULE_PARM_DESC(second_id_byte, "The second byte returned by NAND Flash 'read ID' command (chip ID) (obsolete)");
136 MODULE_PARM_DESC(third_id_byte, "The third byte returned by NAND Flash 'read ID' command (obsolete)");
137 MODULE_PARM_DESC(fourth_id_byte, "The fourth byte returned by NAND Flash 'read ID' command (obsolete)");
166 "be correctable in 512-byte blocks");
225 #define STATE_ADDR_ZERO 0x00000040 /* one byte zero address was accepted */
256 #define OPT_PAGE512 0x00000002 /* 512-byte page chips */
257 #define OPT_PAGE2048 0x00000008 /* 2048-byte page chips */
258 #define OPT_PAGE512_8BIT 0x00000040 /* 512-byte page chips with 8-bit bus width */
259 #define OPT_PAGE4096 0x00000080 /* 4096-byte page chips */
260 #define OPT_LARGEPAGE (OPT_PAGE2048 | OPT_PAGE4096) /* 2048 & 4096-byte page chips */
261 #define OPT_SMALLPAGE (OPT_PAGE512) /* 512-byte page chips */
269 * (which is only valid for 512-byte pages).
280 u_char *byte; /* for byte access */
585 ns->pages[i].byte = NULL;
619 if (ns->pages[i].byte)
621 ns->pages[i].byte);
764 ns->buf.byte = kmalloc(ns->geom.pgszoob, GFP_KERNEL);
765 if (!ns->buf.byte) {
771 memset(ns->buf.byte, 0xFF, ns->geom.pgszoob);
794 kfree(ns->buf.byte);
1141 * Move an address byte to the correspondent internal register.
1145 uint byte = (uint)bt;
1148 ns->regs.column |= (byte << 8 * ns->regs.count);
1150 ns->regs.row |= (byte << 8 * (ns->regs.count -
1389 * Retuns a pointer to the current byte, within the current page.
1393 return NS_GET_PAGE(ns)->byte + ns->regs.column + ns->regs.off;
1401 prandom_bytes(ns->buf.byte, num);
1416 ns->buf.byte[pos / 8] ^= (1 << (pos % 8));
1435 memset(ns->buf.byte, 0xFF, num);
1445 tx = ns_read_file(ns, ns->cfile, ns->buf.byte, num,
1457 if (mypage->byte == NULL) {
1459 memset(ns->buf.byte, 0xFF, num);
1465 memcpy(ns->buf.byte, NS_PAGE_BYTE_OFF(ns), num);
1489 if (mypage->byte != NULL) {
1491 kmem_cache_free(ns->nand_pages_slab, mypage->byte);
1492 mypage->byte = NULL;
1527 pg_off[i] &= ns->buf.byte[i];
1548 if (mypage->byte == NULL) {
1556 mypage->byte = kmem_cache_alloc(ns->nand_pages_slab, GFP_NOFS);
1557 if (mypage->byte == NULL) {
1561 memset(mypage->byte, 0xFF, ns->geom.pgszoob);
1566 pg_off[i] &= ns->buf.byte[i];
1704 "byte page size 8x chips\n");
1910 outb = ns->buf.byte[ns->regs.count];
1918 NS_DBG("read_byte: read ID byte %d, total = %d\n", ns->regs.count, ns->regs.num);
1936 static void ns_nand_write_byte(struct nand_chip *chip, u_char byte)
1952 * The byte written is a command.
1955 if (byte == NAND_CMD_RESET) {
1961 /* Check that the command byte is correct */
1962 if (ns_check_command(byte)) {
1963 NS_ERR("write_byte: unknown command %#x\n", (uint)byte);
1972 if (byte == NAND_CMD_RNDOUT)
1987 (uint)byte,
1993 NS_DBG("command byte corresponding to %s state accepted\n",
1994 ns_get_state_name(ns_get_state_by_command(byte)));
1995 ns->regs.command = byte;
2000 * The byte written is an address.
2036 (uint)byte, ns_get_state_name(ns->nxstate));
2041 /* Check if this is expected byte */
2048 ns_accept_addr_byte(ns, byte);
2052 NS_DBG("write_byte: address byte %#x was accepted (%d bytes input, %d expected)\n",
2053 (uint)byte, ns->regs.count, ns->regs.num);
2062 * The byte written is an input data.
2068 (uint)byte, ns_get_state_name(ns->state),
2074 /* Check if this is expected byte */
2082 ns->buf.byte[ns->regs.count] = byte;
2085 ns->buf.word[ns->regs.count >> 1] = cpu_to_le16((uint16_t)byte);
2113 memcpy(ns->buf.byte + ns->regs.count, buf, len);
2156 memcpy(buf, ns->buf.byte + ns->regs.count, len);
2225 /* Use 512-byte ecc blocks */