wl1251_boot.c 13.7 KB
Newer Older
K
Kalle Valo 已提交
1
/*
2
 * This file is part of wl1251
K
Kalle Valo 已提交
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
 *
 * Copyright (C) 2008 Nokia Corporation
 *
 * Contact: Kalle Valo <kalle.valo@nokia.com>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA
 *
 */

#include <linux/gpio.h>

26
#include "wl1251_reg.h"
27
#include "wl1251_boot.h"
28
#include "wl1251_io.h"
29
#include "wl1251_spi.h"
30
#include "wl1251_event.h"
K
Kalle Valo 已提交
31
#include "wl1251_acx.h"
K
Kalle Valo 已提交
32

33
void wl1251_boot_target_enable_interrupts(struct wl1251 *wl)
K
Kalle Valo 已提交
34
{
35 36
	wl1251_reg_write32(wl, ACX_REG_INTERRUPT_MASK, ~(wl->intr_mask));
	wl1251_reg_write32(wl, HI_CFG, HI_CFG_DEF_VAL);
K
Kalle Valo 已提交
37 38
}

39
int wl1251_boot_soft_reset(struct wl1251 *wl)
K
Kalle Valo 已提交
40 41 42 43 44
{
	unsigned long timeout;
	u32 boot_data;

	/* perform soft reset */
45
	wl1251_reg_write32(wl, ACX_REG_SLV_SOFT_RESET, ACX_SLV_SOFT_RESET_BIT);
K
Kalle Valo 已提交
46 47 48 49

	/* SOFT_RESET is self clearing */
	timeout = jiffies + usecs_to_jiffies(SOFT_RESET_MAX_TIME);
	while (1) {
50 51
		boot_data = wl1251_reg_read32(wl, ACX_REG_SLV_SOFT_RESET);
		wl1251_debug(DEBUG_BOOT, "soft reset bootdata 0x%x", boot_data);
K
Kalle Valo 已提交
52 53 54 55 56 57
		if ((boot_data & ACX_SLV_SOFT_RESET_BIT) == 0)
			break;

		if (time_after(jiffies, timeout)) {
			/* 1.2 check pWhalBus->uSelfClearTime if the
			 * timeout was reached */
58
			wl1251_error("soft reset timeout");
K
Kalle Valo 已提交
59 60 61 62 63 64 65
			return -1;
		}

		udelay(SOFT_RESET_STALL_TIME);
	}

	/* disable Rx/Tx */
66
	wl1251_reg_write32(wl, ENABLE, 0x0);
K
Kalle Valo 已提交
67 68

	/* disable auto calibration on start*/
69
	wl1251_reg_write32(wl, SPARE_A2, 0xffff);
K
Kalle Valo 已提交
70 71 72 73

	return 0;
}

