Lines Matching +full:0 +full:x0001ffff
25 #define WSPI_CMD_READ 0x40000000
26 #define WSPI_CMD_WRITE 0x00000000
27 #define WSPI_CMD_FIXED 0x20000000
28 #define WSPI_CMD_BYTE_LENGTH 0x1FFE0000
30 #define WSPI_CMD_BYTE_ADDR 0x0001FFFF
34 #define WSPI_INIT_CMD_START 0x00
35 #define WSPI_INIT_CMD_TX 0x40
37 #define WSPI_INIT_CMD_BYPASS_BIT 0x80
38 #define WSPI_INIT_CMD_FIXEDBUSY_LEN 0x07
39 #define WSPI_INIT_CMD_EN_FIXEDBUSY 0x80
40 #define WSPI_INIT_CMD_DIS_FIXEDBUSY 0x00
41 #define WSPI_INIT_CMD_IOD 0x40
42 #define WSPI_INIT_CMD_IP 0x20
43 #define WSPI_INIT_CMD_CS 0x10
44 #define WSPI_INIT_CMD_WS 0x08
45 #define WSPI_INIT_CMD_WSPI 0x01
46 #define WSPI_INIT_CMD_END 0x01
52 #define HW_ACCESS_WSPI_INIT_CMD_MASK 0
103 memset(&t, 0, sizeof(t)); in wl12xx_spi_reset()
106 memset(cmd, 0xff, WSPI_INIT_CMD_LEN); in wl12xx_spi_reset()
131 memset(&t, 0, sizeof(t)); in wl12xx_spi_init()
138 cmd[0] = 0xff; in wl12xx_spi_init()
139 cmd[1] = 0xff; in wl12xx_spi_init()
141 cmd[3] = 0; in wl12xx_spi_init()
142 cmd[4] = 0; in wl12xx_spi_init()
149 if (HW_ACCESS_WSPI_FIXED_BUSY_LEN == 0) in wl12xx_spi_init()
154 cmd[7] = crc7_be(0, cmd+2, WSPI_INIT_CMD_CRC_LEN) | WSPI_INIT_CMD_END; in wl12xx_spi_init()
173 memset(&m, 0, sizeof(m)); in wl12xx_spi_init()
176 cmd[0] = 0xff; in wl12xx_spi_init()
177 cmd[1] = 0xff; in wl12xx_spi_init()
178 cmd[2] = 0xff; in wl12xx_spi_init()
179 cmd[3] = 0xff; in wl12xx_spi_init()
202 int num_busy_bytes = 0; in wl12xx_spi_read_busy()
214 memset(t, 0, sizeof(t)); in wl12xx_spi_read_busy()
215 t[0].rx_buf = busy_buf; in wl12xx_spi_read_busy()
216 t[0].len = sizeof(u32); in wl12xx_spi_read_busy()
217 t[0].cs_change = true; in wl12xx_spi_read_busy()
218 spi_message_add_tail(&t[0], &m); in wl12xx_spi_read_busy()
221 if (*busy_buf & 0x1) in wl12xx_spi_read_busy()
222 return 0; in wl12xx_spi_read_busy()
241 while (len > 0) { in wl12xx_spi_raw_read()
247 *cmd = 0; in wl12xx_spi_raw_read()
257 memset(t, 0, sizeof(t)); in wl12xx_spi_raw_read()
259 t[0].tx_buf = cmd; in wl12xx_spi_raw_read()
260 t[0].len = 4; in wl12xx_spi_raw_read()
261 t[0].cs_change = true; in wl12xx_spi_raw_read()
262 spi_message_add_tail(&t[0], &m); in wl12xx_spi_raw_read()
272 if (!(busy_buf[WL1271_BUSY_WORD_CNT - 1] & 0x1) && in wl12xx_spi_raw_read()
274 memset(buf, 0, chunk_len); in wl12xx_spi_raw_read()
275 return 0; in wl12xx_spi_raw_read()
279 memset(t, 0, sizeof(t)); in wl12xx_spi_raw_read()
281 t[0].rx_buf = buf; in wl12xx_spi_raw_read()
282 t[0].len = chunk_len; in wl12xx_spi_raw_read()
283 t[0].cs_change = true; in wl12xx_spi_raw_read()
284 spi_message_add_tail(&t[0], &m); in wl12xx_spi_raw_read()
294 return 0; in wl12xx_spi_raw_read()
317 cmd = &commands[0]; in __wl12xx_spi_raw_write()
318 i = 0; in __wl12xx_spi_raw_write()
319 while (len > 0) { in __wl12xx_spi_raw_write()
322 *cmd = 0; in __wl12xx_spi_raw_write()
349 return 0; in __wl12xx_spi_raw_write()
374 int ret = 0; in wl12xx_spi_set_power()
458 return 0; in wlcore_probe_of()
501 if (ret < 0) { in wl1271_probe()
515 memset(res, 0x00, sizeof(res)); in wl1271_probe()
517 res[0].start = spi->irq; in wl1271_probe()
518 res[0].flags = IORESOURCE_IRQ | irq_get_trigger_type(spi->irq); in wl1271_probe()
519 res[0].name = "irq"; in wl1271_probe()
540 return 0; in wl1271_probe()