From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Subject: Re: [PATCH 7/8] spi_mpc8xxx: Turn qe_mode into flags Date: Tue, 24 Nov 2009 16:03:36 +1100 Message-ID: <1259039016.16367.118.camel@pasglop> References: <20091012164841.GA32214@oksana.dev.rtsoft.ru> <20091012164925.GG4578@oksana.dev.rtsoft.ru> <3E303C4F-CE29-470F-B34A-3413F31BC23C@kernel.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Cc: David Brownell , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org, spi-devel-general@lists.sourceforge.net, Andrew Morton To: Kumar Gala Return-path: In-Reply-To: <3E303C4F-CE29-470F-B34A-3413F31BC23C@kernel.crashing.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+glppd-linuxppc64-dev=m.gmane.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+glppd-linuxppc64-dev=m.gmane.org@lists.ozlabs.org List-Id: linux-spi.vger.kernel.org T24gVGh1LCAyMDA5LTExLTA1IGF0IDA3OjQ3IC0wNjAwLCBLdW1hciBHYWxhIHdyb3RlOgo+IE9u IE9jdCAxMiwgMjAwOSwgYXQgMTE6NDkgQU0sIEFudG9uIFZvcm9udHNvdiB3cm90ZToKPiAKPiA+ IFNvb24gdGhlcmUgd2lsbCBiZSBtb3JlIGZsYWdzIGludHJvZHVjZWQgaW4gc3Vic2VxdWVudCBw YXRjaGVzLCBzbwo+ID4gbGV0J3MgdHVybiBxZV9tb2RlIGludG8gZmxhZ3MuCj4gPgo+ID4gQWxz byBpbnRyb2R1Y2UgbXBjOHh4eF9zcGlfc3RybW9kZSgpIGFuZCBwcmludCBjdXJyZW50IFNQSSBt b2RlLgo+ID4KPiA+IFNpZ25lZC1vZmYtYnk6IEFudG9uIFZvcm9udHNvdiA8YXZvcm9udHNvdkBy dS5tdmlzdGEuY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8gYmUgY29udmVydGVkIHRvIG5ldyBzdHlsZSBzdHVmZi4KCkknbGwgY29tbWl0ICh3aWxs IGJlIHVwIGxhdGVyIHRvZGF5IGluIG15IG5leHQgYnJhbmNoKSBhIGZpeCBtb3ZpbmcgdGhlCmZs YWdzIG92ZXIgZm9yIG5vdyBzbyB0aGUgdHJlZSBkb2Vzbid0IGJyZWFrIGJ1aWxkaW5nLgoKSWYg eW91IGFyZSBnb2luZyB0byBrZWVwIHRoZSBmbGFncyBpbiB0aGUgLmMgZmlsZSB5b3UgcHJvYmFi bHkgYWxzbyB3YW50CnRvIHJlbW92ZSB0aGUgcGxhdGZvcm0gZGV2aWNlIGRlZmluaXRpb24gZnJv bSBmc2xfZGV2aWNlcy5oIGFueXdheXMgYXMKdGhlcmUncyBubyBwb2ludCBleHBvc2luZyB0byB0 aGUgd29ybGQgYSBzdHJ1Y3R1cmUgd2l0aCBhICJmbGFncyIgbWVtYmVyCmlmIHRoZSBkZWZpbml0 aW9uIG9mIHRob3NlIGZsYWdzIGlzbid0IGFsc28gZXhwb3NlZC4KCkNoZWVycywKQmVuLgoKX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KTGludXhwcGMtZGV2 IG1haWxpbmcgbGlzdApMaW51eHBwYy1kZXZAbGlzdHMub3psYWJzLm9yZwpodHRwczovL2xpc3Rz Lm96bGFicy5vcmcvbGlzdGluZm8vbGludXhwcGMtZGV2 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3FED31007DE for ; Tue, 24 Nov 2009 16:26:34 +1100 (EST) Subject: Re: [PATCH 7/8] spi_mpc8xxx: Turn qe_mode into flags From: Benjamin Herrenschmidt To: Kumar Gala In-Reply-To: <3E303C4F-CE29-470F-B34A-3413F31BC23C@kernel.crashing.org> References: <20091012164841.GA32214@oksana.dev.rtsoft.ru> <20091012164925.GG4578@oksana.dev.rtsoft.ru> <3E303C4F-CE29-470F-B34A-3413F31BC23C@kernel.crashing.org> Content-Type: text/plain; charset="UTF-8" Date: Tue, 24 Nov 2009 16:03:36 +1100 Message-ID: <1259039016.16367.118.camel@pasglop> Mime-Version: 1.0 Cc: David Brownell , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org, spi-devel-general@lists.sourceforge.net, Andrew Morton List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu, 2009-11-05 at 07:47 -0600, Kumar Gala wrote: > On Oct 12, 2009, at 11:49 AM, Anton Vorontsov wrote: > > > Soon there will be more flags introduced in subsequent patches, so > > let's turn qe_mode into flags. > > > > Also introduce mpc8xxx_spi_strmode() and print current SPI mode. > > > > Signed-off-by: Anton Vorontsov > > Acked-by: David Brownell > > --- > > drivers/spi/spi_mpc8xxx.c | 30 +++++++++++++++++++----------- > > include/linux/fsl_devices.h | 2 +- > > 2 files changed, 20 insertions(+), 12 deletions(-) > > applied to next This patch breaks my 6xx config: /home/benh/linux-powerpc-test/arch/powerpc/platforms/83xx/mpc832x_rdb.c: In function ‘of_fsl_spi_probe’: /home/benh/linux-powerpc-test/arch/powerpc/platforms/83xx/mpc832x_rdb.c:77: error: ‘struct fsl_spi_platform_data’ has no member named ‘qe_ The reason is that the mpc832x_rdb.c code still uses the legacy probing method. The fix is not totally trivial as the new flags are defined inside spi_mpc8xxx.c so either the flags need to be moved to fsl_devices.h or mpc832x_rdb.c needs to be converted to new style stuff. I'll commit (will be up later today in my next branch) a fix moving the flags over for now so the tree doesn't break building. If you are going to keep the flags in the .c file you probably also want to remove the platform device definition from fsl_devices.h anyways as there's no point exposing to the world a structure with a "flags" member if the definition of those flags isn't also exposed. Cheers, Ben. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753657AbZKXFgm (ORCPT ); Tue, 24 Nov 2009 00:36:42 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752483AbZKXFgm (ORCPT ); Tue, 24 Nov 2009 00:36:42 -0500 Received: from gate.crashing.org ([63.228.1.57]:43645 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751430AbZKXFgl (ORCPT ); Tue, 24 Nov 2009 00:36:41 -0500 Subject: Re: [PATCH 7/8] spi_mpc8xxx: Turn qe_mode into flags From: Benjamin Herrenschmidt To: Kumar Gala Cc: Anton Vorontsov , David Brownell , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org, spi-devel-general@lists.sourceforge.net, Andrew Morton In-Reply-To: <3E303C4F-CE29-470F-B34A-3413F31BC23C@kernel.crashing.org> References: <20091012164841.GA32214@oksana.dev.rtsoft.ru> <20091012164925.GG4578@oksana.dev.rtsoft.ru> <3E303C4F-CE29-470F-B34A-3413F31BC23C@kernel.crashing.org> Content-Type: text/plain; charset="UTF-8" Date: Tue, 24 Nov 2009 16:03:36 +1100 Message-ID: <1259039016.16367.118.camel@pasglop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2009-11-05 at 07:47 -0600, Kumar Gala wrote: > On Oct 12, 2009, at 11:49 AM, Anton Vorontsov wrote: > > > Soon there will be more flags introduced in subsequent patches, so > > let's turn qe_mode into flags. > > > > Also introduce mpc8xxx_spi_strmode() and print current SPI mode. > > > > Signed-off-by: Anton Vorontsov > > Acked-by: David Brownell > > --- > > drivers/spi/spi_mpc8xxx.c | 30 +++++++++++++++++++----------- > > include/linux/fsl_devices.h | 2 +- > > 2 files changed, 20 insertions(+), 12 deletions(-) > > applied to next This patch breaks my 6xx config: /home/benh/linux-powerpc-test/arch/powerpc/platforms/83xx/mpc832x_rdb.c: In function ‘of_fsl_spi_probe’: /home/benh/linux-powerpc-test/arch/powerpc/platforms/83xx/mpc832x_rdb.c:77: error: ‘struct fsl_spi_platform_data’ has no member named ‘qe_ The reason is that the mpc832x_rdb.c code still uses the legacy probing method. The fix is not totally trivial as the new flags are defined inside spi_mpc8xxx.c so either the flags need to be moved to fsl_devices.h or mpc832x_rdb.c needs to be converted to new style stuff. I'll commit (will be up later today in my next branch) a fix moving the flags over for now so the tree doesn't break building. If you are going to keep the flags in the .c file you probably also want to remove the platform device definition from fsl_devices.h anyways as there's no point exposing to the world a structure with a "flags" member if the definition of those flags isn't also exposed. Cheers, Ben.