74
int wl1251_boot_init_seq(struct wl1251 *wl)
K
Kalle Valo 已提交
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
{
	u32 scr_pad6, init_data, tmp, elp_cmd, ref_freq;

	/*
	 * col #1: INTEGER_DIVIDER
	 * col #2: FRACTIONAL_DIVIDER
	 * col #3: ATTN_BB
	 * col #4: ALPHA_BB
	 * col #5: STOP_TIME_BB
	 * col #6: BB_PLL_LOOP_FILTER
	 */
	static const u32 LUT[REF_FREQ_NUM][LUT_PARAM_NUM] = {

		{   83, 87381,  0xB, 5, 0xF00,  3}, /* REF_FREQ_19_2*/
		{   61, 141154, 0xB, 5, 0x1450, 2}, /* REF_FREQ_26_0*/
		{   41, 174763, 0xC, 6, 0x2D00, 1}, /* REF_FREQ_38_4*/
		{   40, 0,      0xC, 6, 0x2EE0, 1}, /* REF_FREQ_40_0*/
		{   47, 162280, 0xC, 6, 0x2760, 1}  /* REF_FREQ_33_6        */
	};

	/* read NVS params */
96 97
	scr_pad6 = wl1251_reg_read32(wl, SCR_PAD6);
	wl1251_debug(DEBUG_BOOT, "scr_pad6 0x%x", scr_pad6);
K
Kalle Valo 已提交
98 99

	/* read ELP_CMD */
100 101
	elp_cmd = wl1251_reg_read32(wl, ELP_CMD);
	wl1251_debug(DEBUG_BOOT, "elp_cmd 0x%x", elp_cmd);
K
Kalle Valo 已提交
102 103 104

	/* set the BB calibration time to be 300 usec (PLL_CAL_TIME) */
	ref_freq = scr_pad6 & 0x000000FF;
105
	wl1251_debug(DEBUG_BOOT, "ref_freq 0x%x", ref_freq);
K
Kalle Valo 已提交
106

107
	wl1251_reg_write32(wl, PLL_CAL_TIME, 0x9);
K
Kalle Valo 已提交
108 109 110 111

	/*
	 * PG 1.2: set the clock buffer time to be 210 usec (CLK_BUF_TIME)
	 */
112
	wl1251_reg_write32(wl, CLK_BUF_TIME, 0x6);
K
Kalle Valo 已提交
113 114 115 116 117 118 119

	/*
	 * set the clock detect feature to work in the restart wu procedure
	 * (ELP_CFG_MODE[14]) and Select the clock source type
	 * (ELP_CFG_MODE[13:12])
	 */
	tmp = ((scr_pad6 & 0x0000FF00) << 4) | 0x00004000;
120
	wl1251_reg_write32(wl, ELP_CFG_MODE, tmp);
K
Kalle Valo 已提交
121 122 123

	/* PG 1.2: enable the BB PLL fix. Enable the PLL_LIMP_CLK_EN_CMD */
	elp_cmd |= 0x00000040;
124
	wl1251_reg_write32(wl, ELP_CMD, elp_cmd);
K
Kalle Valo 已提交
125 126 127

	/* PG 1.2: Set the BB PLL stable time to be 1000usec
	 * (PLL_STABLE_TIME) */
128
	wl1251_reg_write32(wl, CFG_PLL_SYNC_CNT, 0x20);
K
Kalle Valo 已提交
129 130

	/* PG 1.2: read clock request time */
131
	init_data = wl1251_reg_read32(wl, CLK_REQ_TIME);
K
Kalle Valo 已提交
132 133 134 135 136 137 138 139 140

	/*
	 * PG 1.2: set the clock request time to be ref_clk_settling_time -
	 * 1ms = 4ms
	 */
	if (init_data > 0x21)
		tmp = init_data - 0x21;
	else
		tmp = 0;
141
	wl1251_reg_write32(wl, CLK_REQ_TIME, tmp);
K
Kalle Valo 已提交
142 143

	/* set BB PLL configurations in RF AFE */
144
	wl1251_reg_write32(wl, 0x003058cc, 0x4B5);
K
Kalle Valo 已提交
145 146

	/* set RF_AFE_REG_5 */
147
	wl1251_reg_write32(wl, 0x003058d4, 0x50);
K
Kalle Valo 已提交
148 149

	/* set RF_AFE_CTRL_REG_2 */
150
	wl1251_reg_write32(wl, 0x00305948, 0x11c001);
K
Kalle Valo 已提交
151 152 153 154 155

	/*
	 * change RF PLL and BB PLL divider for VCO clock and adjust VCO
	 * bais current(RF_AFE_REG_13)
	 */
156
	wl1251_reg_write32(wl, 0x003058f4, 0x1e);
K
Kalle Valo 已提交
157 158 159

	/* set BB PLL configurations */
	tmp = LUT[ref_freq][LUT_PARAM_INTEGER_DIVIDER] | 0x00017000;
160
	wl1251_reg_write32(wl, 0x00305840, tmp);
K
Kalle Valo 已提交
161 162 163 164 165

	/* set fractional divider according to Appendix C-BB PLL
	 * Calculations
	 */
	tmp = LUT[ref_freq][LUT_PARAM_FRACTIONAL_DIVIDER];
166
	wl1251_reg_write32(wl, 0x00305844, tmp);
K
Kalle Valo 已提交
167 168

	/* set the initial data for the sigma delta */
169
	wl1251_reg_write32(wl, 0x00305848, 0x3039);
K
Kalle Valo 已提交
170 171 172 173 174 175 176 177

	/*
	 * set the accumulator attenuation value, calibration loop1
	 * (alpha), calibration loop2 (beta), calibration loop3 (gamma) and
	 * the VCO gain
	 */
	tmp = (LUT[ref_freq][LUT_PARAM_ATTN_BB] << 16) |
		(LUT[ref_freq][LUT_PARAM_ALPHA_BB] << 12) | 0x1;
178
	wl1251_reg_write32(wl, 0x00305854, tmp);
K
Kalle Valo 已提交
179 180 181 182 183 184

	/*
	 * set the calibration stop time after holdoff time expires and set
	 * settling time HOLD_OFF_TIME_BB
	 */
	tmp = LUT[ref_freq][LUT_PARAM_STOP_TIME_BB] | 0x000A0000;
185
	wl1251_reg_write32(wl, 0x00305858, tmp);
K
Kalle Valo 已提交
186 187 188 189 190 191 192

	/*
	 * set BB PLL Loop filter capacitor3- BB_C3[2:0] and set BB PLL
	 * constant leakage current to linearize PFD to 0uA -
	 * BB_ILOOPF[7:3]
	 */
	tmp = LUT[ref_freq][LUT_PARAM_BB_PLL_LOOP_FILTER] | 0x00000030;
193
	wl1251_reg_write32(wl, 0x003058f8, tmp);
K
Kalle Valo 已提交
194 195 196 197 198 199 200

	/*
	 * set regulator output voltage for n divider to
	 * 1.35-BB_REFDIV[1:0], set charge pump current- BB_CPGAIN[4:2],
	 * set BB PLL Loop filter capacitor2- BB_C2[7:5], set gain of BB
	 * PLL auto-call to normal mode- BB_CALGAIN_3DB[8]
	 */
201
	wl1251_reg_write32(wl, 0x003058f0, 0x29);
K
Kalle Valo 已提交
202 203

	/* enable restart wakeup sequence (ELP_CMD[0]) */
204
	wl1251_reg_write32(wl, ELP_CMD, elp_cmd | 0x1);
K
Kalle Valo 已提交
205 206 207 208 209 210 211

	/* restart sequence completed */
	udelay(2000);

	return 0;
}

