PWM on Beagleboard-xM Rev C

I had used PWM on my Beagle Board-xM, the code is here: https://github.com/tomxue/pwm_test/blob/master/pwm_test.c
Just for your reference.
And you may need to download the related spec.