Lines Matching refs:cmd
32 u8 *cmd = kzalloc(len + 1, GFP_KERNEL);
35 if (!cmd)
38 cmd[0] = opcode;
39 memcpy(&cmd[1], buf, len);
40 err = spi_write(b53sf->spi, cmd, len + 1);
42 kfree(cmd);
53 unsigned char cmd[5];
59 cmd[cmd_len++] = SPINOR_OP_READ;
61 cmd[cmd_len++] = (from & 0xFF000000) >> 24;
62 cmd[cmd_len++] = (from & 0x00FF0000) >> 16;
63 cmd[cmd_len++] = (from & 0x0000FF00) >> 8;
64 cmd[cmd_len++] = (from & 0x000000FF) >> 0;
66 t[0].tx_buf = cmd;
90 u8 *cmd = kzalloc(len + 5, GFP_KERNEL);
94 if (!cmd)
99 cmd[cmd_len++] = nor->program_opcode;
101 cmd[cmd_len++] = (to & 0xFF000000) >> 24;
102 cmd[cmd_len++] = (to & 0x00FF0000) >> 16;
103 cmd[cmd_len++] = (to & 0x0000FF00) >> 8;
104 cmd[cmd_len++] = (to & 0x000000FF) >> 0;
105 memcpy(&cmd[cmd_len], buf, len);
107 t.tx_buf = cmd;
119 kfree(cmd);
125 unsigned char cmd[5];
129 cmd[i++] = nor->erase_opcode;
131 cmd[i++] = (offs & 0xFF000000) >> 24;
132 cmd[i++] = ((offs & 0x00FF0000) >> 16);
133 cmd[i++] = ((offs & 0x0000FF00) >> 8);
134 cmd[i++] = ((offs & 0x000000FF) >> 0);
136 return spi_write(b53sf->spi, cmd, i);
143 unsigned char cmd[4];
148 cmd[0] = 0x90; /* Read Manufacturer / Device ID */
149 cmd[1] = 0;
150 cmd[2] = 0;
151 cmd[3] = 0;
152 err = spi_write_then_read(b53sf->spi, cmd, 4, resp, 2);