From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753361AbbBSSla (ORCPT ); Thu, 19 Feb 2015 13:41:30 -0500 Received: from pmta2.delivery1.ore.mailhop.org ([54.149.155.156]:39040 "EHLO pmta2.delivery1.ore.mailhop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751939AbbBSSl3 (ORCPT ); Thu, 19 Feb 2015 13:41:29 -0500 X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 104.193.169.186 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX1+Jw7nINiez2H10pImwaD4Q Date: Thu, 19 Feb 2015 10:36:00 -0800 From: Tony Lindgren To: Pantelis Antoniou Cc: Grant Likely , Matt Porter , Koen Kooi , Guenter Roeck , Ludovic Desroches , Rob Herring , Nicolas Ferre , devicetree@vger.kernel.org, Linux Kernel Mailing List , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 3/4] arm: am33xx: DT quirks for am33xx based beaglebone variants Message-ID: <20150219183600.GG32521@atomide.com> References: <1424271576-1952-1-git-send-email-pantelis.antoniou@konsulko.com> <1424271576-1952-4-git-send-email-pantelis.antoniou@konsulko.com> <20150219181656.GF32521@atomide.com> <9C7BFC7C-0751-4233-927F-D01AF078704B@antoniou-consulting.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9C7BFC7C-0751-4233-927F-D01AF078704B@antoniou-consulting.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Pantelis Antoniou [150219 10:32]: > > On Feb 19, 2015, at 20:16 , Tony Lindgren wrote: > > > > Uhh I don't like the idea of duplicating the i2c-omap.c driver under > > arch/arm.. And in general we should initialize things later rather > > than earlier. > > > > What's stopping doing these quirk checks later on time with just > > a regular device driver, something like drivers/misc/bbone-quirks.c? > > > > We have no choice; we are way early in the boot process, right after > the device tree unflattening step. To me it seems the dt patching part should be done with minimal code before any driver like features.. > I’ve toyed with the idea of using early platform devices but the omap-i2c driver > would need some tender love and care to make it work, and I didn’t want to get > bogged down with i2c driver details at this point. ..so how about just parse a kernel cmdline for the quirks to apply based on a version string or similar? That can be easily populated by u-boot or set manually with setenv. That leaves out the need for tinkering with i2c super early in the kernel for revision detection. Regards, Tony From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: [PATCH 3/4] arm: am33xx: DT quirks for am33xx based beaglebone variants Date: Thu, 19 Feb 2015 10:36:00 -0800 Message-ID: <20150219183600.GG32521@atomide.com> References: <1424271576-1952-1-git-send-email-pantelis.antoniou@konsulko.com> <1424271576-1952-4-git-send-email-pantelis.antoniou@konsulko.com> <20150219181656.GF32521@atomide.com> <9C7BFC7C-0751-4233-927F-D01AF078704B@antoniou-consulting.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Content-Disposition: inline In-Reply-To: <9C7BFC7C-0751-4233-927F-D01AF078704B@antoniou-consulting.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Pantelis Antoniou Cc: devicetree@vger.kernel.org, Koen Kooi , Nicolas Ferre , Linux Kernel Mailing List , Grant Likely , Ludovic Desroches , linux-arm-kernel@lists.infradead.org, Matt Porter , Guenter Roeck List-Id: devicetree@vger.kernel.org KiBQYW50ZWxpcyBBbnRvbmlvdSA8cGFudG9AYW50b25pb3UtY29uc3VsdGluZy5jb20+IFsxNTAy MTkgMTA6MzJdOgo+ID4gT24gRmViIDE5LCAyMDE1LCBhdCAyMDoxNiAsIFRvbnkgTGluZGdyZW4g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i4uc28gaG93IGFib3V0 IGp1c3QgcGFyc2UgYSBrZXJuZWwgY21kbGluZSBmb3IgdGhlIHF1aXJrcyB0byBhcHBseQpiYXNl ZCBvbiBhIHZlcnNpb24gc3RyaW5nIG9yIHNpbWlsYXI/IFRoYXQgY2FuIGJlIGVhc2lseSBwb3B1 bGF0ZWQKYnkgdS1ib290IG9yIHNldCBtYW51YWxseSB3aXRoIHNldGVudi4KClRoYXQgbGVhdmVz IG91dCB0aGUgbmVlZCBmb3IgdGlua2VyaW5nIHdpdGggaTJjIHN1cGVyIGVhcmx5IGluCnRoZSBr ZXJuZWwgZm9yIHJldmlzaW9uIGRldGVjdGlvbi4KClJlZ2FyZHMsCgpUb255CgpfX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwpsaW51eC1hcm0ta2VybmVsIG1h aWxpbmcgbGlzdApsaW51eC1hcm0ta2VybmVsQGxpc3RzLmluZnJhZGVhZC5vcmcKaHR0cDovL2xp c3RzLmluZnJhZGVhZC5vcmcvbWFpbG1hbi9saXN0aW5mby9saW51eC1hcm0ta2VybmVsCg== From mboxrd@z Thu Jan 1 00:00:00 1970 From: tony@atomide.com (Tony Lindgren) Date: Thu, 19 Feb 2015 10:36:00 -0800 Subject: [PATCH 3/4] arm: am33xx: DT quirks for am33xx based beaglebone variants In-Reply-To: <9C7BFC7C-0751-4233-927F-D01AF078704B@antoniou-consulting.com> References: <1424271576-1952-1-git-send-email-pantelis.antoniou@konsulko.com> <1424271576-1952-4-git-send-email-pantelis.antoniou@konsulko.com> <20150219181656.GF32521@atomide.com> <9C7BFC7C-0751-4233-927F-D01AF078704B@antoniou-consulting.com> Message-ID: <20150219183600.GG32521@atomide.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org * Pantelis Antoniou [150219 10:32]: > > On Feb 19, 2015, at 20:16 , Tony Lindgren wrote: > > > > Uhh I don't like the idea of duplicating the i2c-omap.c driver under > > arch/arm.. And in general we should initialize things later rather > > than earlier. > > > > What's stopping doing these quirk checks later on time with just > > a regular device driver, something like drivers/misc/bbone-quirks.c? > > > > We have no choice; we are way early in the boot process, right after > the device tree unflattening step. To me it seems the dt patching part should be done with minimal code before any driver like features.. > I?ve toyed with the idea of using early platform devices but the omap-i2c driver > would need some tender love and care to make it work, and I didn?t want to get > bogged down with i2c driver details at this point. ..so how about just parse a kernel cmdline for the quirks to apply based on a version string or similar? That can be easily populated by u-boot or set manually with setenv. That leaves out the need for tinkering with i2c super early in the kernel for revision detection. Regards, Tony