The following commit has been merged in the linux branch: commit fcc152f3bf55cec61167b173774cbf717b0ff5e4 Author: Atsushi Nemoto anemo@mba.ocn.ne.jp Date: Thu Sep 3 22:59:00 2009 +0900
MIPS: TXx9: Fix spi-baseclk value
TXx9 SPI bit rate is calculated by: fBR = fSPI / 2 / (n + 1) (fSPI is SPI master clock freq, i.e. imbusclk freq.) So use imbus_clk / 2 as a spi-baseclk.
Signed-off-by: Atsushi Nemoto anemo@mba.ocn.ne.jp Signed-off-by: Ralf Baechle ralf@linux-mips.org
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c index dfe4720..e10184c 100644 --- a/arch/mips/txx9/generic/setup.c +++ b/arch/mips/txx9/generic/setup.c @@ -85,7 +85,7 @@ int txx9_ccfg_toeon __initdata = 1; struct clk *clk_get(struct device *dev, const char *id) { if (!strcmp(id, "spi-baseclk")) - return (struct clk *)((unsigned long)txx9_gbus_clock / 2 / 4); + return (struct clk *)((unsigned long)txx9_gbus_clock / 2 / 2); if (!strcmp(id, "imbus_clk")) return (struct clk *)((unsigned long)txx9_gbus_clock / 2); return ERR_PTR(-ENOENT);