8260 fcc_enet driver newbie question

2005-08-11 Thread Vijay Kumar
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




8260 fcc_enet driver newbie question

2005-08-11 Thread Dan Malek

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