How to control Beagleboard PWM from userspace


I need help on controlling beagle board rev C1 PWM. I want to control the pwm on GPIO144_PWM9.
I tried using devmem2method mentioned on
It fails with bus error.

I learnt that there is another method using mmap. Has any one managed to contol the PWM using this method?

Is there a way by which we can change mach-omap2/board-omap3beagle.c and expose these pwm pin in /sys/class for controlling? or some way like the way gpio’s can be controlled.