diff --git a/board/qca/arm/common/fdt_fixup.c b/board/qca/arm/common/fdt_fixup.c index 9c43f0acfc..4704b43690 100644 --- a/board/qca/arm/common/fdt_fixup.c +++ b/board/qca/arm/common/fdt_fixup.c @@ -866,6 +866,13 @@ __weak void fdt_fixup_art_format(void *blob) return; } +#ifdef CONFIG_IPQ_BT_SUPPORT +__weak void fdt_fixup_bt_running(void *blob) +{ + return; +} +#endif + __weak void fdt_fixup_bt_debug(void *blob) { return; @@ -1052,6 +1059,10 @@ int ft_board_setup(void *blob, bd_t *bd) if (s) { fdt_fixup_bt_debug(blob); } + +#ifdef CONFIG_IPQ_BT_SUPPORT + fdt_fixup_bt_running(blob); +#endif /* || This features fixup compressed_art in || dts if its 16M profile build. diff --git a/board/qca/arm/ipq5018/bt.h b/board/qca/arm/ipq5018/bt.h index 92af9e27e6..bb54444742 100644 --- a/board/qca/arm/ipq5018/bt.h +++ b/board/qca/arm/ipq5018/bt.h @@ -205,4 +205,5 @@ struct ipc_intent { extern int bt_ipc_sendmsg(struct bt_descriptor *btDesc, unsigned char *buf, int len ); extern void bt_ipc_init(struct bt_descriptor *btDesc); extern void bt_ipc_worker(struct bt_descriptor *btDesc); +extern int bt_running; #endif /* _BT_H */ diff --git a/board/qca/arm/ipq5018/ipq5018.c b/board/qca/arm/ipq5018/ipq5018.c index db16be1e50..01b4d44498 100644 --- a/board/qca/arm/ipq5018/ipq5018.c +++ b/board/qca/arm/ipq5018/ipq5018.c @@ -484,6 +484,8 @@ void fdt_fixup_auto_restart(void *blob) } #ifdef CONFIG_IPQ_BT_SUPPORT +int bt_running; + unsigned char hci_reset[] = {0x01, 0x03, 0x0c, 0x00}; @@ -659,8 +661,16 @@ int bt_init(void) send_bt_hci_cmds(btDesc); + bt_running = 1; return 0; } + +void fdt_fixup_bt_running(void *blob) +{ + if (bt_running) { + parse_fdt_fixup("/soc/bt@7000000%qcom,bt-running%1", blob); + } +} #endif void reset_crashdump(void)