Skip to content

Commit

Permalink
Merge pull request #25 from linux-3ds/fix-n3ds-clocking
Browse files Browse the repository at this point in the history
fix new3ds clocking when booting from fb3ds/gm9

now it only reclocks when the current mode is different from the previous one
  • Loading branch information
Wolfvak authored Oct 19, 2021
2 parents d07e6ad + b6b4693 commit ecb0f0d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion arm11/source/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ static void wait_cycles(unsigned short cycles)

static void set_clock(short socmode)
{
set_pdn_lgr_socmode(get_pdn_lgr_socmode());

if ((get_pdn_lgr_socmode() & 7) == socmode)
return;

set_pdn_lgr_socmode(socmode);

// Loop until the ACK bit is set.
Expand Down Expand Up @@ -95,7 +100,7 @@ static void online_cores23(void)
scu_set_cpu_stat(scu_get_cpu_stat() & 0x0F);
downclock();
setup_overlays();
upclock();
// upclock();
gic_send_swi(2, 2);
gic_send_swi(3, 3);
}
Expand Down

0 comments on commit ecb0f0d

Please sign in to comment.