Skip to content

Commit 80158e7

Browse files
committed
Additional sagssd debug lines
1 parent fa71fdf commit 80158e7

5 files changed

Lines changed: 12 additions & 13 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2154,3 +2154,4 @@ workbench/tools/BoingIconBar/strings.h
21542154
workbench/tools/InstallAROS/strings.h
21552155
workbench/tools/SysExplorer/strings.h
21562156
workbench/tools/WiMP/strings.h
2157+
arch/m68k-amiga/boot/romlog.txt

arch/m68k-amiga/boot/romlog.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Idx Name Size VMA LMA File off Algn
2-
0 .rom 00078cd0 00f80000 00f80000 0007c000 2**2
3-
1 .ext 000782b6 00e00000 00e00000 00002000 2**2
2+
0 .rom 0007a270 00f80000 00f80000 00082000 2**2
3+
1 .ext 0007e89e 00e00000 00e00000 00002000 2**2

arch/m68k-amiga/devs/sagasd/sagasd_device.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -868,9 +868,6 @@ static void SAGASD_IOTask(struct Library *SysBase)
868868
Permit();
869869
}
870870

871-
debug("SD-Card Change Detection: unit = %d | Detect Mode = %s | sdu_Present = %s | detect = %s",
872-
sdu->sdu_SDCmd.unitnumber, sdpin ? "HW":"SW", sdu->sdu_Present ? "TRUE":"FALSE", present ? "TRUE":"FALSE");
873-
874871
if (present)
875872
{
876873
// SD-Card is Inserted
@@ -879,6 +876,7 @@ static void SAGASD_IOTask(struct Library *SysBase)
879876
sdu->sdu_Present = TRUE;
880877
sdu->sdu_ChangeNum++;
881878
sdu->sdu_Valid = TRUE;
879+
debug("SD-Card Change Detection: unit = %d | Detect Mode = %s | sdu_Present = %s | detect = %s", sdu->sdu_SDCmd.unitnumber, sdpin ? "HW":"SW", sdu->sdu_Present ? "TRUE":"FALSE", present ? "TRUE":"FALSE");
882880
debug("\t sdu_Valid: %s", sdu->sdu_Valid ? "TRUE" : "FALSE");
883881
debug("\t Blocks: %ld", sdu->sdu_SDCmd.info.blocks);
884882

@@ -903,16 +901,14 @@ static void SAGASD_IOTask(struct Library *SysBase)
903901
Permit();
904902
}
905903

906-
debug("SD-Card Change Detection: unit = %d | Detect Mode = %s | sdu_Present = %s | detect = %s",
907-
sdu->sdu_SDCmd.unitnumber, sdpin ? "HW":"SW", sdu->sdu_Present ? "TRUE":"FALSE", present ? "TRUE":"FALSE");
908-
909904
if (!present)
910905
{
911906
// SD-Card is Removed
912907
Forbid();
913908
sdu->sdu_Present = FALSE;
914909
sdu->sdu_Valid = FALSE;
915-
910+
debug("SD-Card Change Detection: unit = %d | Detect Mode = %s | sdu_Present = %s | detect = %s", sdu->sdu_SDCmd.unitnumber, sdpin ? "HW":"SW", sdu->sdu_Present ? "TRUE":"FALSE", present ? "TRUE":"FALSE");
911+
916912
for (int i=sdu->sdu_AddChangeListItems; i>0; i--)
917913
{
918914
if (sdu->sdu_AddChangeList[i])
@@ -942,7 +938,7 @@ static void SAGASD_IOTask(struct Library *SysBase)
942938

943939
if (io)
944940
{
945-
//debug("io_Command received: %d", io->io_Command);
941+
debug("io_Command received: %d", io->io_Command);
946942

947943
io->io_Error = SAGASD_PerformIO(io);
948944
io->io_Message.mn_Node.ln_Type=NT_MESSAGE;

arch/m68k-amiga/devs/sagasd/sdcmd.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ static UBYTE sdcmd_r1a(struct sdcmd *sd)
241241
if (!(r1 & SDERRF_TIMEOUT)) return r1;
242242
}
243243

244+
debug("r1=0x%08lx", r1);
244245
return SDERRF_TIMEOUT;
245246
}
246247

@@ -348,6 +349,7 @@ UBYTE sdcmd_read_packet(struct sdcmd *sd, UBYTE *buff, int len)
348349
if (i == SDCMD_TIMEOUT)
349350
{
350351
sdcmd_select(sd, FALSE);
352+
debug("SDERRF_TIMEOUT");
351353
return SDERRF_TIMEOUT;
352354
}
353355

@@ -400,7 +402,7 @@ UBYTE sdcmd_stop_transmission(struct sdcmd *sd)
400402

401403
exit:
402404
sdcmd_select(sd, FALSE);
403-
405+
debug("SDERRF_CRC");
404406
return (i == SDCMD_TIMEOUT) ? SDERRF_TIMEOUT : r1;
405407
}
406408

@@ -433,6 +435,7 @@ UBYTE sdcmd_write_packet(struct sdcmd *sd, UBYTE token, CONST UBYTE *buff, int l
433435
if ((byte & SDDRS_VALID_MASK) != SDDRS_VALID) {
434436
/* Terminate the read early */
435437
sdcmd_stop_transmission(sd);
438+
debug("SDERRF_CRC");
436439
return SDERRF_CRC;
437440
}
438441

@@ -521,7 +524,7 @@ UBYTE sdcmd_read_blocks(struct sdcmd *sd, ULONG addr, UBYTE *buff, int blocks)
521524
for (; blocks > 0; addr++, blocks--, buff += SDSIZ_BLOCK) {
522525
r1 = sdcmd_read_packet(sd, buff, SDSIZ_BLOCK);
523526
if (r1) {
524-
//debug("r1=$%02lx", r1);
527+
debug("r1=$%02lx", r1);
525528
/* Terminate the read early */
526529
sdcmd_stop_transmission(sd);
527530
break;

rebuild_all.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ DISTOPTVER="--enable-dist-version=${DISTROVERSION}"
3838

3939
./configure "${DISTOPTNAME}" "${DISTOPTVER}" --target=amiga-m68k --with-optimization="-O2" --enable-ccache --with-aros-prefs=classic --with-resolution=640x256x4 --with-cpu=68040 --disable-mmu $@
4040

41-
make -j${THREADS} compiler
4241
make -j${THREADS}
4342
make -j${THREADS} distfiles
4443

0 commit comments

Comments
 (0)