From: "Gilad Rom" <gilad@romat.com>
To: "'Pete Popov'" <ppopov@embeddedalley.com>
Cc: "'Maciej W. Rozycki'" <macro@linux-mips.org>,
<linux-mips@linux-mips.org>
Subject: RE: CP0 EntryLo
Date: Tue, 30 Nov 2004 20:16:39 +0200 [thread overview]
Message-ID: <20041130181638.D260DEB2B8@mail.romat.com> (raw)
In-Reply-To: <41ACB576.6000501@embeddedalley.com>
> -----Original Message-----
> From: linux-mips-bounce@linux-mips.org
> [mailto:linux-mips-bounce@linux-mips.org] On Behalf Of Pete Popov
> Sent: Tuesday, November 30, 2004 8:01 PM
> To: Gilad Rom
> Cc: Maciej W. Rozycki; linux-mips@linux-mips.org
> Subject: Re: CP0 EntryLo
>
> Maciej W. Rozycki wrote:
> > On Tue, 30 Nov 2004, Gilad Rom wrote:
> >
> >
> >>So, what I need to do, if I understand correctly, is to
> create a fixed
> >>mapping
> >>>From a virtual address to a physical address on the tlb,
> and use this
> >>Virtual address to change the values of EntryLo to 0xD in order to
> >>Access the device on the address range I mapped Chip-select 1 to?
> >>
> >>(Excuse my poor phrasing, I've been googling all day...)
> >>
> >>Any idea on how I might accomplish that from a driver?
> >>I've found a function called add_wired_entry(...), is this
> >>What I should be using?
> >
> >
> > ioremap()
>
> Exactly. You program the CS with a physical address. Make sure that
> address does not overlap with anything else. Then you call ioremap
> from your driver and you get back a virtual address. You use that
> virtual address to access the peripheral.
Okay. I've pretty much figured out that part. What I'm puzzled
About now is how do change the values of the CP0 EntryLo0/1
Registers, since I've changed the DTY bits to "1" on the MEM_STCFG1
Register (in order to set it to work in "I/O Device" mode) ,
I need to "change bits 29:26 of CoProcessor 0 to 0xD" (Au1500 Databook
quote)
since the Databook doesn't specify an offset
To these registers, I assume they're not like the other
Registers I've been dealing with (Chip Select and GPIO).
>
> At this stage I would say that probably reading something like the
> Linux Kernel book or Linux Device Drivers both by Oreilly will
> really help you.
Thanks. Already been doing just that all day... ;)
WARNING: multiple messages have this Message-ID (diff)
From: "Gilad Rom" <gilad@romat.com>
To: 'Pete Popov' <ppopov@embeddedalley.com>
Cc: "'Maciej W. Rozycki'" <macro@linux-mips.org>, linux-mips@linux-mips.org
Subject: RE: CP0 EntryLo
Date: Tue, 30 Nov 2004 20:16:39 +0200 [thread overview]
Message-ID: <20041130181638.D260DEB2B8@mail.romat.com> (raw)
Message-ID: <20041130181639.PUMc-8ghyHKfa2BQ8Geupe5d5DSLt7KnvqfH9f9aTwE@z> (raw)
In-Reply-To: <41ACB576.6000501@embeddedalley.com>
> -----Original Message-----
> From: linux-mips-bounce@linux-mips.org
> [mailto:linux-mips-bounce@linux-mips.org] On Behalf Of Pete Popov
> Sent: Tuesday, November 30, 2004 8:01 PM
> To: Gilad Rom
> Cc: Maciej W. Rozycki; linux-mips@linux-mips.org
> Subject: Re: CP0 EntryLo
>
> Maciej W. Rozycki wrote:
> > On Tue, 30 Nov 2004, Gilad Rom wrote:
> >
> >
> >>So, what I need to do, if I understand correctly, is to
> create a fixed
> >>mapping
> >>>From a virtual address to a physical address on the tlb,
> and use this
> >>Virtual address to change the values of EntryLo to 0xD in order to
> >>Access the device on the address range I mapped Chip-select 1 to?
> >>
> >>(Excuse my poor phrasing, I've been googling all day...)
> >>
> >>Any idea on how I might accomplish that from a driver?
> >>I've found a function called add_wired_entry(...), is this
> >>What I should be using?
> >
> >
> > ioremap()
>
> Exactly. You program the CS with a physical address. Make sure that
> address does not overlap with anything else. Then you call ioremap
> from your driver and you get back a virtual address. You use that
> virtual address to access the peripheral.
Okay. I've pretty much figured out that part. What I'm puzzled
About now is how do change the values of the CP0 EntryLo0/1
Registers, since I've changed the DTY bits to "1" on the MEM_STCFG1
Register (in order to set it to work in "I/O Device" mode) ,
I need to "change bits 29:26 of CoProcessor 0 to 0xD" (Au1500 Databook
quote)
since the Databook doesn't specify an offset
To these registers, I assume they're not like the other
Registers I've been dealing with (Chip Select and GPIO).
>
> At this stage I would say that probably reading something like the
> Linux Kernel book or Linux Device Drivers both by Oreilly will
> really help you.
Thanks. Already been doing just that all day... ;)
next prev parent reply other threads:[~2004-11-30 18:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-30 9:56 CP0 EntryLo Gilad Rom
2004-11-30 9:56 ` Gilad Rom
2004-11-30 10:24 ` Dominic Sweetman
2004-11-30 10:24 ` Dominic Sweetman
2004-11-30 16:26 ` Gilad Rom
2004-11-30 16:26 ` Gilad Rom
2004-11-30 16:37 ` Maciej W. Rozycki
2004-11-30 18:01 ` Pete Popov
2004-11-30 18:16 ` Gilad Rom [this message]
2004-11-30 18:16 ` Gilad Rom
2004-11-30 18:45 ` Pete Popov
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=20041130181638.D260DEB2B8@mail.romat.com \
--to=gilad@romat.com \
--cc=linux-mips@linux-mips.org \
--cc=macro@linux-mips.org \
--cc=ppopov@embeddedalley.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.