rtlwifi: add efuse ops for other components
The new component phydm need to access efuse content, so we prepare ops for reference. Signed-off-by: Tsang-Shian Lin <thlin@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
ed979a1ed4
commit
2cdd634e7e
|
@ -50,6 +50,11 @@ static const struct efuse_map RTL8712_SDIO_EFUSE_TABLE[] = {
|
||||||
{11, 0, 0, 28}
|
{11, 0, 0, 28}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct rtl_efuse_ops efuse_ops = {
|
||||||
|
.efuse_onebyte_read = efuse_one_byte_read,
|
||||||
|
.efuse_logical_map_read = efuse_shadow_read,
|
||||||
|
};
|
||||||
|
|
||||||
static void efuse_shadow_read_1byte(struct ieee80211_hw *hw, u16 offset,
|
static void efuse_shadow_read_1byte(struct ieee80211_hw *hw, u16 offset,
|
||||||
u8 *value);
|
u8 *value);
|
||||||
static void efuse_shadow_read_2byte(struct ieee80211_hw *hw, u16 offset,
|
static void efuse_shadow_read_2byte(struct ieee80211_hw *hw, u16 offset,
|
||||||
|
@ -1364,3 +1369,11 @@ void rtl_fill_dummy(u8 *pfwbuf, u32 *pfwlen)
|
||||||
*pfwlen = fwlen;
|
*pfwlen = fwlen;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(rtl_fill_dummy);
|
EXPORT_SYMBOL_GPL(rtl_fill_dummy);
|
||||||
|
|
||||||
|
void rtl_efuse_ops_init(struct ieee80211_hw *hw)
|
||||||
|
{
|
||||||
|
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||||
|
|
||||||
|
rtlpriv->efuse.efuse_ops = &efuse_ops;
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(rtl_efuse_ops_init);
|
||||||
|
|
|
@ -116,5 +116,5 @@ void rtl_fill_dummy(u8 *pfwbuf, u32 *pfwlen);
|
||||||
void rtl_fw_page_write(struct ieee80211_hw *hw, u32 page, const u8 *buffer,
|
void rtl_fw_page_write(struct ieee80211_hw *hw, u32 page, const u8 *buffer,
|
||||||
u32 size);
|
u32 size);
|
||||||
void rtl_fw_block_write(struct ieee80211_hw *hw, const u8 *buffer, u32 size);
|
void rtl_fw_block_write(struct ieee80211_hw *hw, const u8 *buffer, u32 size);
|
||||||
|
void rtl_efuse_ops_init(struct ieee80211_hw *hw);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2238,6 +2238,7 @@ int rtl_pci_probe(struct pci_dev *pdev,
|
||||||
rtlpriv->cfg = (struct rtl_hal_cfg *)(id->driver_data);
|
rtlpriv->cfg = (struct rtl_hal_cfg *)(id->driver_data);
|
||||||
rtlpriv->intf_ops = &rtl_pci_ops;
|
rtlpriv->intf_ops = &rtl_pci_ops;
|
||||||
rtlpriv->glb_var = &rtl_global_var;
|
rtlpriv->glb_var = &rtl_global_var;
|
||||||
|
rtl_efuse_ops_init(hw);
|
||||||
|
|
||||||
/* MEM map */
|
/* MEM map */
|
||||||
err = pci_request_regions(pdev, KBUILD_MODNAME);
|
err = pci_request_regions(pdev, KBUILD_MODNAME);
|
||||||
|
|
|
@ -1813,6 +1813,7 @@ struct rtl_dm {
|
||||||
#define EFUSE_MAX_LOGICAL_SIZE 512
|
#define EFUSE_MAX_LOGICAL_SIZE 512
|
||||||
|
|
||||||
struct rtl_efuse {
|
struct rtl_efuse {
|
||||||
|
const struct rtl_efuse_ops *efuse_ops;
|
||||||
bool autoLoad_ok;
|
bool autoLoad_ok;
|
||||||
bool bootfromefuse;
|
bool bootfromefuse;
|
||||||
u16 max_physical_size;
|
u16 max_physical_size;
|
||||||
|
@ -1918,6 +1919,12 @@ struct rtl_efuse {
|
||||||
u8 channel_plan;
|
u8 channel_plan;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct rtl_efuse_ops {
|
||||||
|
int (*efuse_onebyte_read)(struct ieee80211_hw *hw, u16 addr, u8 *data);
|
||||||
|
void (*efuse_logical_map_read)(struct ieee80211_hw *hw, u8 type,
|
||||||
|
u16 offset, u32 *value);
|
||||||
|
};
|
||||||
|
|
||||||
struct rtl_tx_report {
|
struct rtl_tx_report {
|
||||||
atomic_t sn;
|
atomic_t sn;
|
||||||
u16 last_sent_sn;
|
u16 last_sent_sn;
|
||||||
|
|
Loading…
Reference in New Issue