> > I noticed that the CPM2 module is accessed both through CPM_MAP_ADDR > > (physical address) and cpm2_immr (ioremap()ed address). For instance, the > > fec_enet driver configures the IO ports using (cpm2_map_t*)CPM_MAP_ADDR. > > Mentioned driver is deprecated.
It has been replaced by drivers/net/fs_enet, right ? The new driver doesn't support the LXT971/LXT971A PHY chipsets yet, so I'm still using the old one. > > What's the correct way to access the CPM2 module ? Does ioremap() map > > CPM_MAP_ADDR to itself so that both ways are correct ? > > Even direct cpm2_immr usage is not a good thing, but I cannot tell more > without knowing your concerns. Can you please describe what you are > planning to implement, prolly we can advice how to do that proper way. I'm currently just hacking IDMA transfers to make sure the signals we plan to use on a custom design work as expected. I will later work on the USB host controller driver. The new fs_enet driver internally maps CPM_MAP_ADDR. Should every driver create an internal CPM mapping ? Why was the old fec_enet driver able to access the CPM through CPM_MAP_ADDR without ioremap()ing it first ? Laurent Pinchart
