SPI clock P9_22

Hi, I am trying to find out what is the maximum frequency on P9_22 which is the SPI clock on BBB. AND HOW DO I CHANGE THIS FREQUENCY.

The SPI module gets a clock of 48 MHz from the clock tree. You might be able to work with that frequency, but I know you can get it to work at 48/3 (16 MHz), because I do every day. I have read somewhere experimenters could not get it to work at 48/2 (24 MHz). I set my speed on the fly using an ioctl call in my c program:

ret = ioctl(fd, SPI_IOC_RD_MAX_SPEED_HZ, &speed);
if (ret == -1)
pabort(“can’t get max speed hz”);