public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Peter Korsgaard <jacmet@sunsite•dk>
To: Kumar Gala <galak@kernel•crashing.org>
Cc: PowerPC dev list <linuxppc-dev@ozlabs•org>,
	Stephen Rothwell <sfr@canb•auug.org.au>
Subject: Re: [PATCH] fsl_spi_init: Support non-QE processors
Date: Sat, 06 Oct 2007 22:06:40 +0200	[thread overview]
Message-ID: <87ejg8vwhb.fsf@macbook.be.48ers.dk> (raw)
In-Reply-To: <17D08E8E-6ADC-4D61-8859-8329EDD4DC6D@kernel.crashing.org> (Kumar Gala's message of "Fri\, 5 Oct 2007 09\:11\:12 -0500")

>>>>> "Kumar" == Kumar Gala <galak@kernel•crashing.org> writes:

 Kumar> On Oct 3, 2007, at 11:01 PM, Stephen Rothwell wrote:

 >> On Wed, 03 Oct 2007 17:43:50 +0200 Peter Korsgaard
 >> <jacmet@sunsite•dk> wrote:
 >>> 
 >>> @@ -1220,14 +1220,17 @@ int __init fsl_spi_init(struct
 >>> spi_board_info *board_infos,
 >>> {
 >>> struct device_node *np;
 >>> unsigned int i;
 >>> -	const u32 *sysclk;
 >>> +	const u32 *qe_sysclk = 0, *soc_sysclk = 0;
 >> 
 >> Please use NULL when referring to pointers.

 Kumar> Peter, any chance of getting a respin.  I'd like this to go
 Kumar> into 2.6.24.

Certainly. Sorry for the delay, I have been offline for 2 days
building my house ..
---
fsl_spi_init: Support non-QE processors

On non-QE processors (mpc831x/mpc834x) the SPI clock is the SoC clock.

Signed-off-by: Peter Korsgaard <jacmet@sunsite•dk>
---
 arch/powerpc/sysdev/fsl_soc.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index be5e0bd..3ace747 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -1222,8 +1222,12 @@ 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;
 
 	sysclk = of_get_property(np, "bus-frequency", NULL);
-- 
1.5.3.2

-- 
Bye, Peter Korsgaard

  reply	other threads:[~2007-10-06 20:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-03 15:43 [PATCH] fsl_spi_init: Support non-QE processors Peter Korsgaard
2007-10-03 15:56 ` Grant Likely
2007-10-03 16:04   ` Peter Korsgaard
2007-10-03 18:17     ` Grant Likely
2007-10-03 22:11       ` Kumar Gala
2007-10-04  4:01 ` Stephen Rothwell
2007-10-05 14:11   ` Kumar Gala
2007-10-06 20:06     ` Peter Korsgaard [this message]
2007-10-08 14:09       ` Kumar Gala

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ejg8vwhb.fsf@macbook.be.48ers.dk \
    --to=jacmet@sunsite$(echo .)dk \
    --cc=galak@kernel$(echo .)crashing.org \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=sfr@canb$(echo .)auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox