From c29db97f7353001524cb151cfde2c45246a2c032 Mon Sep 17 00:00:00 2001 From: CTCaer Date: Tue, 11 May 2021 10:24:48 +0300 Subject: [PATCH] hwinit/joycon: move uart clock deinits to joycon driver --- bdk/input/joycon.c | 4 ++++ bdk/soc/hw_init.c | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bdk/input/joycon.c b/bdk/input/joycon.c index 2e95414..825e347 100644 --- a/bdk/input/joycon.c +++ b/bdk/input/joycon.c @@ -715,6 +715,10 @@ void jc_deinit() jc_send_hid_cmd(UART_C, JC_HID_SUBCMD_HCI_STATE, &data, 1); jc_rcv_pkt(&jc_l); } + + // Disable UART B and C clocks. + clock_disable_uart(UART_B); + clock_disable_uart(UART_C); } static void jc_init_conn(joycon_ctxt_t *jc) diff --git a/bdk/soc/hw_init.c b/bdk/soc/hw_init.c index fd6eda7..1da102f 100644 --- a/bdk/soc/hw_init.c +++ b/bdk/soc/hw_init.c @@ -433,8 +433,6 @@ void hw_reinit_workaround(bool coreboot, u32 bl_magic) touch_power_off(); jc_deinit(); regulator_5v_disable(REGULATOR_5V_ALL); - clock_disable_uart(UART_B); - clock_disable_uart(UART_C); #endif // Flush/disable MMU cache and set DRAM clock to 204MHz.