I am starting work on porting our drivers from MV kernel to the git
kernel, and getting a lot of warnings like:

  warning: passing argument 1 of '__typesafe_io' makes integer from
pointer without a cast

Which comes from source like:

  u32 tmpreg;
  tmpreg = inl(GPIO_DIR45);

We have our own header with lots of lines like this (inspired by drivers
in the beta DM355 SDK):

  #define GPIO_DIR45 IO_ADDRESS( DAVINCI_GPIO_BASE + 0x60 )

Now, I'm pretty sure the we shouldn't be doing this for portability and
so on, and should be getting these addresses in some
platform-independent way, but for now It Works so I don't want to fix
it.

I would however like a clue on the right way to fix these warnings and
do the kind of accesses I'm trying to do. There are many similar-looking
macros and functions available: inl(), insl(), __raw_readl() and I don't
know which I should be using, or if I should be passing around u32
"addresses" or __iomem pointers (maybe the IO_ADDRESS() should go?).
Had a look around for documentation but not found anything too useful.

Thanks,

-- 
Jon Povey
[email protected]

 
Racelogic is a limited company registered in England. Registered number 2743719 
. 
Registered Office Unit 10, Swan Business Centre, Osier Way, Buckingham, Bucks, 
MK18 1TB .
The information contained in this electronic mail transmission is intended by 
Racelogic Ltd for the use of the named individual or entity to which it is 
directed and may contain information that is confidential or privileged. If you 
have received this electronic mail transmission in error, please delete it from 
your system without copying or forwarding it, and notify the sender of the 
error by reply email so that the sender's address records can be corrected. The 
views expressed by the sender of this communication do not necessarily 
represent those of Racelogic Ltd. Please note that Racelogic reserves the right 
to monitor e-mail communications passing through its network
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to