[POWERPC] spi: Support non-QE processors
authorPeter Korsgaard <jacmet@sunsite.dk>
Sat, 6 Oct 2007 20:06:40 +0000 (22:06 +0200)
committerKumar Gala <galak@kernel.crashing.org>
Mon, 8 Oct 2007 14:05:30 +0000 (09:05 -0500)
On non-QE processors (mpc831x/mpc834x) the SPI clock is the SoC clock.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/sysdev/fsl_soc.c

index be5e0bda231886f7f48e7a473a63f345adf918bf..3ace7474809e00ba6d21be039e2d6dc21215b442 100644 (file)
@@ -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;