Skip to content

Commit 2fc967c

Browse files
Mark Chenholtmann
authored andcommitted
Bluetooth: mt7921s: fix firmware coredump retrieve
According to the MCU firmware behavior, as the driver is aware of the notification of the interrupt source FW_MAILBOX_INT that shows the MCU completed delivered a core dump piece to the host, the driver must acknowledge the MCU with the register PH2DSM0R bit PH2DSM0R_DRIVER_OWN to notify the MCU to handle the next core dump piece. Fixes: db57b62 ("Bluetooth: btmtksdio: add support of processing firmware coredump and log") Co-developed-by: Sean Wang <[email protected]> Signed-off-by: Sean Wang <[email protected]> Signed-off-by: Mark Chen <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent 9d7cbe2 commit 2fc967c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

drivers/bluetooth/btmtksdio.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,12 @@ MODULE_DEVICE_TABLE(sdio, btmtksdio_table);
8787
#define RX_DONE_INT BIT(1)
8888
#define TX_EMPTY BIT(2)
8989
#define TX_FIFO_OVERFLOW BIT(8)
90+
#define FW_MAILBOX_INT BIT(15)
9091
#define RX_PKT_LEN GENMASK(31, 16)
9192

93+
#define MTK_REG_PH2DSM0R 0xc4
94+
#define PH2DSM0R_DRIVER_OWN BIT(0)
95+
9296
#define MTK_REG_CTDR 0x18
9397

9498
#define MTK_REG_CRDR 0x1c
@@ -481,6 +485,12 @@ static void btmtksdio_txrx_work(struct work_struct *work)
481485
*/
482486
sdio_writel(bdev->func, int_status, MTK_REG_CHISR, NULL);
483487

488+
if ((int_status & FW_MAILBOX_INT) &&
489+
bdev->data->chipid == 0x7921) {
490+
sdio_writel(bdev->func, PH2DSM0R_DRIVER_OWN,
491+
MTK_REG_PH2DSM0R, 0);
492+
}
493+
484494
if (int_status & FW_OWN_BACK_INT)
485495
bt_dev_dbg(bdev->hdev, "Get fw own back");
486496

0 commit comments

Comments
 (0)