From: Andrew Lunn Date: Sun, 22 Jul 2012 10:51:35 +0000 (+0200) Subject: I2C: MV64XYZ: Add Device Tree support X-Git-Tag: v3.6-rc1~67^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b61d15758941166b9cac41b87751dea21978bebc;p=pandora-kernel.git I2C: MV64XYZ: Add Device Tree support Extends the driver to get properties from device tree. Rather than pass the N & M factors in DT, use the more standard clock-frequency property. Calculate N & M at run time. In order to do this, we need to know tclk. So the driver uses clk_get() etc in order to get the clock and clk_get_rate() to determine the tclk rate. Not all platforms however have CLK, so some #ifdefery is needed to ensure the driver still compiles when CLK is not available. Signed-off-by: Andrew Lunn [wsa: converted some ints to u32 to match signedness] Signed-off-by: Wolfram Sang --- Reading git-diff-tree failed