Hi,

I took a look to your code and I have a question.

I don't understand these 3 instruction...

  gpioSetAddr = baseAddr + (0x4804c194 - MMAP_OFFSET);
  gpioClearAddr = baseAddr + (0x4804c190 - MMAP_OFFSET);
  directionAddr = baseAddr + (0x4804c134 - MMAP_OFFSET);


baseAddr I understood that is the address returned by ioremap and 
0x4804c194,0x4804c190 and 0x4804c134 are the address of registers OE, 
SET_DATAOUT and CLEAR_DATAOUT took from datasheet. But why you subtracted 
MMAP_OFFSET from this addresses? 

Best Regards,
Mihai Seba

On Friday, August 31, 2012 at 12:04:39 AM UTC+3, Wesley wrote:
>
> Hey,
>
> So I tested to see how fast the GPIO toggle rate of the Beaglebone could 
> get when using a kernel module. When using user space it was only about 4-5 
> MHz and once I did the kernel module it got up to 25 MHz. Since I had a 
> difficult time getting the kernel source tree on the beaglebone and 
> compiling everything here is some documentation and code for those who want 
> to build kernel modules/device drivers on the beaglebone and also user 
> program interaction with the kernel module.
>
> gpio.c is the kernel code
> gpio.h is the header file for both gpio.c and ioctl.c
> ioctl.c is the user code
>
> Here is my Makefile in case you want it also
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> obj-m := gpio.o
>
> KERNELDIR := /usr/src/linux-3.2.23
>
> default:
>         $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Also, the websites that I used that helped me get here were mainly these:
> https://groups.google.com/forum/#!msg/beagleboard/BKnNkP3qzQs/PNloua3737MJ
> http://www.cemetech.net/forum/viewtopic.php?t=7814
> and the Linux Device Drivers book
>
> ~Wesley
>
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to