From: <sean.wang@mediatek.com> To: <nbd@nbd.name>, <lorenzo.bianconi@redhat.com> Cc: <sean.wang@mediatek.com>, <Soul.Huang@mediatek.com>, <YN.Chen@mediatek.com>, <Leon.Yen@mediatek.com>, <Eric-SY.Chang@mediatek.com>, <Deren.Wu@mediatek.com>, <km.lin@mediatek.com>, <robin.chiu@mediatek.com>, <Eddie.Chen@mediatek.com>, <ch.yeh@mediatek.com>, <posh.sun@mediatek.com>, <ted.huang@mediatek.com>, <Eric.Liang@mediatek.com>, <Stella.Chang@mediatek.com>, <steve.lee@mediatek.com>, <jsiuda@google.com>, <frankgor@google.com>, <jemele@google.com>, <shawnku@google.com>, <linux-wireless@vger.kernel.org>, <linux-mediatek@lists.infradead.org> Subject: [PATCH v2 06/16] mt76: connac: move mcu reg access utility routines in mt76_connac_lib module Date: Sat, 18 Sep 2021 07:59:22 +0800 [thread overview] Message-ID: <42112d6b7b1c09bcdfa37d4417e55ef45c09ceff.1631918993.git.objelf@gmail.com> (raw) In-Reply-To: <cover.1631918993.git.objelf@gmail.com> From: Sean Wang <sean.wang@mediatek.com> Move mcu reg access shared between mt7663s and mt7921s in mt76_connac_lib module. Tested-by: Deren Wu <deren.wu@mediatek.com> Signed-off-by: Sean Wang <sean.wang@mediatek.com> --- .../wireless/mediatek/mt76/mt76_connac_mcu.c | 27 +++++++++++++++++++ .../wireless/mediatek/mt76/mt76_connac_mcu.h | 2 ++ 2 files changed, 29 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c index ae692052de97..a53f6344a184 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c @@ -2406,6 +2406,33 @@ void mt76_connac_mcu_set_suspend_iter(void *priv, u8 *mac, } EXPORT_SYMBOL_GPL(mt76_connac_mcu_set_suspend_iter); +u32 mt76_connac_mcu_reg_rr(struct mt76_dev *dev, u32 offset) +{ + struct { + __le32 addr; + __le32 val; + } __packed req = { + .addr = cpu_to_le32(offset), + }; + + return mt76_mcu_send_msg(dev, MCU_CMD_REG_READ, &req, sizeof(req), + true); +} +EXPORT_SYMBOL_GPL(mt76_connac_mcu_reg_rr); + +void mt76_connac_mcu_reg_wr(struct mt76_dev *dev, u32 offset, u32 val) +{ + struct { + __le32 addr; + __le32 val; + } __packed req = { + .addr = cpu_to_le32(offset), + .val = cpu_to_le32(val), + }; + + mt76_mcu_send_msg(dev, MCU_CMD_REG_WRITE, &req, sizeof(req), false); +} +EXPORT_SYMBOL_GPL(mt76_connac_mcu_reg_wr); #endif /* CONFIG_PM */ MODULE_AUTHOR("Lorenzo Bianconi <lorenzo@kernel.org>"); diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h index ea46dde364e1..6c410c4a8d6e 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h @@ -1111,4 +1111,6 @@ void mt76_connac_mcu_coredump_event(struct mt76_dev *dev, struct sk_buff *skb, int mt76_connac_mcu_set_rate_txpower(struct mt76_phy *phy); int mt76_connac_mcu_set_p2p_oppps(struct ieee80211_hw *hw, struct ieee80211_vif *vif); +u32 mt76_connac_mcu_reg_rr(struct mt76_dev *dev, u32 offset); +void mt76_connac_mcu_reg_wr(struct mt76_dev *dev, u32 offset, u32 val); #endif /* __MT76_CONNAC_MCU_H */ -- 2.25.1 _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek
WARNING: multiple messages have this Message-ID (diff)
From: <sean.wang@mediatek.com> To: <nbd@nbd.name>, <lorenzo.bianconi@redhat.com> Cc: <sean.wang@mediatek.com>, <Soul.Huang@mediatek.com>, <YN.Chen@mediatek.com>, <Leon.Yen@mediatek.com>, <Eric-SY.Chang@mediatek.com>, <Deren.Wu@mediatek.com>, <km.lin@mediatek.com>, <robin.chiu@mediatek.com>, <Eddie.Chen@mediatek.com>, <ch.yeh@mediatek.com>, <posh.sun@mediatek.com>, <ted.huang@mediatek.com>, <Eric.Liang@mediatek.com>, <Stella.Chang@mediatek.com>, <steve.lee@mediatek.com>, <jsiuda@google.com>, <frankgor@google.com>, <jemele@google.com>, <shawnku@google.com>, <linux-wireless@vger.kernel.org>, <linux-mediatek@lists.infradead.org> Subject: [PATCH v2 06/16] mt76: connac: move mcu reg access utility routines in mt76_connac_lib module Date: Sat, 18 Sep 2021 07:59:22 +0800 [thread overview] Message-ID: <42112d6b7b1c09bcdfa37d4417e55ef45c09ceff.1631918993.git.objelf@gmail.com> (raw) In-Reply-To: <cover.1631918993.git.objelf@gmail.com> From: Sean Wang <sean.wang@mediatek.com> Move mcu reg access shared between mt7663s and mt7921s in mt76_connac_lib module. Tested-by: Deren Wu <deren.wu@mediatek.com> Signed-off-by: Sean Wang <sean.wang@mediatek.com> --- .../wireless/mediatek/mt76/mt76_connac_mcu.c | 27 +++++++++++++++++++ .../wireless/mediatek/mt76/mt76_connac_mcu.h | 2 ++ 2 files changed, 29 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c index ae692052de97..a53f6344a184 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c @@ -2406,6 +2406,33 @@ void mt76_connac_mcu_set_suspend_iter(void *priv, u8 *mac, } EXPORT_SYMBOL_GPL(mt76_connac_mcu_set_suspend_iter); +u32 mt76_connac_mcu_reg_rr(struct mt76_dev *dev, u32 offset) +{ + struct { + __le32 addr; + __le32 val; + } __packed req = { + .addr = cpu_to_le32(offset), + }; + + return mt76_mcu_send_msg(dev, MCU_CMD_REG_READ, &req, sizeof(req), + true); +} +EXPORT_SYMBOL_GPL(mt76_connac_mcu_reg_rr); + +void mt76_connac_mcu_reg_wr(struct mt76_dev *dev, u32 offset, u32 val) +{ + struct { + __le32 addr; + __le32 val; + } __packed req = { + .addr = cpu_to_le32(offset), + .val = cpu_to_le32(val), + }; + + mt76_mcu_send_msg(dev, MCU_CMD_REG_WRITE, &req, sizeof(req), false); +} +EXPORT_SYMBOL_GPL(mt76_connac_mcu_reg_wr); #endif /* CONFIG_PM */ MODULE_AUTHOR("Lorenzo Bianconi <lorenzo@kernel.org>"); diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h index ea46dde364e1..6c410c4a8d6e 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h @@ -1111,4 +1111,6 @@ void mt76_connac_mcu_coredump_event(struct mt76_dev *dev, struct sk_buff *skb, int mt76_connac_mcu_set_rate_txpower(struct mt76_phy *phy); int mt76_connac_mcu_set_p2p_oppps(struct ieee80211_hw *hw, struct ieee80211_vif *vif); +u32 mt76_connac_mcu_reg_rr(struct mt76_dev *dev, u32 offset); +void mt76_connac_mcu_reg_wr(struct mt76_dev *dev, u32 offset, u32 val); #endif /* __MT76_CONNAC_MCU_H */ -- 2.25.1
next prev parent reply other threads:[~2021-09-18 0:00 UTC|newest] Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-09-17 23:59 [PATCH v2 00/16] Add MT7921 SDIO support sean.wang 2021-09-17 23:59 ` sean.wang 2021-09-17 23:59 ` [PATCH v2 01/16] mt76: mt7921: refactor mac.c to be bus independent sean.wang 2021-09-17 23:59 ` sean.wang 2021-09-17 23:59 ` [PATCH v2 02/16] mt76: mt7921: refactor dma.c to be pcie specific sean.wang 2021-09-17 23:59 ` sean.wang 2021-09-17 23:59 ` [PATCH v2 03/16] mt76: mt7921: refactor mcu.c to be bus independent sean.wang 2021-09-17 23:59 ` sean.wang 2021-09-17 23:59 ` [PATCH v2 04/16] mt76: mt7921: refactor init.c " sean.wang 2021-09-17 23:59 ` sean.wang 2021-09-17 23:59 ` [PATCH v2 05/16] mt76: mt7921: add MT7921_COMMON module sean.wang 2021-09-17 23:59 ` sean.wang 2021-09-18 10:12 ` Lorenzo Bianconi 2021-09-18 10:12 ` Lorenzo Bianconi 2021-09-17 23:59 ` sean.wang [this message] 2021-09-17 23:59 ` [PATCH v2 06/16] mt76: connac: move mcu reg access utility routines in mt76_connac_lib module sean.wang 2021-09-18 10:15 ` Lorenzo Bianconi 2021-09-18 10:15 ` Lorenzo Bianconi 2021-09-17 23:59 ` [PATCH v2 07/16] mt76: mt7663s: rely on mcu reg access utility sean.wang 2021-09-17 23:59 ` sean.wang 2021-09-17 23:59 ` [PATCH v2 08/16] mt76: mt7921: make all event parser reusable between mt7921s and mt7921e sean.wang 2021-09-17 23:59 ` sean.wang 2021-09-18 10:16 ` Lorenzo Bianconi 2021-09-18 10:16 ` Lorenzo Bianconi 2021-09-17 23:59 ` [PATCH v2 09/16] mt76: mt7921: use physical addr to unify register access sean.wang 2021-09-17 23:59 ` sean.wang 2021-09-17 23:59 ` [PATCH v2 10/16] mt76: sdio: move common code in mt76_sdio module sean.wang 2021-09-17 23:59 ` sean.wang 2021-09-17 23:59 ` [PATCH v2 11/16] mt76: sdio: extend sdio module to support CONNAC2 sean.wang 2021-09-17 23:59 ` sean.wang 2021-09-17 23:59 ` [PATCH v2 12/16] mt76: connac: extend mcu_get_nic_capability sean.wang 2021-09-17 23:59 ` sean.wang 2021-09-17 23:59 ` [PATCH v2 13/16] mt76: mt7921: rely on mcu_get_nic_capability sean.wang 2021-09-17 23:59 ` sean.wang 2021-09-17 23:59 ` [PATCH v2 14/16] mt76: mt7921: refactor mt7921_mcu_send_message sean.wang 2021-09-17 23:59 ` sean.wang 2021-09-17 23:59 ` [PATCH v2 15/16] mt76: mt7921: introduce mt7921s support sean.wang 2021-09-17 23:59 ` sean.wang 2021-09-17 23:59 ` [PATCH v2 16/16] mt76: mt7921s: add reset support sean.wang 2021-09-17 23:59 ` sean.wang 2021-09-18 10:29 ` [PATCH v2 00/16] Add MT7921 SDIO support Lorenzo Bianconi 2021-09-18 10:29 ` Lorenzo Bianconi [not found] <YUW8KBTC7t3PHJwF@lore-desk--annotate> 2021-09-24 5:30 ` [PATCH v2 06/16] mt76: connac: move mcu reg access utility routines in mt76_connac_lib module sean.wang 2021-09-24 5:30 ` sean.wang
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=42112d6b7b1c09bcdfa37d4417e55ef45c09ceff.1631918993.git.objelf@gmail.com \ --to=sean.wang@mediatek.com \ --cc=Deren.Wu@mediatek.com \ --cc=Eddie.Chen@mediatek.com \ --cc=Eric-SY.Chang@mediatek.com \ --cc=Eric.Liang@mediatek.com \ --cc=Leon.Yen@mediatek.com \ --cc=Soul.Huang@mediatek.com \ --cc=Stella.Chang@mediatek.com \ --cc=YN.Chen@mediatek.com \ --cc=ch.yeh@mediatek.com \ --cc=frankgor@google.com \ --cc=jemele@google.com \ --cc=jsiuda@google.com \ --cc=km.lin@mediatek.com \ --cc=linux-mediatek@lists.infradead.org \ --cc=linux-wireless@vger.kernel.org \ --cc=lorenzo.bianconi@redhat.com \ --cc=nbd@nbd.name \ --cc=posh.sun@mediatek.com \ --cc=robin.chiu@mediatek.com \ --cc=shawnku@google.com \ --cc=steve.lee@mediatek.com \ --cc=ted.huang@mediatek.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.