ipq5018: Add BT state information in dts

Add BT state information to patch dts when the BT is started at bootloader.

Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
Change-Id: Ib88150bb6c8469ec6d63578ce5c4ab21511aff60
This commit is contained in:
Amandeep Singh 2021-02-04 10:41:39 +05:30 committed by Gerrit - the friendly Code Review server
parent b05847a5de
commit 695eea1bf0
3 changed files with 22 additions and 0 deletions

View file

@ -866,6 +866,13 @@ __weak void fdt_fixup_art_format(void *blob)
return; return;
} }
#ifdef CONFIG_IPQ_BT_SUPPORT
__weak void fdt_fixup_bt_running(void *blob)
{
return;
}
#endif
__weak void fdt_fixup_bt_debug(void *blob) __weak void fdt_fixup_bt_debug(void *blob)
{ {
return; return;
@ -1052,6 +1059,10 @@ int ft_board_setup(void *blob, bd_t *bd)
if (s) { if (s) {
fdt_fixup_bt_debug(blob); fdt_fixup_bt_debug(blob);
} }
#ifdef CONFIG_IPQ_BT_SUPPORT
fdt_fixup_bt_running(blob);
#endif
/* /*
|| This features fixup compressed_art in || This features fixup compressed_art in
|| dts if its 16M profile build. || dts if its 16M profile build.

View file

@ -205,4 +205,5 @@ struct ipc_intent {
extern int bt_ipc_sendmsg(struct bt_descriptor *btDesc, unsigned char *buf, int len ); 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_init(struct bt_descriptor *btDesc);
extern void bt_ipc_worker(struct bt_descriptor *btDesc); extern void bt_ipc_worker(struct bt_descriptor *btDesc);
extern int bt_running;
#endif /* _BT_H */ #endif /* _BT_H */

View file

@ -484,6 +484,8 @@ void fdt_fixup_auto_restart(void *blob)
} }
#ifdef CONFIG_IPQ_BT_SUPPORT #ifdef CONFIG_IPQ_BT_SUPPORT
int bt_running;
unsigned char hci_reset[] = unsigned char hci_reset[] =
{0x01, 0x03, 0x0c, 0x00}; {0x01, 0x03, 0x0c, 0x00};
@ -659,8 +661,16 @@ int bt_init(void)
send_bt_hci_cmds(btDesc); send_bt_hci_cmds(btDesc);
bt_running = 1;
return 0; return 0;
} }
void fdt_fixup_bt_running(void *blob)
{
if (bt_running) {
parse_fdt_fixup("/soc/bt@7000000%qcom,bt-running%1", blob);
}
}
#endif #endif
void reset_crashdump(void) void reset_crashdump(void)