From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Subject: Re: [PATCH 3/4] [POWERPC][SPI] use brg-frequency for SPI in QE Date: Wed, 19 Dec 2007 14:58:53 -0600 Message-ID: <4769860D.9040401@freescale.com> References: <20071219203447.GA18285@localhost.localdomain> <20071219203805.GC20861@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org, spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Anton Vorontsov Return-path: In-Reply-To: <20071219203805.GC20861-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org Anton Vorontsov wrote: > 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 ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from az33egw01.freescale.net (az33egw01.freescale.net [192.88.158.102]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "az33egw01.freescale.net", Issuer "Thawte Premium Server CA" (verified OK)) by ozlabs.org (Postfix) with ESMTP id 845CCDDDFB for ; Thu, 20 Dec 2007 07:59:21 +1100 (EST) Message-ID: <4769860D.9040401@freescale.com> Date: Wed, 19 Dec 2007 14:58:53 -0600 From: Scott Wood MIME-Version: 1.0 To: Anton Vorontsov Subject: Re: [PATCH 3/4] [POWERPC][SPI] use brg-frequency for SPI in QE References: <20071219203447.GA18285@localhost.localdomain> <20071219203805.GC20861@localhost.localdomain> In-Reply-To: <20071219203805.GC20861@localhost.localdomain> Content-Type: text/plain; charset=UTF-8; format=flowed Cc: linuxppc-dev@ozlabs.org, spi-devel-general@lists.sourceforge.net List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Anton Vorontsov wrote: > 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