machine/spi_sdcard.cpp: Report status for requests of CMD58 (READ_OCR) (#12212)

This commit is contained in:
holub 2024-04-03 14:25:03 -04:00 committed by GitHub
parent e534420ffe
commit 745b8c71b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -430,14 +430,8 @@ void spi_sdcard_device::do_command()
case 58: // CMD58 - READ_OCR
m_data[0] = 0;
if (m_type == SD_TYPE_HC)
{
m_data[1] = 0x40; // indicate SDHC support
}
else
{
m_data[1] = 0;
}
m_data[1] = 0x80; // Busy Status: 1b - Initialization Complete
m_data[1] |= (m_type == SD_TYPE_V2) ? 0 : 0x40; // Card Capacity Status: 0b - SDCS, 1b SDHC, SDXC
m_data[2] = 0;
m_data[3] = 0;
m_data[4] = 0;