Revert "Misc fixes for dsiwifi BMI stage (#1216)"

This reverts commit a54b076b06.
This commit is contained in:
Nadia Holmquist Pedersen 2021-10-02 13:57:52 +02:00
parent b7992cc084
commit b92622b765
3 changed files with 1 additions and 70 deletions

View File

@ -572,18 +572,6 @@ void DSi_NWifi::SendCMD(u8 cmd, u32 param)
{
switch (cmd)
{
case 3: // SEND_RELATIVE_ADDR
Host->SendResponse(0, true);
return;
case 5: // IO_SEND_OP_COND, dummy response
Host->SendResponse(0x80000000, true);
return;
case 7: // SELECT_CARD
Host->SendResponse(0, true);
return;
case 12:
// stop command
// CHECKME: does the SDIO controller actually send those??
@ -739,16 +727,12 @@ void DSi_NWifi::HandleCommand()
void DSi_NWifi::BMI_Command()
{
// Need a full command written
if (Mailbox[0].Level() < 0x4) return;
u32 cmd = MB_Peek32(0);
u32 cmd = MB_Read32(0);
switch (cmd)
{
case 0x01: // BMI_DONE
{
MB_Read32(0); // cmd pop
printf("BMI_DONE\n");
EEPROMReady = 1; // GROSS FUCKING HACK
u8 ready_msg[6] = {0x0A, 0x00, 0x08, 0x06, 0x16, 0x00};
@ -759,12 +743,6 @@ void DSi_NWifi::BMI_Command()
case 0x03: // BMI_WRITE_MEMORY
{
if (Mailbox[0].Level() < 0xC)
{
printf("BMI_WRITE_MEMORY wait for data...\n");
return;
}
MB_Read32(0); // cmd pop
u32 addr = MB_Read32(0);
u32 len = MB_Read32(0);
printf("BMI mem write %08X %08X\n", addr, len);
@ -780,12 +758,6 @@ void DSi_NWifi::BMI_Command()
case 0x04: // BMI_EXECUTE
{
if (Mailbox[0].Level() < 0xC)
{
printf("BMI_EXECUTE wait for data...\n");
return;
}
u32 entry = MB_Read32(0);
u32 arg = MB_Read32(0);
@ -795,12 +767,6 @@ void DSi_NWifi::BMI_Command()
case 0x06: // BMI_READ_SOC_REGISTER
{
if (Mailbox[0].Level() < 0x8)
{
printf("BMI_READ_SOC_REGISTER wait for data...\n");
return;
}
MB_Read32(0); // cmd pop
u32 addr = MB_Read32(0);
u32 val = WindowRead(addr);
MB_Write32(4, val);
@ -809,12 +775,6 @@ void DSi_NWifi::BMI_Command()
case 0x07: // BMI_WRITE_SOC_REGISTER
{
if (Mailbox[0].Level() < 0xC)
{
printf("BMI_WRITE_SOC_REGISTER wait for data...\n");
return;
}
MB_Read32(0); // cmd pop
u32 addr = MB_Read32(0);
u32 val = MB_Read32(0);
WindowWrite(addr, val);
@ -822,7 +782,6 @@ void DSi_NWifi::BMI_Command()
return;
case 0x08: // BMI_GET_TARGET_ID
MB_Read32(0); // cmd pop
MB_Write32(4, 0xFFFFFFFF);
MB_Write32(4, 0x0000000C);
MB_Write32(4, ROMID);
@ -831,12 +790,6 @@ void DSi_NWifi::BMI_Command()
case 0x0D: // BMI_LZ_STREAM_START
{
if (Mailbox[0].Level() < 0x8)
{
printf("BMI_LZ_STREAM_START wait for data...\n");
return;
}
MB_Read32(0); // cmd pop
u32 addr = MB_Read32(0);
printf("BMI_LZ_STREAM_START %08X\n", addr);
}
@ -844,13 +797,6 @@ void DSi_NWifi::BMI_Command()
case 0x0E: // BMI_LZ_DATA
{
if (Mailbox[0].Level() < 0x8)
{
printf("BMI_LZ_DATA wait for data...\n");
return;
}
MB_Read32(0); // cmd pop
u32 len = MB_Read32(0);
printf("BMI LZ write %08X\n", len);
//FILE* f = fopen("debug/wififirm.bin", "ab");

View File

@ -95,20 +95,6 @@ private:
Mailbox[n].Write(val & 0xFF);
}
u32 MB_Peek32(int n)
{
return MB_Peek32(n, 0);
}
u32 MB_Peek32(int n, int offs)
{
u32 ret = Mailbox[n].Peek(offs+0);
ret |= (Mailbox[n].Peek(offs+1) << 8);
ret |= (Mailbox[n].Peek(offs+2) << 16);
ret |= (Mailbox[n].Peek(offs+3) << 24);
return ret;
}
u32 MB_Read32(int n)
{
u32 ret = Mailbox[n].Read();

View File

@ -447,7 +447,6 @@ u16 DSi_SDHost::Read(u32 addr)
case 0x028: return SDOption;
case 0x02C: return 0; // TODO
case 0x02E: return 0; // TODO
case 0x034: return CardIRQCtl;
case 0x036: return CardIRQStatus;