K
Kalle Valo 已提交
212 213 214 215 216 217 218 219 220 221 222 223
static void wl1251_boot_set_ecpu_ctrl(struct wl1251 *wl, u32 flag)
{
	u32 cpu_ctrl;

	/* 10.5.0 run the firmware (I) */
	cpu_ctrl = wl1251_reg_read32(wl, ACX_REG_ECPU_CONTROL);

	/* 10.5.1 run the firmware (II) */
	cpu_ctrl &= ~flag;
	wl1251_reg_write32(wl, ACX_REG_ECPU_CONTROL, cpu_ctrl);
}

224
int wl1251_boot_run_firmware(struct wl1251 *wl)
K
Kalle Valo 已提交
225 226 227 228
{
	int loop, ret;
	u32 chip_id, interrupt;

K
Kalle Valo 已提交
229
	wl1251_boot_set_ecpu_ctrl(wl, ECPU_CONTROL_HALT);
K
Kalle Valo 已提交
230

231
	chip_id = wl1251_reg_read32(wl, CHIP_ID_B);
K
Kalle Valo 已提交
232

233
	wl1251_debug(DEBUG_BOOT, "chip id after firmware boot: 0x%x", chip_id);
K
Kalle Valo 已提交
234

K
Kalle Valo 已提交
235
	if (chip_id != wl->chip_id) {
236
		wl1251_error("chip id doesn't match after firmware boot");
K
Kalle Valo 已提交
237 238 239 240 241 242 243
		return -EIO;
	}

	/* wait for init to complete */
	loop = 0;
	while (loop++ < INIT_LOOP) {
		udelay(INIT_LOOP_DELAY);
244
		interrupt = wl1251_reg_read32(wl, ACX_REG_INTERRUPT_NO_CLEAR);
K
Kalle Valo 已提交
245 246

		if (interrupt == 0xffffffff) {
247
			wl1251_error("error reading hardware complete "
K
Kalle Valo 已提交
248 249 250 251
				     "init indication");
			return -EIO;
		}
		/* check that ACX_INTR_INIT_COMPLETE is enabled */
K
Kalle Valo 已提交
252
		else if (interrupt & WL1251_ACX_INTR_INIT_COMPLETE) {
253
			wl1251_reg_write32(wl, ACX_REG_INTERRUPT_ACK,
K
Kalle Valo 已提交
254
					   WL1251_ACX_INTR_INIT_COMPLETE);
K
Kalle Valo 已提交
255 256 257 258 259
			break;
		}
	}

	if (loop >= INIT_LOOP) {
260
		wl1251_error("timeout waiting for the hardware to "
K
Kalle Valo 已提交
261 262 263 264 265
			     "complete initialization");
		return -EIO;
	}

	/* get hardware config command mail box */
266
	wl->cmd_box_addr = wl1251_reg_read32(wl, REG_COMMAND_MAILBOX_PTR);
K
Kalle Valo 已提交
267 268

	/* get hardware config event mail box */
269
	wl->event_box_addr = wl1251_reg_read32(wl, REG_EVENT_MAILBOX_PTR);
K
Kalle Valo 已提交
270 271

	/* set the working partition to its "running" mode offset */
K
Kalle Valo 已提交
272 273 274 275
	wl1251_set_partition(wl, WL1251_PART_WORK_MEM_START,
			     WL1251_PART_WORK_MEM_SIZE,
			     WL1251_PART_WORK_REG_START,
			     WL1251_PART_WORK_REG_SIZE);
K
Kalle Valo 已提交
276

277
	wl1251_debug(DEBUG_MAILBOX, "cmd_box_addr 0x%x event_box_addr 0x%x",
K
Kalle Valo 已提交
278 279
		     wl->cmd_box_addr, wl->event_box_addr);

K
Kalle Valo 已提交
280
	wl1251_acx_fw_version(wl, wl->fw_ver, sizeof(wl->fw_ver));
281

K
Kalle Valo 已提交
282 283 284 285 286 287
	/*
	 * in case of full asynchronous mode the firmware event must be
	 * ready to receive event from the command mailbox
	 */

	/* enable gpio interrupts */
288
	wl1251_enable_interrupts(wl);
K
Kalle Valo 已提交
289

K
Kalle Valo 已提交
290 291 292 293 294 295 296 297
	/* Enable target's interrupts */
	wl->intr_mask = WL1251_ACX_INTR_RX0_DATA |
		WL1251_ACX_INTR_RX1_DATA |
		WL1251_ACX_INTR_TX_RESULT |
		WL1251_ACX_INTR_EVENT_A |
		WL1251_ACX_INTR_EVENT_B |
		WL1251_ACX_INTR_INIT_COMPLETE;
	wl1251_boot_target_enable_interrupts(wl);
K
Kalle Valo 已提交
298 299 300 301

	/* unmask all mbox events  */
	wl->event_mask = 0xffffffff;

302
	ret = wl1251_event_unmask(wl);
K
Kalle Valo 已提交
303
	if (ret < 0) {
304
		wl1251_error("EVENT mask setting failed");
K
Kalle Valo 已提交
305 306 307
		return ret;
	}

308
	wl1251_event_mbox_config(wl);
K
Kalle Valo 已提交
309 310 311 312

	/* firmware startup completed */
	return 0;
}
K
Kalle Valo 已提交
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527

