How to control Beagleboard PWM from userspace

Hello,

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 http://www.jumpnowtek.com/index.php?option=com_content&view=article&id=56&Itemid=63
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.

Regards,
Ketan