From: Peter Korsgaard Date: Sat, 6 Oct 2007 20:06:40 +0000 (+0200) Subject: [POWERPC] spi: Support non-QE processors X-Git-Tag: v2.6.24-rc1~1450^2~48 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=082ea86fce463f8c2f1ce059cc959f21dc1ef24a;p=linux-2.6-omap-h63xx.git [POWERPC] spi: Support non-QE processors On non-QE processors (mpc831x/mpc834x) the SPI clock is the SoC clock. Signed-off-by: Peter Korsgaard Signed-off-by: Kumar Gala --- diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index be5e0bda231..3ace7474809 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c @@ -1222,7 +1222,11 @@ int __init fsl_spi_init(struct spi_board_info *board_infos, unsigned int i; const u32 *sysclk; + /* SPI controller is either clocked from QE or SoC clock */ np = of_find_node_by_type(NULL, "qe"); + if (!np) + np = of_find_node_by_type(NULL, "soc"); + if (!np) return -ENODEV;