Thread (17 messages) 17 messages, 7 authors, 2007-12-19

Re: [PATCH 3/4] [POWERPC][SPI] use brg-frequency for SPI in QE

flat view

From: Scott Wood <hidden>
Date: 2007-12-19 20:59:21
Also in: linux-spi

Anton Vorontsov wrote:
quoted hunk ↗ jump to hunk
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index 044dd7f..3cf84d0 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -1227,15 +1227,19 @@ int __init fsl_spi_init(struct spi_board_info *board_infos,
 
 	/* SPI controller is either clocked from QE or SoC clock */
 	np = of_find_compatible_node(NULL, NULL, "fsl,qe");
-	if (!np)
+	if (np) {
+		sysclk = of_get_property(np, "brg-frequency", NULL);
+		if (!sysclk)
+			return -ENODEV;
+	} else {
You should use get_brgfreq() instead (and fix the legacy match to find qe as well as soc nodes).

-Scott
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help