public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: David Hawkins <dwh@ovro•caltech.edu>
To: Bruce_Leonard@selinc•com
Cc: linuxppc-embedded@ozlabs•org
Subject: Re: How do I access nvRAM from user space?
Date: Thu, 25 Sep 2008 08:53:38 -0700	[thread overview]
Message-ID: <48DBB402.8090402@ovro.caltech.edu> (raw)
In-Reply-To: <OFFC64870C.57753273-ON882574CF.001088E7-882574CF.001228E4@selinc.com>

Hi Bruce,

> 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.

Cheers,
Dave

  parent reply	other threads:[~2008-09-25 16:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-25  3:18 How do I access nvRAM from user space? Bruce_Leonard
2008-09-25  5:45 ` yanjun.luo
2008-09-25 15:53 ` David Hawkins [this message]
2008-09-25 17:18   ` Bruce_Leonard
2008-09-25 18:13     ` Bruce_Leonard
2008-09-25 18:14     ` David Hawkins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48DBB402.8090402@ovro.caltech.edu \
    --to=dwh@ovro$(echo .)caltech.edu \
    --cc=Bruce_Leonard@selinc$(echo .)com \
    --cc=linuxppc-embedded@ozlabs$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox