Re: PPC beginner questions

3 messages, 2 authors, 2006-08-21 · open the first message on its own page

Re: PPC beginner questions

From: Grant Likely <hidden>
Date: 2006-08-21 15:38:10

On 8/21/06, Wade Maxfield [off-list ref] wrote:
Hi Grant,

  Thanks!

  in*
  out*

  I'm assuming inb() outb(), inw() outw()??  I've been googling and have
come up short with info that makes sense. It is almost all x86 centric.
in_8, in_be16, in_be32, out_8, out_be16, out_be32 for big-endian
device registers
in_8, in_le16, in_le32, out_8, out_le16, out_le32 for little endian
device registers
  We will not be porting these drivers, this is a captive box internal use
only, limited run (200 units or so), 10 to 20 year lifespan once it hits the
field.

  So, the virtual address I get back can be used directly.  Can I cast to
short * and long * and char *?
heh, yes you can; but if your writing new code why not use good
practice from the start?  :)
   I apologize for the basic questions, but I expect this will be a final
question for quite some time.
No worries; ask away!

Cheers,
g.


BTW, when on the mailing list, please use "reply to all" and put your
comments below what you're commenting on.  This keeps the thread on
the mailing list for others to see, and it makes it blatentely obvious
what you're commenting on.  (just general list-etiquette)

-- 
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

Re: PPC beginner questions

From: Wade Maxfield <hidden>
Date: 2006-08-21 16:07:06

 OK.  I'm breaking my promise. :)  A couple more questions.

On 8/21/06, Grant Likely [off-list ref] wrote:
On 8/21/06, Wade Maxfield [off-list ref] wrote:
quoted
Hi Grant,

  Thanks!

  in*
  out*

  I'm assuming inb() outb(), inw() outw()??  I've been googling and have
come up short with info that makes sense. It is almost all x86 centric.
in_8, in_be16, in_be32, out_8, out_be16, out_be32 for big-endian
device registers
in_8, in_le16, in_le32, out_8, out_le16, out_le32 for little endian
device registers

-->Interesting.  Do these functions do 'eieio'  (Email, Internet, Electronic
Information Officer functions (southpark cartoon), err, or  Enforce In-Order
Execution of Input/Output) for me, or do I have to do that?  I'm still
confused as to that Old MacDonald function.

quoted
  We will not be porting these drivers, this is a captive box internal
use
quoted
only, limited run (200 units or so), 10 to 20 year lifespan once it hits
the
quoted
field.

  So, the virtual address I get back can be used directly.  Can I cast
to
quoted
short * and long * and char *?
heh, yes you can; but if your writing new code why not use good
practice from the start?  :)

--> Ok, you win.  How about ioread8() or inb() also?  Are they not coded in
PPC correctly? Or is the in_8() more modern?

quoted
   I apologize for the basic questions, but I expect this will be a
final
quoted
question for quite some time.
No worries; ask away!


--> is ioremap() equivalent to ioremap_nocache() on the PPC 405?


THANKS AGAIN!!!!
wade :)

Cheers,
g.


BTW, when on the mailing list, please use "reply to all" and put your
comments below what you're commenting on.  This keeps the thread on
the mailing list for others to see, and it makes it blatentely obvious
what you're commenting on.  (just general list-etiquette)

--
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

Re: PPC beginner questions

From: Grant Likely <hidden>
Date: 2006-08-21 16:24:45

On 8/21/06, Wade Maxfield [off-list ref] wrote:
On 8/21/06, Grant Likely <grant.likely@secretlab.ca > wrote:
quoted
On 8/21/06, Wade Maxfield <wmaxfield@gmail.com > wrote:
quoted
quoted
  I'm assuming inb() outb(), inw() outw()??  I've been googling and have
come up short with info that makes sense. It is almost all x86 centric.
in_8, in_be16, in_be32, out_8, out_be16, out_be32 for big-endian
device registers
in_8, in_le16, in_le32, out_8, out_le16, out_le32 for little endian
device registers

-->Interesting.  Do these functions do 'eieio'  (Email, Internet, Electronic
Information Officer functions (southpark cartoon), err, or  Enforce In-Order
Execution of Input/Output) for me, or do I have to do that?  I'm still
confused as to that Old MacDonald function.
The in functions do isync
The out functions do eieio
quoted
heh, yes you can; but if your writing new code why not use good
practice from the start?  :)

--> Ok, you win.  How about ioread8() or inb() also?  Are they not coded in
PPC correctly? Or is the in_8() more modern?
read include/asm/io.h.  All the IO routines are defined there.
read[bwl] and write[bwl] are just macros to in_* out_*, as are inb,
outb, etc.

Cheers,
g.

-- 
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help