mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-04 03:33:58 +08:00
dd5512eb6b
The top registers initialization is very specific to the actual hardware used, even the way in which we read from and write to the top registers varies from chip to chip. This patch moves all top registers initialization to wl12xx. Also add a boot op for the wlcore module to call at the right time and a few callbacks with the common called to be called from the lower drivers boot operations. Signed-off-by: Luciano Coelho <coelho@ti.com>
55 lines
1.5 KiB
C
55 lines
1.5 KiB
C
/*
|
|
* This file is part of wl1271
|
|
*
|
|
* Copyright (C) 2008-2009 Nokia Corporation
|
|
*
|
|
* Contact: Luciano Coelho <luciano.coelho@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
|
|
*
|
|
*/
|
|
|
|
#ifndef __BOOT_H__
|
|
#define __BOOT_H__
|
|
|
|
#include "wlcore.h"
|
|
|
|
int wlcore_boot_upload_firmware(struct wl1271 *wl);
|
|
int wlcore_boot_upload_nvs(struct wl1271 *wl);
|
|
int wlcore_boot_run_firmware(struct wl1271 *wl);
|
|
|
|
#define WL1271_NO_SUBBANDS 8
|
|
#define WL1271_NO_POWER_LEVELS 4
|
|
#define WL1271_FW_VERSION_MAX_LEN 20
|
|
|
|
struct wl1271_static_data {
|
|
u8 mac_address[ETH_ALEN];
|
|
u8 padding[2];
|
|
u8 fw_version[WL1271_FW_VERSION_MAX_LEN];
|
|
u32 hw_version;
|
|
u8 tx_power_table[WL1271_NO_SUBBANDS][WL1271_NO_POWER_LEVELS];
|
|
};
|
|
|
|
/* number of times we try to read the INIT interrupt */
|
|
#define INIT_LOOP 20000
|
|
|
|
/* delay between retries */
|
|
#define INIT_LOOP_DELAY 50
|
|
|
|
#define WU_COUNTER_PAUSE_VAL 0x3FF
|
|
#define WELP_ARM_COMMAND_VAL 0x4
|
|
|
|
#endif
|