Make NAND, crypto use dma_addr

This commit is contained in:
marcan 2009-03-06 05:26:34 +01:00 committed by bushing
parent d0956805d3
commit b140065503
2 changed files with 4 additions and 4 deletions

View File

@ -113,8 +113,8 @@ void aes_decrypt(u8 *src, u8 *dst, u32 blocks, u8 keep_iv)
if (this_blocks > 0x80)
this_blocks = 0x80;
write32(AES_SRC, (u32)src);
write32(AES_DEST, (u32)dst);
write32(AES_SRC, dma_addr(src));
write32(AES_DEST, dma_addr(dst));
aes_command(AES_CMD_DECRYPT, keep_iv, this_blocks);
blocks -= this_blocks;

4
nand.c
View File

@ -99,11 +99,11 @@ void __nand_setup_dma(u8 *data, u8 *spare) {
NAND_debug("nand_setup_dma: %p, %p\n", data, spare);
if (((s32)data) != -1) {
dc_invalidaterange(data, 0x800);
__nand_write32(NAND_DATA, (s32)data);
__nand_write32(NAND_DATA, dma_addr(data));
}
if (((s32)spare) != -1) {
dc_invalidaterange(spare, 0x50); // +0x10 for calculated syndrome?
__nand_write32(NAND_ECC, (s32)spare);
__nand_write32(NAND_ECC, dma_addr(spare));
}
}