<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div>Hi,<br><br>I'm trying to set up the UPM RAM table for NAND access.<br>Here is how I do it:<br><br> char __iomem *lbc_addr;<br> int i;<br><br> lbc_addr = ioremap(0xa0000000, 0x10);<br><br> /* NAND chip (256MB) will be driven by UPM-A at LBC address 0xa0000000 */<br> out_be32(&fsl_lbc_regs->bank[4].br, 0xa0000881);<br> out_be32(&fsl_lbc_regs->bank[4].or, 0xf0000001);<br><br> /* setup MAMR for sequential write to UPM-A RAM */<br>
out_be32(&fsl_lbc_regs->mamr, 0x10000000);<br><br> for (i = 0; i < 64; i++) {<br> out_be32(&fsl_lbc_regs->mdr, UPMATable[i]);<br> out_8(lbc_addr, 0); /* dummy write, byte wide */<br> }<br><br> /* restore MAMR */<br> out_be32(&fsl_lbc_regs->mamr, 0x00000000);<br><br>But this does not seem to be working. I have verified this in two ways<br><br>a) for each write to mdr in the for loop above, I read back mamr and print it. This should have an incrementing<br>MAD value, but it does not<br><br>b) I read back the data that I had stored in UPM-A RAM and that logic does not work
either.<br><br>My take is that out_8(lbc_addr, 0) is not working because I'm not mapping lbc_addr correctly.<br>Can someone tell me what I'm doing wrong?<br><br>thanks for your help<br>LK<br><br></div></div><br>
</body></html>