From: ScottEllis <sco...@gm...> - 2010-03-13 01:16:56
|
omap2_mcspi.c is a linux omap driver written first I think by some Nokia guys, but lots of other linux developers have touched it since. Nothing in there to blame on gumstix ;-) To change the clock settings I have found you have a couple of choices. One way is to make sure the first device probed or added in your board init has the default speed you want. The second is to override the speed in the speed_hz field of each struct spi_transfer you add to your spi_messages. For that second method to work, you need some patches to the omap2_mcspi driver. It was only partially implemented. Look at the SPI driver I posted earlier http://github.com/scottellis/overo-adc-mcp3002 overo-adc-mcp3002 . I provided patches for omap2_mcspi for OE kernel builds as part of that project. (I have to rework patch #2 as per the linux-omap guys, but the functionality will remain the same). I played around with that driver such that I could have a default max_speed_hz of one value (a default of sorts) and then for each of two devices, I would run each communication with them at a different speeds, intermingled. It works fine. Look at the adc_async() function in adc.c of the project. You don't have to mess with enabling or disabling the mcspi clocks. -- View this message in context: http://old.nabble.com/Segmentation-issue-and-SPI-clock-problems-tp27883728p27884810.html Sent from the Gumstix mailing list archive at Nabble.com. |