* 8260 fcc_enet driver newbie question
@ 2005-08-11 5:47 Vijay Kumar
2005-08-11 21:00 ` Dan Malek
0 siblings, 1 reply; 2+ messages in thread
From: Vijay Kumar @ 2005-08-11 5:47 UTC (permalink / raw)
To: linuxppc-embedded; +Cc: dmalek
I was going through the fcc_enet driver
(linux-2.6.12.2/arch/ppc/8260_io/fcc_enet.c).
The driver accesses the CPM memory map using
immap = (cpm2_map_t *)CPM_MAP_ADDR;
There is also a global variable cpm2_immr defined in
arch/ppc/syslib/cpm2_common.c
If I were to write a new driver which one should I use
to access the CPM memory map?
Vijay
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: 8260 fcc_enet driver newbie question
2005-08-11 5:47 8260 fcc_enet driver newbie question Vijay Kumar
@ 2005-08-11 21:00 ` Dan Malek
0 siblings, 0 replies; 2+ messages in thread
From: Dan Malek @ 2005-08-11 21:00 UTC (permalink / raw)
To: vijaykumar; +Cc: dmalek, linuxppc-embedded
On Aug 11, 2005, at 1:47 AM, Vijay Kumar wrote:
> I was going through the fcc_enet driver
> (linux-2.6.12.2/arch/ppc/8260_io/fcc_enet.c).
This has been replaced by the new net/fs_enet, right?
> The driver accesses the CPM memory map using
> immap = (cpm2_map_t *)CPM_MAP_ADDR;
Yes, and that's wrong. You should at least use
ioremap(), and we recently had discussions about
whether to create some properly named functions
or macros to return common addresses like the
CPM space.
> There is also a global variable cpm2_immr defined in
> arch/ppc/syslib/cpm2_common.c
I know, but we shouldn't be doing that any longer.
> If I were to write a new driver which one should I use
> to access the CPM memory map?
For now, at least ioremap() the space in your driver
and cache the pointer. I'd like to quickly get a couple of
these other supporting functions done to use, though.
Thanks.
-- Dan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-08-11 21:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-11 5:47 8260 fcc_enet driver newbie question Vijay Kumar
2005-08-11 21:00 ` Dan Malek
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).