mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-04 16:53:48 -04:00
boot: update to accurate as of 9.1.0
This commit is contained in:
parent
80e1847534
commit
4a30437e80
33 changed files with 843 additions and 220 deletions
|
@ -31,7 +31,10 @@ namespace ams::pinmux {
|
|||
#include "pinmux_initial_configuration_copper.inc"
|
||||
#include "pinmux_initial_configuration_hoag.inc"
|
||||
#include "pinmux_initial_configuration_iowa.inc"
|
||||
#include "pinmux_initial_configuration_calcio.inc"
|
||||
|
||||
#include "pinmux_initial_drive_pad_configuration.inc"
|
||||
#include "pinmux_initial_drive_pad_configuration_hoag.inc"
|
||||
|
||||
|
||||
/* Configuration helpers. */
|
||||
|
@ -42,20 +45,23 @@ namespace ams::pinmux {
|
|||
|
||||
switch (hw_type) {
|
||||
case spl::HardwareType::Icosa:
|
||||
configs = InitialConfigsIcosa;
|
||||
configs = InitialConfigsIcosa;
|
||||
num_configs = NumInitialConfigsIcosa;
|
||||
break;
|
||||
case spl::HardwareType::Copper:
|
||||
configs = InitialConfigsCopper;
|
||||
configs = InitialConfigsCopper;
|
||||
num_configs = NumInitialConfigsCopper;
|
||||
break;
|
||||
case spl::HardwareType::Hoag:
|
||||
configs = InitialConfigsHoag;
|
||||
configs = InitialConfigsHoag;
|
||||
num_configs = NumInitialConfigsHoag;
|
||||
break;
|
||||
case spl::HardwareType::Iowa:
|
||||
configs = InitialConfigsIowa;
|
||||
configs = InitialConfigsIowa;
|
||||
num_configs = NumInitialConfigsIowa;
|
||||
case spl::HardwareType::Calcio:
|
||||
configs = InitialConfigsCalcio;
|
||||
num_configs = NumInitialConfigsCalcio;
|
||||
break;
|
||||
/* Unknown hardware type, we can't proceed. */
|
||||
AMS_UNREACHABLE_DEFAULT_CASE();
|
||||
|
@ -68,20 +74,41 @@ namespace ams::pinmux {
|
|||
UpdatePad(configs[i].name, configs[i].val, configs[i].mask);
|
||||
}
|
||||
|
||||
/* Extra configs for iowa only. */
|
||||
if (hw_type == spl::HardwareType::Iowa) {
|
||||
static constexpr u32 ExtraIowaPadNames[] = {
|
||||
/* Extra configs for mariko only. */
|
||||
if (hw_type == spl::HardwareType::Hoag || hw_type == spl::HardwareType::Iowa || hw_type == spl::HardwareType::Calcio) {
|
||||
static constexpr u32 ExtraMarikoPadNames[] = {
|
||||
0xAA, 0xAC, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9
|
||||
};
|
||||
for (size_t i = 0; i < util::size(ExtraIowaPadNames); i++) {
|
||||
UpdatePad(ExtraIowaPadNames[i], 0x2000, 0x2000);
|
||||
for (size_t i = 0; i < util::size(ExtraMarikoPadNames); i++) {
|
||||
UpdatePad(ExtraMarikoPadNames[i], 0x2000, 0x2000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigureInitialDrivePads() {
|
||||
const InitialConfig *configs = InitialDrivePadConfigs;
|
||||
for (size_t i = 0; i < NumInitialDrivePadConfigs; i++) {
|
||||
const InitialConfig *configs = nullptr;
|
||||
size_t num_configs = 0;
|
||||
const auto hw_type = spl::GetHardwareType();
|
||||
|
||||
switch (hw_type) {
|
||||
case spl::HardwareType::Icosa:
|
||||
case spl::HardwareType::Copper:
|
||||
case spl::HardwareType::Iowa:
|
||||
case spl::HardwareType::Calcio:
|
||||
configs = InitialDrivePadConfigs;
|
||||
num_configs = NumInitialDrivePadConfigs;
|
||||
case spl::HardwareType::Hoag:
|
||||
configs = InitialDrivePadConfigsHoag;
|
||||
num_configs = NumInitialDrivePadConfigsHoag;
|
||||
break;
|
||||
/* Unknown hardware type, we can't proceed. */
|
||||
AMS_UNREACHABLE_DEFAULT_CASE();
|
||||
}
|
||||
|
||||
/* Ensure we found an appropriate config. */
|
||||
AMS_ABORT_UNLESS(configs != nullptr);
|
||||
|
||||
for (size_t i = 0; i < num_configs; i++) {
|
||||
UpdateDrivePad(configs[i].name, configs[i].val, configs[i].mask);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue