• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Firmware APIs for XRadio drivers
3  *
4  * Copyright (c) 2013
5  * Xradio Technology Co., Ltd. <www.xradiotech.com>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License version 2 as
9  * published by the Free Software Foundation.
10  */
11 #ifndef FWIO_H_INCLUDED
12 #define FWIO_H_INCLUDED
13 
14 #define XR829_HW_REV0       (8290)
15 #define FIRMWARE_BASE_PATH  ""
16 
17 #define XR829_BOOTLOADER    (FIRMWARE_BASE_PATH "boot_xr829.bin")
18 #define XR829_FIRMWARE      (FIRMWARE_BASE_PATH "fw_xr829.bin")
19 #define XR829_SDD_FILE      (FIRMWARE_BASE_PATH "sdd_xr829.bin")
20 
21 #define SDD_PTA_CFG_ELT_ID              0xEB
22 #define SDD_REFERENCE_FREQUENCY_ELT_ID  0xC5
23 #define SDD_MAX_OUTPUT_POWER_2G4_ELT_ID 0xE3
24 #define SDD_MAX_OUTPUT_POWER_5G_ELT_ID  0xE4
25 
26 #define FIELD_OFFSET(type, field) ((u8 *)&((type *)0)->field - (u8 *)0)
27 #define FIND_NEXT_ELT(e) (struct xradio_sdd *)((u8 *)&e->data + e->length)
28 struct xradio_sdd {
29 	u8 id;
30 	u8 length;
31 	u8 data[];
32 };
33 
34 struct xradio_common;
35 int xradio_load_firmware(struct xradio_common *hw_priv);
36 int xradio_dev_deinit(struct xradio_common *hw_priv);
37 int xradio_update_dpllctrl(struct xradio_common *hw_priv, u32 dpll_update);
38 
39 #endif
40