Skip to content

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Wiseguy committed Sep 2, 2023
1 parent 4e694ef commit 64693f7
Show file tree
Hide file tree
Showing 7 changed files with 199 additions and 199 deletions.
2 changes: 1 addition & 1 deletion Makefile.ido
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ $(BUILD_DIR)/src/sp/%.marker: OPTFLAGS := -O3
$(BUILD_DIR)/src/audio/%.marker: OPTFLAGS := -O3
$(BUILD_DIR)/src/rg/%.marker: OPTFLAGS := -O3
$(BUILD_DIR)/src/gt/%.marker: OPTFLAGS := -O3
endif
endif
36 changes: 18 additions & 18 deletions src/io/driverominit.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@
OSPiHandle DriveRomHandle ALIGNED(8);

OSPiHandle *osDriveRomInit() {
u32 saveMask;
u32 saveMask;

if (DriveRomHandle.baseAddress == PHYS_TO_K1(PI_DOM1_ADDR1)) {
return &DriveRomHandle;
}
if (DriveRomHandle.baseAddress == PHYS_TO_K1(PI_DOM1_ADDR1)) {
return &DriveRomHandle;
}

DriveRomHandle.type = DEVICE_TYPE_BULK;
DriveRomHandle.baseAddress = PHYS_TO_K1(PI_DOM1_ADDR1);
DriveRomHandle.latency = 64;
DriveRomHandle.pulse = 7;
DriveRomHandle.pageSize = 7;
DriveRomHandle.relDuration = 2;
DriveRomHandle.domain = PI_DOMAIN1;
DriveRomHandle.speed = 0;
DriveRomHandle.type = DEVICE_TYPE_BULK;
DriveRomHandle.baseAddress = PHYS_TO_K1(PI_DOM1_ADDR1);
DriveRomHandle.latency = 64;
DriveRomHandle.pulse = 7;
DriveRomHandle.pageSize = 7;
DriveRomHandle.relDuration = 2;
DriveRomHandle.domain = PI_DOMAIN1;
DriveRomHandle.speed = 0;

bzero(&DriveRomHandle.transferInfo, sizeof(__OSTranxInfo));
bzero(&DriveRomHandle.transferInfo, sizeof(__OSTranxInfo));

saveMask = __osDisableInt();
DriveRomHandle.next = __osPiTable;
__osPiTable = &DriveRomHandle;
__osRestoreInt(saveMask);
saveMask = __osDisableInt();
DriveRomHandle.next = __osPiTable;
__osPiTable = &DriveRomHandle;
__osRestoreInt(saveMask);

return &DriveRomHandle;
return &DriveRomHandle;
}
40 changes: 20 additions & 20 deletions src/io/leodiskinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,29 @@ OSPiHandle LeoDiskHandle ALIGNED(8);
OSPiHandle *__osDiskHandle;

OSPiHandle *osLeoDiskInit() {
u32 saveMask;
u32 saveMask;

LeoDiskHandle.type = DEVICE_TYPE_64DD;
LeoDiskHandle.baseAddress = PHYS_TO_K1(PI_DOM2_ADDR1);
LeoDiskHandle.latency = 3;
LeoDiskHandle.pulse = 6;
LeoDiskHandle.pageSize = 6;
LeoDiskHandle.relDuration = 2;
LeoDiskHandle.domain = PI_DOMAIN2;
LeoDiskHandle.type = DEVICE_TYPE_64DD;
LeoDiskHandle.baseAddress = PHYS_TO_K1(PI_DOM2_ADDR1);
LeoDiskHandle.latency = 3;
LeoDiskHandle.pulse = 6;
LeoDiskHandle.pageSize = 6;
LeoDiskHandle.relDuration = 2;
LeoDiskHandle.domain = PI_DOMAIN2;

IO_WRITE(PI_BSD_DOM2_LAT_REG, LeoDiskHandle.latency);
IO_WRITE(PI_BSD_DOM2_PWD_REG, LeoDiskHandle.pulse);
IO_WRITE(PI_BSD_DOM2_PGS_REG, LeoDiskHandle.pageSize);
IO_WRITE(PI_BSD_DOM2_RLS_REG, LeoDiskHandle.relDuration);
LeoDiskHandle.speed = 0;
IO_WRITE(PI_BSD_DOM2_LAT_REG, LeoDiskHandle.latency);
IO_WRITE(PI_BSD_DOM2_PWD_REG, LeoDiskHandle.pulse);
IO_WRITE(PI_BSD_DOM2_PGS_REG, LeoDiskHandle.pageSize);
IO_WRITE(PI_BSD_DOM2_RLS_REG, LeoDiskHandle.relDuration);
LeoDiskHandle.speed = 0;

bzero(&LeoDiskHandle.transferInfo, sizeof(__OSTranxInfo));
bzero(&LeoDiskHandle.transferInfo, sizeof(__OSTranxInfo));

saveMask = __osDisableInt();
LeoDiskHandle.next = __osPiTable;
__osPiTable = &LeoDiskHandle;
__osDiskHandle = &LeoDiskHandle;
__osRestoreInt(saveMask);
saveMask = __osDisableInt();
LeoDiskHandle.next = __osPiTable;
__osPiTable = &LeoDiskHandle;
__osDiskHandle = &LeoDiskHandle;
__osRestoreInt(saveMask);

return &LeoDiskHandle;
return &LeoDiskHandle;
}
Loading

0 comments on commit 64693f7

Please sign in to comment.