linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* PowerPC iotable_init equivalent?
@ 2009-04-17 21:21 Eddie Dawydiuk
  2009-04-17 21:31 ` Roderick Colenbrander
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Eddie Dawydiuk @ 2009-04-17 21:21 UTC (permalink / raw)
  To: linuxppc-dev, Grant Likely

Hello,

In the past I've worked with ARM architectures where I could setup virtual / 
physical address mappings so I don't have to ioremap then pass around pointers. 
Does PowerPC have an equivalent abstraction? If not whats the recommended approach?

That is, is there a better approach to the following...

volatile static unsigned char *my_reg = NULL;

static inline void read_func() {

	if (!my_reg)
         	my_reg = (unsigned char *)
			ioremap(REG_PHYS_BASE, REG_SIZE);
//do something with the reg
}


static inline void write_func() {

	if (!my_reg)
         	my_reg = (unsigned char *)
			ioremap(REG_PHYS_BASE, REG_SIZE);
//do something with the reg
}

-- 
Best Regards,
________________________________________________________________
  Eddie Dawydiuk, Technologic Systems | voice:  (480) 837-5200
  16525 East Laser Drive 	     | fax:    (480) 837-5300
  Fountain Hills, AZ 85268            | web: www.embeddedARM.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-18  5:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-17 21:21 PowerPC iotable_init equivalent? Eddie Dawydiuk
2009-04-17 21:31 ` Roderick Colenbrander
2009-04-17 21:32 ` Kumar Gala
2009-04-18  5:42 ` Grant Likely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).