static int wl1251_boot_upload_firmware(struct wl1251 *wl)
{
	int addr, chunk_num, partition_limit;
	size_t fw_data_len;
	u8 *p;

	/* whal_FwCtrl_LoadFwImageSm() */

	wl1251_debug(DEBUG_BOOT, "chip id before fw upload: 0x%x",
		     wl1251_reg_read32(wl, CHIP_ID_B));

	/* 10.0 check firmware length and set partition */
	fw_data_len =  (wl->fw[4] << 24) | (wl->fw[5] << 16) |
		(wl->fw[6] << 8) | (wl->fw[7]);

	wl1251_debug(DEBUG_BOOT, "fw_data_len %zu chunk_size %d", fw_data_len,
		CHUNK_SIZE);

	if ((fw_data_len % 4) != 0) {
		wl1251_error("firmware length not multiple of four");
		return -EIO;
	}

	wl1251_set_partition(wl, WL1251_PART_DOWN_MEM_START,
			     WL1251_PART_DOWN_MEM_SIZE,
			     WL1251_PART_DOWN_REG_START,
			     WL1251_PART_DOWN_REG_SIZE);

	/* 10.1 set partition limit and chunk num */
	chunk_num = 0;
	partition_limit = WL1251_PART_DOWN_MEM_SIZE;

	while (chunk_num < fw_data_len / CHUNK_SIZE) {
		/* 10.2 update partition, if needed */
		addr = WL1251_PART_DOWN_MEM_START +
			(chunk_num + 2) * CHUNK_SIZE;
		if (addr > partition_limit) {
			addr = WL1251_PART_DOWN_MEM_START +
				chunk_num * CHUNK_SIZE;
			partition_limit = chunk_num * CHUNK_SIZE +
				WL1251_PART_DOWN_MEM_SIZE;
			wl1251_set_partition(wl,
					     addr,
					     WL1251_PART_DOWN_MEM_SIZE,
					     WL1251_PART_DOWN_REG_START,
					     WL1251_PART_DOWN_REG_SIZE);
		}

		/* 10.3 upload the chunk */
		addr = WL1251_PART_DOWN_MEM_START + chunk_num * CHUNK_SIZE;
		p = wl->fw + FW_HDR_SIZE + chunk_num * CHUNK_SIZE;
		wl1251_debug(DEBUG_BOOT, "uploading fw chunk 0x%p to 0x%x",
			     p, addr);
		wl1251_mem_write(wl, addr, p, CHUNK_SIZE);

		chunk_num++;
	}

	/* 10.4 upload the last chunk */
	addr = WL1251_PART_DOWN_MEM_START + chunk_num * CHUNK_SIZE;
	p = wl->fw + FW_HDR_SIZE + chunk_num * CHUNK_SIZE;
	wl1251_debug(DEBUG_BOOT, "uploading fw last chunk (%zu B) 0x%p to 0x%x",
		     fw_data_len % CHUNK_SIZE, p, addr);
	wl1251_mem_write(wl, addr, p, fw_data_len % CHUNK_SIZE);

	return 0;
}

