[Ilugc] doubts in kernel porting & device drivers

  • From: madhukar_linux@xxxxxxxxxxx (Madhukar mythri)
  • Date: Wed Jan 19 10:29:51 2005

Hi,
Thanks for reply Shakthi...

--- Shakthi Kannan <cyborg4k@xxxxxxxxx> wrote:

Hi,

--- Madhukar mythri <madhukar_linux@xxxxxxxxxxx>
wrote:
         So in /proc/pci IO-mapped address and
Memory
mapped address both are  physical addres only...
as u  said.....   is it???

Yes.

       But, i could not digest this "Yes"...
   what is the diff then... if both r in physical
address...

bcoz, i assuemed upto now that.....
      
  Memory mapped mean.. the IO-address lines is mapped
to physical memory location some range....

 and IO-mapped mean CPU bus lines are dedicated to
some 
IO's which have smaller address range...

   Please reply to this ....im in confusion...
Please clear my doubt..... 

        iom_start = pci_resource_start(dev2,2);
        iom_end = pci_resource_end(dev2,2);
        iom_len = pci_resource_len(dev2,2);

What is the value of iom_len? You basically write
0xffffffff to base-address and read the value back.
Mask out the lower nibble and increment the
resulting
value by 1 to get the size/len of the IO-mapped
region. Do read the PCI specification. 

/* ioremap MMIO region */
        ioaddr = ioremap(iom_start, iom_len);  //

What type is ioaddr? iom_len?
      
      ioaddr------> void *  
      iom_len----->unsigned long

Check the short.c example in linux device drivers
code examples.

 oky i will see and reply back....


Rgds
Madhukar


                
__________________________________ 
Do you Yahoo!? 
Take Yahoo! Mail with you! Get it on your mobile phone. 
http://mobile.yahoo.com/maildemo ;

Other related posts: