How do I access nvRAM from user space?
Bruce_Leonard at selinc.com
Bruce_Leonard at selinc.com
Fri Sep 26 03:18:48 EST 2008
Dave,
> > Sorry for the dumb question, I just can figure out the right google
search
> > to find what I'm trying to do. I'm running 2.6.27-rc4 on an mpc8347
with
> > a 32KiB nvSRAM (Cypress CY14B256L) on the local bus. We just want to
be
> > able to access this memory from user space seperately from "main"
memory.
> > We've got a process that needs to be able to remember info through
power
> > cycles. Can anyone point me to an article or some code snippet that
does
> > something like this so I can sink my teeth into it?
>
> Assuming your bootloader sets up the local bus access windows
> (physical address of the SRAM) and timing so that you can
> read/write to the SRAM, then once Linux boots, you should be
> able to just use /dev/mem as you would to access any other
> device registers at a specific address.
>
Thanks for the reply. So if my nvSRAM device is located at 0xb0000000 in
physical memory, what would the mmap() call look like? Also, do I need to
have a device tree entry for the kernel to know about the memory? I can
access the device in uboot so I know it works, but I can't figure out the
mmap to get it from linux
Bruce
More information about the Linuxppc-embedded
mailing list