From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: How to handle parameter variation across different boards but same platform Date: Thu, 5 Jul 2012 08:32:16 +0000 Message-ID: <201207050832.16750.arnd@arndb.de> References: <1BAFE6F6C881BF42822005164F1491C33EA3532A@DBDE01.ent.ti.com> <20120704142745.GC4111@opensource.wolfsonmicro.com> <4FF52948.6090904@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by alsa0.perex.cz (Postfix) with ESMTP id E520B243C5 for ; Thu, 5 Jul 2012 10:32:44 +0200 (CEST) In-Reply-To: <4FF52948.6090904@ti.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: linux-arm-kernel@lists.infradead.org Cc: "alsa-devel@alsa-project.org" , Mark Brown , "davinci-linux-open-source@linux.davincidsp.com" , Vaibhav Hiremath , "Hebbar, Gururaja" , "alsa-user@lists.sourceforge.net" , "Girdwood, Liam" List-Id: alsa-devel@alsa-project.org On Thursday 05 July 2012, Vaibhav Hiremath wrote: > On 7/4/2012 7:57 PM, Mark Brown wrote: > > On Wed, Jul 04, 2012 at 02:17:48PM +0000, Hebbar, Gururaja wrote: > >> On Wed, Jul 04, 2012 at 19:31:18, Mark Brown wrote: > > > >>> If these are totally different boards they should have different machine > >>> IDs set so machine_is_() should identify. If that isn't there then you > >>> need to do something custom to your products to identify the boards > >>> further. > > > >> They are different boards with same SoC (AM33xx). So they both are true for > >> machine_is_am33xx(). > > > > What if the device only supports Linux boot from DT, where we set > machine_desc.nr = ~0 ?? > > Does machine ID still gets set? May be I am missing something... No, it doesn't. > As part of my debugging, on AM335xEVM platform machine_is_am33xx() > returns false, since the value of machine_desc.nr is set to ~0. Correct. However, when you are booting using the device tree, parameters such as the clock frequency of a device should be encoded in the device tree itself, so you don't need to know which machine you are on. Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 From: arnd@arndb.de (Arnd Bergmann) Date: Thu, 5 Jul 2012 08:32:16 +0000 Subject: How to handle parameter variation across different boards but same platform In-Reply-To: <4FF52948.6090904@ti.com> References: <1BAFE6F6C881BF42822005164F1491C33EA3532A@DBDE01.ent.ti.com> <20120704142745.GC4111@opensource.wolfsonmicro.com> <4FF52948.6090904@ti.com> Message-ID: <201207050832.16750.arnd@arndb.de> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thursday 05 July 2012, Vaibhav Hiremath wrote: > On 7/4/2012 7:57 PM, Mark Brown wrote: > > On Wed, Jul 04, 2012 at 02:17:48PM +0000, Hebbar, Gururaja wrote: > >> On Wed, Jul 04, 2012 at 19:31:18, Mark Brown wrote: > > > >>> If these are totally different boards they should have different machine > >>> IDs set so machine_is_() should identify. If that isn't there then you > >>> need to do something custom to your products to identify the boards > >>> further. > > > >> They are different boards with same SoC (AM33xx). So they both are true for > >> machine_is_am33xx(). > > > > What if the device only supports Linux boot from DT, where we set > machine_desc.nr = ~0 ?? > > Does machine ID still gets set? May be I am missing something... No, it doesn't. > As part of my debugging, on AM335xEVM platform machine_is_am33xx() > returns false, since the value of machine_desc.nr is set to ~0. Correct. However, when you are booting using the device tree, parameters such as the clock frequency of a device should be encoded in the device tree itself, so you don't need to know which machine you are on. Arnd