8260 fcc_enet driver newbie question
Dan Malek
dan at embeddededge.com
Fri Aug 12 07:00:30 EST 2005
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
More information about the Linuxppc-embedded
mailing list