Make NAND call ahbmemflush/magic_bullshit like IOS does

This commit is contained in:
marcan 2009-03-07 06:43:05 +01:00 committed by bushing
parent efba85b43e
commit 49660bd39f

4
nand.c
View File

@ -56,6 +56,8 @@ static int ipc_tag = 0;
void nand_irq(void) void nand_irq(void)
{ {
int code, tag; int code, tag;
ahb_memflush(NAND);
magic_bullshit(0);
if (ipc_code != 0) { if (ipc_code != 0) {
code = ipc_code; code = ipc_code;
tag = ipc_tag; tag = ipc_tag;
@ -76,6 +78,8 @@ inline void __nand_write32(u32 addr, u32 data)
inline void __nand_wait(void) { inline void __nand_wait(void) {
while(__nand_read32(NAND_CMD) & NAND_BUSY_MASK); while(__nand_read32(NAND_CMD) & NAND_BUSY_MASK);
ahb_memflush(NAND);
magic_bullshit(0);
} }
void nand_send_command(u32 command, u32 bitmask, u32 flags, u32 num_bytes) { void nand_send_command(u32 command, u32 bitmask, u32 flags, u32 num_bytes) {