sdmmc: fix speed mode extension, add CheckMmcConnection for debug

This commit is contained in:
Michael Scire committed 2020-10-27 14:08:39 -07:00
1 parent b2f4e0c1b4
commit 9a41e19004
4 files changed
+17 -2

No files matched your search

@@ -38,5 +38,6 @@ namespace ams::sdmmc {
Result GetMmcBootPartitionCapacity(u32 *out_num_sectors, Port port);
Result GetMmcExtendedCsd(void *out_buffer, size_t buffer_size, Port port);
Result CheckMmcConnection(SpeedMode *out_speed_mode, BusWidth *out_bus_width, Port port);
}
@@ -65,7 +65,7 @@ namespace ams::sdmmc::impl {
return (ext_csd[163] & (1u << 1)) != 0;
}
constexpr bool GetDeviceType(const u8 *ext_csd) {
constexpr u8 GetDeviceType(const u8 *ext_csd) {
/* Get the DEVICE_TYPE register. */
AMS_ABORT_UNLESS(ext_csd != nullptr);
return ext_csd[196];
@@ -66,4 +66,8 @@ namespace ams::sdmmc {
return GetMmcDeviceAccessor(port)->GetMmcExtendedCsd(out_buffer, buffer_size);
}
Result CheckMmcConnection(SpeedMode *out_speed_mode, BusWidth *out_bus_width, Port port) {
return GetMmcDeviceAccessor(port)->CheckConnection(out_speed_mode, out_bus_width);
}
}