Commit a762bb8e authored by Tony Lindgren's avatar Tony Lindgren Committed by Kalle Valo

wlcore: Prepare family to fix nvs file handling

Move struct wilink_family_data to be available for all TI WLAN
variants. And fix familiy typo, it should be just family.

Looks like wl12xx use two different nvs.bin files and wl18xx
uses a different conf.bin file.
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 9c95fd66
...@@ -80,17 +80,13 @@ ...@@ -80,17 +80,13 @@
((SPI_AGGR_BUFFER_SIZE / WSPI_MAX_CHUNK_SIZE) + 1) ((SPI_AGGR_BUFFER_SIZE / WSPI_MAX_CHUNK_SIZE) + 1)
struct wilink_familiy_data { static const struct wilink_family_data *wilink_data;
char name[8];
};
static const struct wilink_familiy_data *wilink_data;
static const struct wilink_familiy_data wl18xx_data = { static const struct wilink_family_data wl18xx_data = {
.name = "wl18xx", .name = "wl18xx",
}; };
static const struct wilink_familiy_data wl12xx_data = { static const struct wilink_family_data wl12xx_data = {
.name = "wl12xx", .name = "wl12xx",
}; };
...@@ -461,7 +457,7 @@ static int wlcore_probe_of(struct spi_device *spi, struct wl12xx_spi_glue *glue, ...@@ -461,7 +457,7 @@ static int wlcore_probe_of(struct spi_device *spi, struct wl12xx_spi_glue *glue,
return -ENODEV; return -ENODEV;
wilink_data = of_id->data; wilink_data = of_id->data;
dev_info(&spi->dev, "selected chip familiy is %s\n", dev_info(&spi->dev, "selected chip family is %s\n",
wilink_data->name); wilink_data->name);
if (of_find_property(dt_node, "clock-xtal", NULL)) if (of_find_property(dt_node, "clock-xtal", NULL))
......
...@@ -42,6 +42,12 @@ ...@@ -42,6 +42,12 @@
*/ */
#define WL12XX_NVS_NAME "ti-connectivity/wl1271-nvs.bin" #define WL12XX_NVS_NAME "ti-connectivity/wl1271-nvs.bin"
struct wilink_family_data {
const char *name;
const char *nvs_name; /* wl12xx nvs file */
const char *cfg_name; /* wl18xx cfg file */
};
#define WL1271_TX_SECURITY_LO16(s) ((u16)((s) & 0xffff)) #define WL1271_TX_SECURITY_LO16(s) ((u16)((s) & 0xffff))
#define WL1271_TX_SECURITY_HI32(s) ((u32)(((s) >> 16) & 0xffffffff)) #define WL1271_TX_SECURITY_HI32(s) ((u32)(((s) >> 16) & 0xffffffff))
#define WL1271_TX_SQN_POST_RECOVERY_PADDING 0xff #define WL1271_TX_SQN_POST_RECOVERY_PADDING 0xff
...@@ -208,6 +214,7 @@ struct wl1271_if_operations { ...@@ -208,6 +214,7 @@ struct wl1271_if_operations {
struct wlcore_platdev_data { struct wlcore_platdev_data {
struct wl1271_if_operations *if_ops; struct wl1271_if_operations *if_ops;
const struct wilink_family_data *family;
bool ref_clock_xtal; /* specify whether the clock is XTAL or not */ bool ref_clock_xtal; /* specify whether the clock is XTAL or not */
u32 ref_clock_freq; /* in Hertz */ u32 ref_clock_freq; /* in Hertz */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment