mirror of https://github.com/zeldaret/mm.git
epiwrite.c OK (#411)
* epiwrite.c OK * uintptr_t * Reintroduce bad code rather than start rearranging headers
This commit is contained in:
parent
987566eebe
commit
40ec8a9fc0
|
|
@ -1,12 +1,10 @@
|
|||
#include "global.h"
|
||||
|
||||
s32 __osEPiRawWriteIo(OSPiHandle* handle, u32 devAddr, u32 data) {
|
||||
s32 __osEPiRawWriteIo(OSPiHandle* handle, uintptr_t devAddr, u32 data) {
|
||||
s32 status;
|
||||
OSPiHandle* curHandle;
|
||||
|
||||
while (status = HW_REG(PI_STATUS_REG, u32), status & (PI_STATUS_BUSY | PI_STATUS_IOBUSY)) {
|
||||
;
|
||||
}
|
||||
while (status = HW_REG(PI_STATUS_REG, u32), status & (PI_STATUS_BUSY | PI_STATUS_IOBUSY)) {}
|
||||
|
||||
if (__osCurrentHandle[handle->domain]->type != handle->type) {
|
||||
curHandle = __osCurrentHandle[handle->domain];
|
||||
|
|
|
|||
|
|
@ -1,3 +1,11 @@
|
|||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/boot/epiwrite/osEPiWriteIo.s")
|
||||
s32 osEPiWriteIo(OSPiHandle* handle, uintptr_t devAddr, u32 data) {
|
||||
register s32 ret;
|
||||
|
||||
__osPiGetAccess();
|
||||
ret = __osEPiRawWriteIo(handle, devAddr, data);
|
||||
__osPiRelAccess();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue