hwinit: Add proper deinit for new components

This commit is contained in:
CTCaer
2020-04-30 15:09:25 +03:00
parent 81f0c0a0dc
commit 448cc49cff
2 changed files with 11 additions and 11 deletions

View File

@@ -21,9 +21,11 @@
#include "clock.h"
#include "gpio.h"
#include "pmc.h"
#include "uart.h"
#include "t210.h"
#include "../mem/minerva.h"
#include "../gfx/di.h"
#include "../input/joycon.h"
#include "../input/touch.h"
#include "../power/regulator_5v.h"
#include "../storage/nx_sd.h"
@@ -38,10 +40,13 @@ void reconfig_hw_workaround(bool extra_reconfig, u32 magic)
// Disable BPMP max clock.
bpmp_clk_rate_set(BPMP_CLK_NORMAL);
// Deinit touchscreen and 5V regulators.
// Deinit touchscreen, 5V regulators and Joy-Con.
touch_power_off();
set_fan_duty(0);
jc_deinit();
regulator_disable_5v(REGULATOR_5V_ALL);
clock_disable_uart(UART_B);
clock_disable_uart(UART_C);
// Flush/disable MMU cache and set DRAM clock to 204MHz.
bpmp_mmu_disable();