spi.c (19a4e68a8a192957f7556a0aae9c37a6bc73cde6) | spi.c (789e90e567d7d93edc1b2001d17209c21cc37850) |
---|---|
1/* 2 * This file is part of wl1251 3 * 4 * Copyright (C) 2008 Nokia Corporation 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * version 2 as published by the Free Software Foundation. --- 79 unchanged lines hidden (view full) --- 88 wl1251_error("could not allocate cmd for spi init"); 89 return; 90 } 91 92 memset(crc, 0, sizeof(crc)); 93 memset(&t, 0, sizeof(t)); 94 spi_message_init(&m); 95 | 1/* 2 * This file is part of wl1251 3 * 4 * Copyright (C) 2008 Nokia Corporation 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * version 2 as published by the Free Software Foundation. --- 79 unchanged lines hidden (view full) --- 88 wl1251_error("could not allocate cmd for spi init"); 89 return; 90 } 91 92 memset(crc, 0, sizeof(crc)); 93 memset(&t, 0, sizeof(t)); 94 spi_message_init(&m); 95 |
96 /* 97 * Set WSPI_INIT_COMMAND | 96 /* Set WSPI_INIT_COMMAND |
98 * the data is being send from the MSB to LSB 99 */ 100 cmd[2] = 0xff; 101 cmd[3] = 0xff; 102 cmd[1] = WSPI_INIT_CMD_START | WSPI_INIT_CMD_TX; 103 cmd[0] = 0; 104 cmd[7] = 0; 105 cmd[6] |= HW_ACCESS_WSPI_INIT_CMD_MASK << 3; --- 151 unchanged lines hidden (view full) --- 257 wl = hw->priv; 258 259 SET_IEEE80211_DEV(hw, &spi->dev); 260 spi_set_drvdata(spi, wl); 261 wl->if_priv = spi; 262 wl->if_ops = &wl1251_spi_ops; 263 264 /* This is the only SPI value that we need to set here, the rest | 97 * the data is being send from the MSB to LSB 98 */ 99 cmd[2] = 0xff; 100 cmd[3] = 0xff; 101 cmd[1] = WSPI_INIT_CMD_START | WSPI_INIT_CMD_TX; 102 cmd[0] = 0; 103 cmd[7] = 0; 104 cmd[6] |= HW_ACCESS_WSPI_INIT_CMD_MASK << 3; --- 151 unchanged lines hidden (view full) --- 256 wl = hw->priv; 257 258 SET_IEEE80211_DEV(hw, &spi->dev); 259 spi_set_drvdata(spi, wl); 260 wl->if_priv = spi; 261 wl->if_ops = &wl1251_spi_ops; 262 263 /* This is the only SPI value that we need to set here, the rest |
265 * comes from the board-peripherals file */ | 264 * comes from the board-peripherals file 265 */ |
266 spi->bits_per_word = 32; 267 268 ret = spi_setup(spi); 269 if (ret < 0) { 270 wl1251_error("spi_setup failed"); 271 goto out_free; 272 } 273 --- 63 unchanged lines hidden --- | 266 spi->bits_per_word = 32; 267 268 ret = spi_setup(spi); 269 if (ret < 0) { 270 wl1251_error("spi_setup failed"); 271 goto out_free; 272 } 273 --- 63 unchanged lines hidden --- |