static int wl1251_boot_upload_nvs(struct wl1251 *wl)
{
	size_t nvs_len, nvs_bytes_written, burst_len;
	int nvs_start, i;
	u32 dest_addr, val;
	u8 *nvs_ptr, *nvs;

	nvs = wl->nvs;
	if (nvs == NULL)
		return -ENODEV;

	nvs_ptr = nvs;

	nvs_len = wl->nvs_len;
	nvs_start = wl->fw_len;

	/*
	 * Layout before the actual NVS tables:
	 * 1 byte : burst length.
	 * 2 bytes: destination address.
	 * n bytes: data to burst copy.
	 *
	 * This is ended by a 0 length, then the NVS tables.
	 */

	while (nvs_ptr[0]) {
		burst_len = nvs_ptr[0];
		dest_addr = (nvs_ptr[1] & 0xfe) | ((u32)(nvs_ptr[2] << 8));

		/* We move our pointer to the data */
		nvs_ptr += 3;

		for (i = 0; i < burst_len; i++) {
			val = (nvs_ptr[0] | (nvs_ptr[1] << 8)
			       | (nvs_ptr[2] << 16) | (nvs_ptr[3] << 24));

			wl1251_debug(DEBUG_BOOT,
				     "nvs burst write 0x%x: 0x%x",
				     dest_addr, val);
			wl1251_mem_write32(wl, dest_addr, val);

			nvs_ptr += 4;
			dest_addr += 4;
		}
	}

	/*
	 * We've reached the first zero length, the first NVS table
	 * is 7 bytes further.
	 */
	nvs_ptr += 7;
	nvs_len -= nvs_ptr - nvs;
	nvs_len = ALIGN(nvs_len, 4);

	/* Now we must set the partition correctly */
	wl1251_set_partition(wl, nvs_start,
			     WL1251_PART_DOWN_MEM_SIZE,
			     WL1251_PART_DOWN_REG_START,
			     WL1251_PART_DOWN_REG_SIZE);

	/* And finally we upload the NVS tables */
	nvs_bytes_written = 0;
	while (nvs_bytes_written < nvs_len) {
		val = (nvs_ptr[0] | (nvs_ptr[1] << 8)
		       | (nvs_ptr[2] << 16) | (nvs_ptr[3] << 24));

		val = cpu_to_le32(val);

		wl1251_debug(DEBUG_BOOT,
			     "nvs write table 0x%x: 0x%x",
			     nvs_start, val);
		wl1251_mem_write32(wl, nvs_start, val);

		nvs_ptr += 4;
		nvs_bytes_written += 4;
		nvs_start += 4;
	}

	return 0;
}

int wl1251_boot(struct wl1251 *wl)
{
	int ret = 0, minor_minor_e2_ver;
	u32 tmp, boot_data;

	ret = wl1251_boot_soft_reset(wl);
	if (ret < 0)
		goto out;

	/* 2. start processing NVS file */
	ret = wl1251_boot_upload_nvs(wl);
	if (ret < 0)
		goto out;

	/* write firmware's last address (ie. it's length) to
	 * ACX_EEPROMLESS_IND_REG */
	wl1251_reg_write32(wl, ACX_EEPROMLESS_IND_REG, wl->fw_len);

	/* 6. read the EEPROM parameters */
	tmp = wl1251_reg_read32(wl, SCR_PAD2);

	/* 7. read bootdata */
	wl->boot_attr.radio_type = (tmp & 0x0000FF00) >> 8;
	wl->boot_attr.major = (tmp & 0x00FF0000) >> 16;
	tmp = wl1251_reg_read32(wl, SCR_PAD3);

	/* 8. check bootdata and call restart sequence */
	wl->boot_attr.minor = (tmp & 0x00FF0000) >> 16;
	minor_minor_e2_ver = (tmp & 0xFF000000) >> 24;

	wl1251_debug(DEBUG_BOOT, "radioType 0x%x majorE2Ver 0x%x "
		     "minorE2Ver 0x%x minor_minor_e2_ver 0x%x",
		     wl->boot_attr.radio_type, wl->boot_attr.major,
		     wl->boot_attr.minor, minor_minor_e2_ver);

	ret = wl1251_boot_init_seq(wl);
	if (ret < 0)
		goto out;

	/* 9. NVS processing done */
	boot_data = wl1251_reg_read32(wl, ACX_REG_ECPU_CONTROL);

	wl1251_debug(DEBUG_BOOT, "halt boot_data 0x%x", boot_data);

	/* 10. check that ECPU_CONTROL_HALT bits are set in
	 * pWhalBus->uBootData and start uploading firmware
	 */
	if ((boot_data & ECPU_CONTROL_HALT) == 0) {
		wl1251_error("boot failed, ECPU_CONTROL_HALT not set");
		ret = -EIO;
		goto out;
	}

	ret = wl1251_boot_upload_firmware(wl);
	if (ret < 0)
		goto out;

	/* 10.5 start firmware */
	ret = wl1251_boot_run_firmware(wl);
	if (ret < 0)
		goto out;

out:
	return ret;
}